; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/assume @ 0x445a90 */ | #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&) */ 0x00445a90 push rbp | 0x00445a91 push r15 | 0x00445a93 push r14 | 0x00445a95 push r13 | 0x00445a97 push r12 | 0x00445a99 push rbx | 0x00445a9a push rax | 0x00445a9b mov rbx, rdi | rbx = rdi; 0x00445a9e mov eax, dword [rdi + 0x30] | eax = *((rdi + 0x30)); 0x00445aa1 cmp eax, 2 | | if (eax != 2) { 0x00445aa4 je 0x445adb | 0x00445aa6 cmp eax, 1 | | if (eax == 1) { 0x00445aa9 je 0x445b09 | goto label_2; | } 0x00445aab test eax, eax | | if (eax != 0) { 0x00445aad jne 0x445b35 | goto label_3; | } 0x00445ab3 mov rax, qword [rsi] | rax = *(rsi); 0x00445ab6 mov dword [rax + 0x2c], 1 | *((rax + 0x2c)) = 1; 0x00445abd mov rax, qword [rsi] | rax = *(rsi); 0x00445ac0 mov qword [rax + 0x30], 0x497818 | *((rax + 0x30)) = "selection0"; 0x00445ac8 mov rbp, qword [rsi] | rbp = *(rsi); 0x00445acb cmp dword [rbp + 0x14], 0 | | if (*((rbp + 0x14)) == 0) { 0x00445acf je 0x445b49 | goto label_4; | } 0x00445ad1 mov esi, 0x49a555 | esi = "Expected PRIMITIVE tag type for simple type"; 0x00445ad6 jmp 0x445c35 | goto label_5; | } 0x00445adb mov rax, qword [rsi] | rax = *(rsi); 0x00445ade mov dword [rax + 0x2c], 0 | *((rax + 0x2c)) = 0; 0x00445ae5 mov rax, qword [rsi] | rax = *(rsi); 0x00445ae8 mov qword [rax + 0x30], 0x49782e | *((rax + 0x30)) = "selection2"; 0x00445af0 mov rdi, qword [rsi] | rdi = *(rsi); 0x00445af3 mov rsi, rbx | rsi = rbx; 0x00445af6 add rsp, 8 | 0x00445afa pop rbx | 0x00445afb pop r12 | 0x00445afd pop r13 | 0x00445aff pop r14 | 0x00445b01 pop r15 | 0x00445b03 pop rbp | 0x00445b04 jmp 0x445c60 | void (*0x445c60)() (); | label_2: 0x00445b09 mov rax, qword [rsi] | rax = *(rsi); 0x00445b0c mov dword [rax + 0x2c], 4 | *((rax + 0x2c)) = 4; 0x00445b13 mov rax, qword [rsi] | rax = *(rsi); 0x00445b16 mov qword [rax + 0x30], 0x497823 | *((rax + 0x30)) = "selection1"; 0x00445b1e mov r14, qword [rsi] | r14 = *(rsi); 0x00445b21 cmp dword [r14 + 0x14], 0 | | if (*((r14 + 0x14)) == 0) { 0x00445b26 je 0x445b71 | goto label_6; | } 0x00445b28 mov esi, 0x49a555 | esi = "Expected PRIMITIVE tag type for simple type"; 0x00445b2d mov rdi, r14 | rdi = r14; 0x00445b30 jmp 0x445c38 | goto label_7; | label_3: 0x00445b35 mov eax, 0xffffffff | eax = 0xffffffff; | do { | label_1: 0x00445b3a add rsp, 8 | 0x00445b3e pop rbx | 0x00445b3f pop r12 | 0x00445b41 pop r13 | 0x00445b43 pop r14 | 0x00445b45 pop r15 | 0x00445b47 pop rbp | 0x00445b48 ret | return rax; | label_4: 0x00445b49 mov r12d, dword [rbp + 0x1c] | r12d = *((rbp + 0x1c)); 0x00445b4d cmp r12d, 4 | | if (r12d > 4) { 0x00445b51 ja 0x445c30 | goto label_8; | } 0x00445b57 mov rax, qword [rbp] | rax = *(rbp); 0x00445b5b mov r15, qword [rax + 0x108] | r15 = *((rax + 0x108)); 0x00445b62 mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x00445b66 cmp rax, qword [r15 + 0x20] | | if (rax == *((r15 + 0x20))) { 0x00445b6a je 0x445ba7 | goto label_9; | } 0x00445b6c movzx eax, byte [rax] | eax = *(rax); 0x00445b6f jmp 0x445bb0 | goto label_10; | label_6: 0x00445b71 mov rax, qword [r14] | rax = *(r14); 0x00445b74 mov rcx, qword [rax] | 0x00445b77 mov rsi, qword [rax + 0x108] | 0x00445b7e mov edx, dword [r14 + 0x1c] | 0x00445b82 mov rdi, rbx | 0x00445b85 call 0x454b40 | 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)); 0x00445b8a test eax, eax | | if (eax != 0) { 0x00445b8c je 0x445b9b | 0x00445b8e mov esi, 0x49a581 | esi = "Error reading value for simple type"; 0x00445b93 mov rdi, r14 | rdi = r14; 0x00445b96 jmp 0x445c38 | goto label_7; | } 0x00445b9b mov eax, dword [r14 + 0x1c] | eax = *((r14 + 0x1c)); 0x00445b9f mov dword [r14 + 0x24], eax | *((r14 + 0x24)) = eax; 0x00445ba3 xor eax, eax | eax = 0; 0x00445ba5 jmp 0x445b3a | | } while (1); | label_9: 0x00445ba7 mov rax, qword [r15] | rax = *(r15); 0x00445baa mov rdi, r15 | rdi = r15; 0x00445bad call qword [rax + 0x48] | al = uint64_t (*rax + 0x48)() (); | label_10: 0x00445bb0 sar al, 7 | al >>= 7; 0x00445bb3 movsx eax, al | eax = (int32_t) al; 0x00445bb6 mov dword [rbx], eax | *(rbx) = eax; 0x00445bb8 test r12d, r12d | | if (r12d <= 0) { 0x00445bbb jle 0x445c4b | goto label_11; | } 0x00445bc1 mov qword [rsp], rbp | *(rsp) = rbp; 0x00445bc5 mov r13d, r12d | r13d = r12d; 0x00445bc8 neg r13d | r13d = -r13d; 0x00445bcb mov r14b, 1 | r14b = 1; 0x00445bce mov ebp, 1 | 0x00445bd3 jmp 0x445c0e | | while (rax != *((r15 + 0x20))) { 0x00445be0 lea rcx, [rax + 1] | rcx = rax + 1; 0x00445be4 mov qword [r15 + 0x18], rcx | *((r15 + 0x18)) = rcx; 0x00445be8 movzx eax, byte [rax] | eax = *(rax); | label_0: 0x00445beb mov ecx, dword [rbx] | ecx = *(rbx); 0x00445bed shl ecx, 8 | ecx <<= 8; 0x00445bf0 movzx eax, al | eax = (int32_t) al; 0x00445bf3 or eax, ecx | eax |= ecx; 0x00445bf5 mov dword [rbx], eax | *(rbx) = eax; 0x00445bf7 cmp ebp, r12d | 0x00445bfa setl r14b | r14b = (ebp < r12d) ? 1 : 0; 0x00445bfe lea eax, [r13 + rbp + 1] | eax = r13 + rbp + 1; 0x00445c03 mov ecx, ebp | ecx = ebp; 0x00445c05 inc ecx | ecx++; 0x00445c07 mov ebp, ecx | 0x00445c09 cmp eax, 1 | | if (eax == 1) { 0x00445c0c je 0x445c26 | goto label_12; | } 0x00445c0e mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x00445c12 cmp rax, qword [r15 + 0x20] | 0x00445c16 jne 0x445be0 | | } 0x00445c18 mov rax, qword [r15] | rax = *(r15); 0x00445c1b mov rdi, r15 | rdi = r15; 0x00445c1e call qword [rax + 0x50] | eax = uint64_t (*rax + 0x50)() (); 0x00445c21 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00445c24 jne 0x445beb | goto label_0; | } | label_12: 0x00445c26 test r14b, 1 | 0x00445c2a mov rbp, qword [rsp] | rbp = *(rsp); | if ((r14b & 1) != 0) { 0x00445c2e je 0x445c4b | | label_8: 0x00445c30 mov esi, 0x49a581 | esi = "Error reading value for simple type"; | label_5: 0x00445c35 mov rdi, rbp | rdi = rbp; | label_7: 0x00445c38 add rsp, 8 | 0x00445c3c pop rbx | 0x00445c3d pop r12 | 0x00445c3f pop r13 | 0x00445c41 pop r14 | 0x00445c43 pop r15 | 0x00445c45 pop rbp | 0x00445c46 jmp 0x450280 | void (*0x450280)() (); | } | label_11: 0x00445c4b mov eax, dword [rbp + 0x1c] | eax = *((rbp + 0x1c)); 0x00445c4e mov dword [rbp + 0x24], eax | *((rbp + 0x24)) = eax; 0x00445c51 xor eax, eax | eax = 0; 0x00445c53 jmp 0x445b3a | goto label_1; | }