; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/none @ 0x4575c0 */ | #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*) */ 0x004575c0 push rbp | 0x004575c1 push r15 | 0x004575c3 push r14 | 0x004575c5 push rbx | 0x004575c6 sub rsp, 0x18 | 0x004575ca mov ebp, edx | 0x004575cc mov r15, rsi | r15 = rsi; 0x004575cf mov rbx, rdi | rbx = rdi; 0x004575d2 lea esi, [rbp + 2] | 0x004575d5 call 0x453da0 | eax = BloombergLP::balber::BerUtil_LengthImpUtil::putLength(std::_1::basic_streambuf>*,int) (rdi, rbp + 2); 0x004575da mov r14d, 0xffffffff | r14d = 0xffffffff; 0x004575e0 test eax, eax | | if (eax != 0) { 0x004575e2 jne 0x45765e | goto label_1; | } 0x004575e4 mov word [rsp + 0xe], 0 | *((rsp + 0xe)) = 0; 0x004575eb mov rax, qword [rbx] | rax = *(rbx); 0x004575ee lea rsi, [rsp + 0xe] | rsi = rsp + 0xe; 0x004575f3 mov edx, 2 | edx = 2; 0x004575f8 mov rdi, rbx | rdi = rbx; 0x004575fb call qword [rax + 0x60] | rax = uint64_t (*rax + 0x60)() (); 0x004575fe cmp rax, 2 | | if (rax != 2) { 0x00457602 jne 0x45765e | goto label_1; | } 0x00457604 mov qword [rsp + 0x10], r15 | *((rsp + 0x10)) = r15; 0x00457609 mov r14d, 0xffffffff | r14d = 0xffffffff; 0x0045760f test ebp, ebp | | if (ebp <= 0) { 0x00457611 jle 0x45765e | goto label_1; | } 0x00457613 cmp ebp, 8 | | if (ebp > 8) { 0x00457616 ja 0x45765e | goto label_1; | } 0x00457618 mov ebp, ebp | 0x0045761a jmp 0x457635 | | while (rcx != *((rbx + 0x38))) { 0x00457620 lea rdx, [rcx + 1] | rdx = rcx + 1; 0x00457624 mov qword [rbx + 0x30], rdx | *((rbx + 0x30)) = rdx; 0x00457628 mov byte [rcx], al | *(rcx) = al; | label_0: 0x0045762a dec rbp | rbp--; 0x0045762d lea eax, [rbp + 1] | eax = rbp + 1; 0x00457630 cmp eax, 1 | | if (eax <= 1) { 0x00457633 jle 0x45765b | goto label_2; | } 0x00457635 movzx eax, byte [rsp + rbp + 0xf] | eax = *((rsp + rbp + 0xf)); 0x0045763a mov rcx, qword [rbx + 0x30] | rcx = *((rbx + 0x30)); 0x0045763e cmp rcx, qword [rbx + 0x38] | 0x00457642 jne 0x457620 | | } 0x00457644 movzx r15d, al | r15d = (int32_t) al; 0x00457648 mov rax, qword [rbx] | rax = *(rbx); 0x0045764b mov rdi, rbx | rdi = rbx; 0x0045764e mov esi, r15d | esi = r15d; 0x00457651 call qword [rax + 0x68] | eax = uint64_t (*rax + 0x68)() (); 0x00457654 cmp eax, r15d | | if (eax == r15d) { 0x00457657 je 0x45762a | goto label_0; | } 0x00457659 jmp 0x45765e | goto label_1; | label_2: 0x0045765b xor r14d, r14d | r14d = 0; | label_1: 0x0045765e mov eax, r14d | eax = r14d; 0x00457661 add rsp, 0x18 | 0x00457665 pop rbx | 0x00457666 pop r14 | 0x00457668 pop r15 | 0x0045766a pop rbp | 0x0045766b ret | return rax; | }