; assembly | /* r2dec pseudo code output */ | /* baljsn_decoder.t/assume @ 0x4564a0 */ | #include | ; (fcn) method.int_BloombergLP::balb::Choice2::manipulateSelection_BloombergLP::baljsn.Decoder_ElementVisitor__BloombergLP::baljsn::Decoder_ElementVisitor_ () | int64_t method_int_BloombergLP::balb::Choice2::manipulateSelection_BloombergLP::baljsn_Decoder_ElementVisitor_BloombergLP::baljsn::Decoder_ElementVisitor_ (uint32_t arg_8h, int64_t arg_10h, int64_t arg2, int64_t arg1) { | rsi = arg2; | rdi = arg1; | /* int BloombergLP::balb::Choice2::manipulateSelection(BloombergLP::baljsn::Decoder_ElementVisitor&) */ 0x004564a0 push r14 | 0x004564a2 push rbx | 0x004564a3 sub rsp, 0x18 | 0x004564a7 mov eax, dword [rdi + 0x30] | eax = *((rdi + 0x30)); 0x004564aa cmp rax, 3 | | if (rax > 3) { 0x004564ae ja 0x456591 | goto label_1; | } 0x004564b4 mov rbx, rdi | rbx = rdi; | /* switch table (4 cases) at 0x4f5fd0 */ 0x004564b7 jmp qword [rax*8 + 0x4f5fd0] | 0x004564be mov r14, qword [rsi] | r14 = *(rsi); 0x004564c1 cmp dword [r14 + 0x2300], 7 | | if (*((r14 + 0x2300)) == 7) { 0x004564c9 jne 0x45657f | 0x004564cf lea rdi, [r14 + 0x120] | 0x004564d6 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x004564d9 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x004564dd mov rsi, rsp | 0x004564e0 call 0x45f7a0 | eax = BloombergLP::baljsn::Tokenizer::value(std::_1::basic_string_view>*)const (r14 + 0x120, rsp); 0x004564e5 test eax, eax | | if (eax == 0) { 0x004564e7 jne 0x456573 | 0x004564ed mov rsi, rsp | 0x004564f0 mov rdi, rbx | 0x004564f3 call 0x45e600 | BloombergLP::baljsn::ParserUtil::getValue(bool*,std::_1::basic_string_view>const&) (rbx, rsp); 0x004564f8 jmp 0x456596 | goto label_0; 0x004564fd mov r14, qword [rsi] | r14 = *(rsi); 0x00456500 cmp dword [r14 + 0x2300], 7 | | if (*((r14 + 0x2300)) != 7) { 0x00456508 jne 0x45657f | goto label_2; | } 0x0045650a lea rdi, [r14 + 0x120] | 0x00456511 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00456514 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00456518 mov rsi, rsp | 0x0045651b call 0x45f7a0 | eax = BloombergLP::baljsn::Tokenizer::value(std::_1::basic_string_view>*)const (r14 + 0x120, rsp); 0x00456520 test eax, eax | | if (eax != 0) { 0x00456522 jne 0x456573 | goto label_3; | } 0x00456524 mov rsi, rsp | 0x00456527 mov rdi, rbx | 0x0045652a call 0x45d970 | BloombergLP::baljsn::ParserUtil::getString(bsl::basic_string,bsl::allocator>*,std::_1::basic_string_view>const&) (rbx, rsp); 0x0045652f jmp 0x456596 | goto label_0; 0x00456531 mov rax, qword [rbx] | rax = *(rbx); 0x00456534 mov rdi, qword [rsi] | rdi = *(rsi); 0x00456537 mov edx, dword [rip + 0x1c4893] | edx = .comment; 0x0045653d mov rsi, rax | rsi = rax; 0x00456540 add rsp, 0x18 | 0x00456544 pop rbx | 0x00456545 pop r14 | 0x00456547 jmp 0x452670 | void (*0x452670)() (); 0x0045654c mov r14, qword [rsi] | r14 = *(rsi); 0x0045654f cmp dword [r14 + 0x2300], 7 | | if (*((r14 + 0x2300)) != 7) { 0x00456557 jne 0x45657f | goto label_2; | } 0x00456559 lea rdi, [r14 + 0x120] | 0x00456560 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00456563 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00456567 mov rsi, rsp | 0x0045656a call 0x45f7a0 | eax = BloombergLP::baljsn::Tokenizer::value(std::_1::basic_string_view>*)const (r14 + 0x120, rsp); 0x0045656f test eax, eax | | if (eax == 0) { 0x00456571 je 0x45659e | goto label_4; | } | } | label_3: 0x00456573 mov esi, 0x6131e6 | esi = "Error reading simple value\n"; 0x00456578 mov edx, 0x1b | edx = 0x1b; 0x0045657d jmp 0x456589 | | } else { | label_2: 0x0045657f mov esi, 0x6131c2 | 0x00456584 mov edx, 0x23 | | } 0x00456589 mov rdi, r14 | 0x0045658c call 0x417b30 | std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (r14, "Simple element value was not found\n", 0x23); | do { | label_1: 0x00456591 mov eax, 0xffffffff | eax = 0xffffffff; | label_0: 0x00456596 add rsp, 0x18 | 0x0045659a pop rbx | 0x0045659b pop r14 | 0x0045659d ret | return rax; | label_4: 0x0045659e cmp qword [rsp + 8], 0 | 0x004565a4 je 0x456591 | | } while (*((rsp + 8)) == 0); 0x004565a6 lea rdi, [rsp + 0x10] | 0x004565ab mov rsi, rsp | 0x004565ae call 0x45e240 | eax = BloombergLP::baljsn::ParserUtil::getUint64(unsigned long long*,std::_1::basic_string_view>const&) (rsp + 0x10, rsp); 0x004565b3 mov ecx, eax | ecx = eax; 0x004565b5 mov eax, 0xffffffff | eax = 0xffffffff; 0x004565ba test ecx, ecx | | if (ecx != 0) { 0x004565bc jne 0x456596 | goto label_0; | } 0x004565be mov rcx, qword [rsp + 0x10] | rcx = *((rsp + 0x10)); 0x004565c3 mov rdx, rcx | rdx = *((rsp + 0x10)); 0x004565c6 shr rdx, 0x20 | rdx >>= 0x20; | if (rdx != 0) { 0x004565ca jne 0x456596 | goto label_0; | } 0x004565cc mov dword [rbx], ecx | *(rbx) = ecx; 0x004565ce xor eax, eax | eax = 0; 0x004565d0 jmp 0x456596 | goto label_0; | }