; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/assume @ 0x457690 */ | #include | ; (fcn) method.BloombergLP::balber::BerUtil_DatetimeImpUtil.putCompactBinaryDatetimeTzValue_std::__1::basic_streambuf_char__std::__1::char_traits_char_____long_long__int__BloombergLP::balber::BerEncoderOptions_const_ () | uint64_t method_BloombergLP::balber::BerUtil_DatetimeImpUtil_putCompactBinaryDatetimeTzValue_std::_1::basic_streambuf_char_std::_1::char_traits_char_long_long_int_BloombergLP::balber::BerEncoderOptions_const_ (int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_eh; | int64_t var_fh; | int64_t var_10h; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::balber::BerUtil_DatetimeImpUtil::putCompactBinaryDatetimeTzValue(std::__1::basic_streambuf >*, long long, int, BloombergLP::balber::BerEncoderOptions const*) */ 0x00457690 push rbp | 0x00457691 push r15 | 0x00457693 push r14 | 0x00457695 push rbx | 0x00457696 sub rsp, 0x18 | 0x0045769a mov ebp, edx | 0x0045769c mov r15, rsi | r15 = rsi; 0x0045769f mov rbx, rdi | rbx = rdi; 0x004576a2 lea esi, [rbp + 2] | 0x004576a5 call 0x453df0 | eax = BloombergLP::balber::BerUtil_LengthImpUtil::putLength(std::_1::basic_streambuf>*,int) (rdi, rbp + 2); 0x004576aa mov r14d, 0xffffffff | r14d = 0xffffffff; 0x004576b0 test eax, eax | | if (eax != 0) { 0x004576b2 jne 0x45772e | goto label_1; | } 0x004576b4 mov word [rsp + 0xe], 0 | *((rsp + 0xe)) = 0; 0x004576bb mov rax, qword [rbx] | rax = *(rbx); 0x004576be lea rsi, [rsp + 0xe] | rsi = rsp + 0xe; 0x004576c3 mov edx, 2 | edx = 2; 0x004576c8 mov rdi, rbx | rdi = rbx; 0x004576cb call qword [rax + 0x60] | rax = uint64_t (*rax + 0x60)() (); 0x004576ce cmp rax, 2 | | if (rax != 2) { 0x004576d2 jne 0x45772e | goto label_1; | } 0x004576d4 mov qword [rsp + 0x10], r15 | *((rsp + 0x10)) = r15; 0x004576d9 mov r14d, 0xffffffff | r14d = 0xffffffff; 0x004576df cmp ebp, 8 | | if (ebp > 8) { 0x004576e2 ja 0x45772e | goto label_1; | } 0x004576e4 mov ebp, ebp | 0x004576e6 jmp 0x457705 | | while (rcx != *((rbx + 0x38))) { 0x004576f0 lea rdx, [rcx + 1] | rdx = rcx + 1; 0x004576f4 mov qword [rbx + 0x30], rdx | *((rbx + 0x30)) = rdx; 0x004576f8 mov byte [rcx], al | *(rcx) = al; | label_0: 0x004576fa dec rbp | rbp--; 0x004576fd lea eax, [rbp + 1] | eax = rbp + 1; 0x00457700 cmp eax, 1 | | if (eax <= 1) { 0x00457703 jle 0x45772b | goto label_2; | } 0x00457705 movzx eax, byte [rsp + rbp + 0xf] | eax = *((rsp + rbp + 0xf)); 0x0045770a mov rcx, qword [rbx + 0x30] | rcx = *((rbx + 0x30)); 0x0045770e cmp rcx, qword [rbx + 0x38] | 0x00457712 jne 0x4576f0 | | } 0x00457714 movzx r15d, al | r15d = (int32_t) al; 0x00457718 mov rax, qword [rbx] | rax = *(rbx); 0x0045771b mov rdi, rbx | rdi = rbx; 0x0045771e mov esi, r15d | esi = r15d; 0x00457721 call qword [rax + 0x68] | eax = uint64_t (*rax + 0x68)() (); 0x00457724 cmp eax, r15d | | if (eax == r15d) { 0x00457727 je 0x4576fa | goto label_0; | } 0x00457729 jmp 0x45772e | goto label_1; | label_2: 0x0045772b xor r14d, r14d | r14d = 0; | label_1: 0x0045772e mov eax, r14d | eax = r14d; 0x00457731 add rsp, 0x18 | 0x00457735 pop rbx | 0x00457736 pop r14 | 0x00457738 pop r15 | 0x0045773a pop rbp | 0x0045773b ret | return rax; | }