; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/none @ 0x445a00 */ | #include | ; (fcn) method.int_BloombergLP::s_baltst::MyChoiceWithDefaultValues::manipulateSelection_BloombergLP::balber.BerDecoder_NodeVisitor__BloombergLP::balber::BerDecoder_NodeVisitor_ () | int64_t method_int_BloombergLP::s_baltst::MyChoiceWithDefaultValues::manipulateSelection_BloombergLP::balber_BerDecoder_NodeVisitor_BloombergLP::balber::BerDecoder_NodeVisitor_ (int64_t arg2, int64_t arg1) { | rsi = arg2; | rdi = arg1; | /* int BloombergLP::s_baltst::MyChoiceWithDefaultValues::manipulateSelection(BloombergLP::balber::BerDecoder_NodeVisitor&) */ 0x00445a00 push rbp | 0x00445a01 push r15 | 0x00445a03 push r14 | 0x00445a05 push r13 | 0x00445a07 push r12 | 0x00445a09 push rbx | 0x00445a0a push rax | 0x00445a0b mov rbx, rdi | rbx = rdi; 0x00445a0e mov ecx, dword [rdi + 0x30] | ecx = *((rdi + 0x30)); 0x00445a11 cmp ecx, 2 | | if (ecx != 2) { 0x00445a14 je 0x445a50 | 0x00445a16 cmp ecx, 1 | | if (ecx == 1) { 0x00445a19 je 0x445a7e | goto label_1; | } 0x00445a1b mov eax, 0xffffffff | eax = 0xffffffff; 0x00445a20 test ecx, ecx | | if (ecx != 0) { 0x00445a22 jne 0x445bb3 | goto label_2; | } 0x00445a28 mov rax, qword [rsi] | rax = *(rsi); 0x00445a2b mov dword [rax + 0x2c], 1 | *((rax + 0x2c)) = 1; 0x00445a32 mov rax, qword [rsi] | rax = *(rsi); 0x00445a35 mov qword [rax + 0x30], 0x497bf0 | *((rax + 0x30)) = "selection0"; 0x00445a3d mov rbp, qword [rsi] | rbp = *(rsi); 0x00445a40 cmp dword [rbp + 0x14], 0 | | if (*((rbp + 0x14)) == 0) { 0x00445a44 je 0x445aaa | goto label_3; | } 0x00445a46 mov esi, 0x49a92b | esi = "Expected PRIMITIVE tag type for simple type"; 0x00445a4b jmp 0x445b95 | goto label_4; | } 0x00445a50 mov rax, qword [rsi] | rax = *(rsi); 0x00445a53 mov dword [rax + 0x2c], 0 | *((rax + 0x2c)) = 0; 0x00445a5a mov rax, qword [rsi] | rax = *(rsi); 0x00445a5d mov qword [rax + 0x30], 0x497c06 | *((rax + 0x30)) = "selection2"; 0x00445a65 mov rdi, qword [rsi] | rdi = *(rsi); 0x00445a68 mov rsi, rbx | rsi = rbx; 0x00445a6b add rsp, 8 | 0x00445a6f pop rbx | 0x00445a70 pop r12 | 0x00445a72 pop r13 | 0x00445a74 pop r14 | 0x00445a76 pop r15 | 0x00445a78 pop rbp | 0x00445a79 jmp 0x445bd0 | void (*0x445bd0)() (); | label_1: 0x00445a7e mov rax, qword [rsi] | rax = *(rsi); 0x00445a81 mov dword [rax + 0x2c], 4 | *((rax + 0x2c)) = 4; 0x00445a88 mov rax, qword [rsi] | rax = *(rsi); 0x00445a8b mov qword [rax + 0x30], 0x497bfb | *((rax + 0x30)) = "selection1"; 0x00445a93 mov r14, qword [rsi] | r14 = *(rsi); 0x00445a96 cmp dword [r14 + 0x14], 0 | | if (*((r14 + 0x14)) != 0) { 0x00445a9b je 0x445ad2 | 0x00445a9d mov esi, 0x49a92b | esi = "Expected PRIMITIVE tag type for simple type"; 0x00445aa2 mov rdi, r14 | rdi = r14; 0x00445aa5 jmp 0x445b98 | goto label_5; | label_3: 0x00445aaa mov r12d, dword [rbp + 0x1c] | r12d = *((rbp + 0x1c)); 0x00445aae cmp r12d, 4 | | if (r12d > 4) { 0x00445ab2 ja 0x445b90 | goto label_6; | } 0x00445ab8 mov rax, qword [rbp] | rax = *(rbp); 0x00445abc mov r15, qword [rax + 0x108] | r15 = *((rax + 0x108)); 0x00445ac3 mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x00445ac7 cmp rax, qword [r15 + 0x20] | | if (rax != *((r15 + 0x20))) { 0x00445acb je 0x445b09 | 0x00445acd movzx eax, byte [rax] | eax = *(rax); 0x00445ad0 jmp 0x445b12 | | } else { 0x00445ad2 mov rax, qword [r14] | rax = *(r14); 0x00445ad5 mov rcx, qword [rax] | 0x00445ad8 mov rsi, qword [rax + 0x108] | 0x00445adf mov edx, dword [r14 + 0x1c] | 0x00445ae3 mov rdi, rbx | 0x00445ae6 call 0x454b10 | eax = BloombergLP::balber::BerUtil_StringImpUtil::getStringValue(bsl::basic_string,bsl::allocator>*,std::_1::basic_streambuf>*,int,BloombergLP::balber::BerDecoderOptionsconst&) (rbx, *((rax + 0x108)), *((r14 + 0x1c)), *(rax)); 0x00445aeb test eax, eax | | if (eax != 0) { 0x00445aed je 0x445afc | 0x00445aef mov esi, 0x49a957 | esi = "Error reading value for simple type"; 0x00445af4 mov rdi, r14 | rdi = r14; 0x00445af7 jmp 0x445b98 | goto label_5; | } 0x00445afc mov eax, dword [r14 + 0x1c] | eax = *((r14 + 0x1c)); 0x00445b00 mov dword [r14 + 0x24], eax | *((r14 + 0x24)) = eax; 0x00445b04 jmp 0x445bb1 | goto label_7; | } 0x00445b09 mov rax, qword [r15] | rax = *(r15); 0x00445b0c mov rdi, r15 | rdi = r15; 0x00445b0f call qword [rax + 0x48] | al = uint64_t (*rax + 0x48)() (); | } 0x00445b12 sar al, 7 | al >>= 7; 0x00445b15 movsx eax, al | eax = (int32_t) al; 0x00445b18 mov dword [rbx], eax | *(rbx) = eax; 0x00445b1a test r12d, r12d | | if (r12d <= 0) { 0x00445b1d jle 0x445bab | goto label_8; | } 0x00445b23 mov qword [rsp], rbp | *(rsp) = rbp; 0x00445b27 mov r13d, r12d | r13d = r12d; 0x00445b2a neg r13d | r13d = -r13d; 0x00445b2d mov r14b, 1 | r14b = 1; 0x00445b30 mov ebp, 1 | 0x00445b35 jmp 0x445b6e | | while (rax != *((r15 + 0x20))) { 0x00445b40 lea rcx, [rax + 1] | rcx = rax + 1; 0x00445b44 mov qword [r15 + 0x18], rcx | *((r15 + 0x18)) = rcx; 0x00445b48 movzx eax, byte [rax] | eax = *(rax); | label_0: 0x00445b4b mov ecx, dword [rbx] | ecx = *(rbx); 0x00445b4d shl ecx, 8 | ecx <<= 8; 0x00445b50 movzx eax, al | eax = (int32_t) al; 0x00445b53 or eax, ecx | eax |= ecx; 0x00445b55 mov dword [rbx], eax | *(rbx) = eax; 0x00445b57 cmp ebp, r12d | 0x00445b5a setl r14b | r14b = (ebp < r12d) ? 1 : 0; 0x00445b5e lea eax, [r13 + rbp + 1] | eax = r13 + rbp + 1; 0x00445b63 mov ecx, ebp | ecx = ebp; 0x00445b65 inc ecx | ecx++; 0x00445b67 mov ebp, ecx | 0x00445b69 cmp eax, 1 | | if (eax == 1) { 0x00445b6c je 0x445b86 | goto label_9; | } 0x00445b6e mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x00445b72 cmp rax, qword [r15 + 0x20] | 0x00445b76 jne 0x445b40 | | } 0x00445b78 mov rax, qword [r15] | rax = *(r15); 0x00445b7b mov rdi, r15 | rdi = r15; 0x00445b7e call qword [rax + 0x50] | eax = uint64_t (*rax + 0x50)() (); 0x00445b81 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00445b84 jne 0x445b4b | goto label_0; | } | label_9: 0x00445b86 test r14b, 1 | 0x00445b8a mov rbp, qword [rsp] | rbp = *(rsp); | if ((r14b & 1) != 0) { 0x00445b8e je 0x445bab | | label_6: 0x00445b90 mov esi, 0x49a957 | esi = "Error reading value for simple type"; | label_4: 0x00445b95 mov rdi, rbp | rdi = rbp; | label_5: 0x00445b98 add rsp, 8 | 0x00445b9c pop rbx | 0x00445b9d pop r12 | 0x00445b9f pop r13 | 0x00445ba1 pop r14 | 0x00445ba3 pop r15 | 0x00445ba5 pop rbp | 0x00445ba6 jmp 0x450230 | void (*0x450230)() (); | } | label_8: 0x00445bab mov eax, dword [rbp + 0x1c] | eax = *((rbp + 0x1c)); 0x00445bae mov dword [rbp + 0x24], eax | *((rbp + 0x24)) = eax; | label_7: 0x00445bb1 xor eax, eax | eax = 0; | label_2: 0x00445bb3 add rsp, 8 | 0x00445bb7 pop rbx | 0x00445bb8 pop r12 | 0x00445bba pop r13 | 0x00445bbc pop r14 | 0x00445bbe pop r15 | 0x00445bc0 pop rbp | 0x00445bc1 ret | return rax; | }