; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/assume @ 0x466370 */ | #include | ; (fcn) method.BloombergLP::bdlt::Iso8601Util.generate_char__int__BloombergLP::bdlt::Date_const__BloombergLP::bdlt::Iso8601UtilConfiguration_const_ () | uint64_t method_BloombergLP::bdlt::Iso8601Util_generate_char_int_BloombergLP::bdlt::Date_const_BloombergLP::bdlt::Iso8601UtilConfiguration_const_ (int64_t arg3, uint32_t arg2, int64_t arg1) { | void * s2; | int64_t var_fh; | int64_t var_10h; | int64_t var_11h; | int64_t var_12h; | int64_t var_13h; | int64_t var_14h; | int64_t var_15h; | int64_t var_16h; | int64_t var_17h; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlt::Iso8601Util::generate(char*, int, BloombergLP::bdlt::Date const&, BloombergLP::bdlt::Iso8601UtilConfiguration const&) */ 0x00466370 push rbp | 0x00466371 push r15 | 0x00466373 push r14 | 0x00466375 push rbx | 0x00466376 sub rsp, 0x18 | 0x0046637a mov r14, rdx | r14 = rdx; 0x0046637d mov rbx, rdi | rbx = rdi; 0x00466380 cmp esi, 0xb | | if (esi >= 0xb) { 0x00466383 jb 0x46648b | 0x00466389 mov edi, dword [r14] | 0x0046638c call 0x46a320 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(r14), rsi); 0x00466391 mov ecx, eax | ecx = eax; 0x00466393 mov ebp, 0xcccccccd | 0x00466398 imul rdx, rcx, 0x51eb851f | rdx = rcx * 0x51eb851f; 0x0046639f imul rsi, rcx, 0x10624dd3 | rsi = rcx * 0x10624dd3; 0x004663a6 imul rcx, rbp | rcx *= rbp; 0x004663aa shr rcx, 0x23 | rcx >>= 0x23; 0x004663ae lea edi, [rcx + rcx] | edi = rcx + rcx; 0x004663b1 lea edi, [rdi + rdi*4] | edi = rdi * 5; 0x004663b4 sub eax, edi | eax -= edi; 0x004663b6 or al, 0x30 | al |= 0x30; 0x004663b8 mov byte [rbx + 3], al | *((rbx + 3)) = al; 0x004663bb mov rax, rcx | rax = rcx; 0x004663be imul rax, rbp | rax *= rbp; 0x004663c2 shr rax, 0x23 | rax >>= 0x23; 0x004663c6 add eax, eax | eax += eax; 0x004663c8 lea eax, [rax + rax*4] | eax = rax * 5; 0x004663cb sub ecx, eax | ecx -= eax; 0x004663cd or cl, 0x30 | cl |= 0x30; 0x004663d0 mov byte [rbx + 2], cl | *((rbx + 2)) = cl; 0x004663d3 shr rdx, 0x25 | rdx >>= 0x25; 0x004663d7 mov rax, rdx | rax = rdx; 0x004663da imul rax, rbp | rax *= rbp; 0x004663de shr rax, 0x23 | rax >>= 0x23; 0x004663e2 add eax, eax | eax += eax; 0x004663e4 lea eax, [rax + rax*4] | eax = rax * 5; 0x004663e7 sub edx, eax | edx -= eax; 0x004663e9 or dl, 0x30 | dl |= 0x30; 0x004663ec mov byte [rbx + 1], dl | *((rbx + 1)) = dl; 0x004663ef shr rsi, 0x26 | rsi >>= 0x26; 0x004663f3 mov rax, rsi | rax = rsi; 0x004663f6 imul rax, rbp | rax *= rbp; 0x004663fa shr rax, 0x23 | rax >>= 0x23; 0x004663fe add eax, eax | eax += eax; 0x00466400 lea eax, [rax + rax*4] | eax = rax * 5; 0x00466403 sub esi, eax | esi -= eax; 0x00466405 or sil, 0x30 | sil |= 0x30; 0x00466409 mov byte [rbx], sil | *(rbx) = sil; 0x0046640c mov byte [rbx + 4], 0x2d | *((rbx + 4)) = 0x2d; 0x00466410 mov edi, dword [r14] | 0x00466413 call 0x46a2e0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (*(r14), rsi); 0x00466418 mov ecx, eax | ecx = eax; 0x0046641a imul rcx, rbp | rcx *= rbp; 0x0046641e shr rcx, 0x23 | rcx >>= 0x23; 0x00466422 lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00466425 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00466428 sub eax, edx | eax -= edx; 0x0046642a or al, 0x30 | al |= 0x30; 0x0046642c mov byte [rbx + 6], al | *((rbx + 6)) = al; 0x0046642f mov rax, rcx | rax = rcx; 0x00466432 imul rax, rbp | rax *= rbp; 0x00466436 shr rax, 0x23 | rax >>= 0x23; 0x0046643a add eax, eax | eax += eax; 0x0046643c lea eax, [rax + rax*4] | eax = rax * 5; 0x0046643f sub ecx, eax | ecx -= eax; 0x00466441 or cl, 0x30 | cl |= 0x30; 0x00466444 mov byte [rbx + 5], cl | *((rbx + 5)) = cl; 0x00466447 mov byte [rbx + 7], 0x2d | *((rbx + 7)) = 0x2d; 0x0046644b mov edi, dword [r14] | 0x0046644e call 0x46a2a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (*(r14), rsi); 0x00466453 mov ecx, eax | ecx = eax; 0x00466455 imul rcx, rbp | rcx *= rbp; 0x00466459 shr rcx, 0x23 | rcx >>= 0x23; 0x0046645d lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00466460 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00466463 sub eax, edx | eax -= edx; 0x00466465 or al, 0x30 | al |= 0x30; 0x00466467 mov byte [rbx + 9], al | *((rbx + 9)) = al; 0x0046646a mov rax, rcx | rax = rcx; 0x0046646d imul rax, rbp | rax *= rbp; 0x00466471 shr rax, 0x23 | rax >>= 0x23; 0x00466475 add eax, eax | eax += eax; 0x00466477 lea eax, [rax + rax*4] | eax = rax * 5; 0x0046647a sub ecx, eax | ecx -= eax; 0x0046647c or cl, 0x30 | cl |= 0x30; 0x0046647f mov byte [rbx + 8], cl | *((rbx + 8)) = cl; 0x00466482 mov byte [rbx + 0xa], 0 | *((rbx + 0xa)) = 0; 0x00466486 jmp 0x4665a2 | | } else { 0x0046648b mov r15d, esi | r15d = esi; 0x0046648e mov edi, dword [r14] | 0x00466491 call 0x46a320 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(r14), rsi); 0x00466496 mov ecx, eax | ecx = eax; 0x00466498 mov ebp, 0xcccccccd | 0x0046649d imul rdx, rcx, 0x51eb851f | rdx = rcx * 0x51eb851f; 0x004664a4 imul rsi, rcx, 0x10624dd3 | rsi = rcx * 0x10624dd3; 0x004664ab imul rcx, rbp | rcx *= rbp; 0x004664af shr rcx, 0x23 | rcx >>= 0x23; 0x004664b3 lea edi, [rcx + rcx] | edi = rcx + rcx; 0x004664b6 lea edi, [rdi + rdi*4] | edi = rdi * 5; 0x004664b9 sub eax, edi | eax -= edi; 0x004664bb or al, 0x30 | al |= 0x30; 0x004664bd mov byte [rsp + 0x11], al | *((rsp + 0x11)) = al; 0x004664c1 mov rax, rcx | rax = rcx; 0x004664c4 imul rax, rbp | rax *= rbp; 0x004664c8 shr rax, 0x23 | rax >>= 0x23; 0x004664cc add eax, eax | eax += eax; 0x004664ce lea eax, [rax + rax*4] | eax = rax * 5; 0x004664d1 sub ecx, eax | ecx -= eax; 0x004664d3 or cl, 0x30 | cl |= 0x30; 0x004664d6 mov byte [rsp + 0x10], cl | *((rsp + 0x10)) = cl; 0x004664da shr rdx, 0x25 | rdx >>= 0x25; 0x004664de mov rax, rdx | rax = rdx; 0x004664e1 imul rax, rbp | rax *= rbp; 0x004664e5 shr rax, 0x23 | rax >>= 0x23; 0x004664e9 add eax, eax | eax += eax; 0x004664eb lea eax, [rax + rax*4] | eax = rax * 5; 0x004664ee sub edx, eax | edx -= eax; 0x004664f0 or dl, 0x30 | dl |= 0x30; 0x004664f3 mov byte [rsp + 0xf], dl | *((rsp + 0xf)) = dl; 0x004664f7 shr rsi, 0x26 | rsi >>= 0x26; 0x004664fb mov rax, rsi | rax = rsi; 0x004664fe imul rax, rbp | rax *= rbp; 0x00466502 shr rax, 0x23 | rax >>= 0x23; 0x00466506 add eax, eax | eax += eax; 0x00466508 lea eax, [rax + rax*4] | eax = rax * 5; 0x0046650b sub esi, eax | esi -= eax; 0x0046650d or sil, 0x30 | sil |= 0x30; 0x00466511 mov byte [rsp + 0xe], sil | *((rsp + 0xe)) = sil; 0x00466516 mov byte [rsp + 0x12], 0x2d | *((rsp + 0x12)) = 0x2d; 0x0046651b mov edi, dword [r14] | 0x0046651e call 0x46a2e0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (*(r14), rsi); 0x00466523 mov ecx, eax | ecx = eax; 0x00466525 imul rcx, rbp | rcx *= rbp; 0x00466529 shr rcx, 0x23 | rcx >>= 0x23; 0x0046652d lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00466530 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00466533 sub eax, edx | eax -= edx; 0x00466535 or al, 0x30 | al |= 0x30; 0x00466537 mov byte [rsp + 0x14], al | *((rsp + 0x14)) = al; 0x0046653b mov rax, rcx | rax = rcx; 0x0046653e imul rax, rbp | rax *= rbp; 0x00466542 shr rax, 0x23 | rax >>= 0x23; 0x00466546 add eax, eax | eax += eax; 0x00466548 lea eax, [rax + rax*4] | eax = rax * 5; 0x0046654b sub ecx, eax | ecx -= eax; 0x0046654d or cl, 0x30 | cl |= 0x30; 0x00466550 mov byte [rsp + 0x13], cl | *((rsp + 0x13)) = cl; 0x00466554 mov byte [rsp + 0x15], 0x2d | *((rsp + 0x15)) = 0x2d; 0x00466559 mov edi, dword [r14] | 0x0046655c call 0x46a2a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (*(r14), rsi); 0x00466561 mov ecx, eax | ecx = eax; 0x00466563 imul rcx, rbp | rcx *= rbp; 0x00466567 shr rcx, 0x23 | rcx >>= 0x23; 0x0046656b lea edx, [rcx + rcx] | edx = rcx + rcx; 0x0046656e lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00466571 sub eax, edx | eax -= edx; 0x00466573 or al, 0x30 | al |= 0x30; 0x00466575 mov byte [rsp + 0x17], al | *((rsp + 0x17)) = al; 0x00466579 mov rax, rcx | rax = rcx; 0x0046657c imul rax, rbp | rax *= rbp; 0x00466580 shr rax, 0x23 | rax >>= 0x23; 0x00466584 add eax, eax | eax += eax; 0x00466586 lea eax, [rax + rax*4] | eax = rax * 5; 0x00466589 sub ecx, eax | ecx -= eax; 0x0046658b or cl, 0x30 | cl |= 0x30; 0x0046658e mov byte [rsp + 0x16], cl | *((rsp + 0x16)) = cl; 0x00466592 mov edx, r15d | 0x00466595 lea rsi, [rsp + 0xe] | 0x0046659a mov rdi, rbx | 0x0046659d call 0x404980 | memcpy (rbx, rsp + 0xe, r15d); | } 0x004665a2 mov eax, 0xa | eax = 0xa; 0x004665a7 add rsp, 0x18 | 0x004665ab pop rbx | 0x004665ac pop r14 | 0x004665ae pop r15 | 0x004665b0 pop rbp | 0x004665b1 ret | return rax; | }