; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/none @ 0x4662f0 */ | #include | ; (fcn) method.BloombergLP::bdlt::Iso8601Util.generate_char__int__BloombergLP::bdlt::Date_const__BloombergLP::bdlt::Iso8601UtilConfiguration_const_ () | int64_t method_BloombergLP::bdlt::Iso8601Util_generate_char_int_BloombergLP::bdlt::Date_const_BloombergLP::bdlt::Iso8601UtilConfiguration_const_ (int64_t arg3, signed int64_t arg2, int64_t arg1) { | void * s2; | int64_t var_7h; | int64_t var_8h; | int64_t var_9h; | int64_t var_ah; | int64_t var_bh; | int64_t var_ch; | int64_t var_dh; | int64_t var_eh; | int64_t var_fh; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlt::Iso8601Util::generate(char*, int, BloombergLP::bdlt::Date const&, BloombergLP::bdlt::Iso8601UtilConfiguration const&) */ 0x004662f0 push rbp | 0x004662f1 push r14 | 0x004662f3 push rbx | 0x004662f4 sub rsp, 0x10 | 0x004662f8 mov r14, rdx | r14 = rdx; 0x004662fb mov rbx, rdi | rbx = rdi; 0x004662fe cmp esi, 0xb | | if (esi >= 0xb) { 0x00466301 jl 0x466470 | 0x00466307 mov edi, dword [r14] | 0x0046630a call 0x46a6a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(r14), rsi); 0x0046630f movsxd rcx, eax | rcx = (int64_t) eax; 0x00466312 imul rax, rcx, 0x66666667 | rax = rcx * 0x66666667; 0x00466319 mov rdx, rax | rdx = rax; 0x0046631c shr rdx, 0x3f | rdx >>= 0x3f; 0x00466320 sar rax, 0x22 | rax >>= 0x22; 0x00466324 add eax, edx | eax += edx; 0x00466326 lea edx, [rax + rax] | edx = rax + rax; 0x00466329 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x0046632c imul rsi, rcx, 0x51eb851f | rsi = rcx * 0x51eb851f; 0x00466333 imul rdi, rcx, 0x10624dd3 | rdi = rcx * 0x10624dd3; 0x0046633a sub ecx, edx | ecx -= edx; 0x0046633c add cl, 0x30 | cl += 0x30; 0x0046633f mov byte [rbx + 3], cl | *((rbx + 3)) = cl; 0x00466342 cdqe | rax = (int64_t) eax; 0x00466344 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046634b mov rdx, rcx | rdx = rcx; 0x0046634e shr rdx, 0x3f | rdx >>= 0x3f; 0x00466352 shr rcx, 0x22 | rcx >>= 0x22; 0x00466356 add ecx, edx | ecx += edx; 0x00466358 add ecx, ecx | ecx += ecx; 0x0046635a lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x0046635d sub eax, ecx | eax -= ecx; 0x0046635f add al, 0x30 | al += 0x30; 0x00466361 mov byte [rbx + 2], al | *((rbx + 2)) = al; 0x00466364 mov rax, rsi | rax = rsi; 0x00466367 shr rax, 0x3f | rax >>= 0x3f; 0x0046636b sar rsi, 0x25 | rsi >>= 0x25; 0x0046636f add esi, eax | esi += eax; 0x00466371 movsxd rax, esi | rax = (int64_t) esi; 0x00466374 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046637b mov rdx, rcx | rdx = rcx; 0x0046637e shr rdx, 0x3f | rdx >>= 0x3f; 0x00466382 shr rcx, 0x22 | rcx >>= 0x22; 0x00466386 add ecx, edx | ecx += edx; 0x00466388 add ecx, ecx | ecx += ecx; 0x0046638a lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x0046638d sub eax, ecx | eax -= ecx; 0x0046638f add al, 0x30 | al += 0x30; 0x00466391 mov byte [rbx + 1], al | *((rbx + 1)) = al; 0x00466394 mov rax, rdi | rax = rdi; 0x00466397 shr rax, 0x3f | rax >>= 0x3f; 0x0046639b sar rdi, 0x26 | rdi >>= 0x26; 0x0046639f add edi, eax | edi += eax; 0x004663a1 movsxd rax, edi | rax = (int64_t) edi; 0x004663a4 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004663ab mov rdx, rcx | rdx = rcx; 0x004663ae shr rdx, 0x3f | rdx >>= 0x3f; 0x004663b2 shr rcx, 0x22 | rcx >>= 0x22; 0x004663b6 add ecx, edx | ecx += edx; 0x004663b8 add ecx, ecx | ecx += ecx; 0x004663ba lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004663bd sub eax, ecx | eax -= ecx; 0x004663bf add al, 0x30 | al += 0x30; 0x004663c1 mov byte [rbx], al | *(rbx) = al; 0x004663c3 mov byte [rbx + 4], 0x2d | *((rbx + 4)) = 0x2d; 0x004663c7 mov edi, dword [r14] | 0x004663ca call 0x46a660 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (*(r14), rsi); 0x004663cf cdqe | rax = (int64_t) eax; 0x004663d1 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004663d8 mov rdx, rcx | rdx = rcx; 0x004663db shr rdx, 0x3f | rdx >>= 0x3f; 0x004663df sar rcx, 0x22 | rcx >>= 0x22; 0x004663e3 add ecx, edx | ecx += edx; 0x004663e5 lea edx, [rcx + rcx] | edx = rcx + rcx; 0x004663e8 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x004663eb sub eax, edx | eax -= edx; 0x004663ed add al, 0x30 | al += 0x30; 0x004663ef mov byte [rbx + 6], al | *((rbx + 6)) = al; 0x004663f2 movsxd rax, ecx | rax = (int64_t) ecx; 0x004663f5 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004663fc mov rdx, rcx | rdx = rcx; 0x004663ff shr rdx, 0x3f | rdx >>= 0x3f; 0x00466403 shr rcx, 0x22 | rcx >>= 0x22; 0x00466407 add ecx, edx | ecx += edx; 0x00466409 add ecx, ecx | ecx += ecx; 0x0046640b lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x0046640e sub eax, ecx | eax -= ecx; 0x00466410 add al, 0x30 | al += 0x30; 0x00466412 mov byte [rbx + 5], al | *((rbx + 5)) = al; 0x00466415 mov byte [rbx + 7], 0x2d | *((rbx + 7)) = 0x2d; 0x00466419 mov edi, dword [r14] | 0x0046641c call 0x46a620 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (*(r14), rsi); 0x00466421 cdqe | rax = (int64_t) eax; 0x00466423 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046642a mov rdx, rcx | rdx = rcx; 0x0046642d shr rdx, 0x3f | rdx >>= 0x3f; 0x00466431 sar rcx, 0x22 | rcx >>= 0x22; 0x00466435 add ecx, edx | ecx += edx; 0x00466437 lea edx, [rcx + rcx] | edx = rcx + rcx; 0x0046643a lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x0046643d sub eax, edx | eax -= edx; 0x0046643f add al, 0x30 | al += 0x30; 0x00466441 mov byte [rbx + 9], al | *((rbx + 9)) = al; 0x00466444 movsxd rax, ecx | rax = (int64_t) ecx; 0x00466447 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046644e mov rdx, rcx | rdx = rcx; 0x00466451 shr rdx, 0x3f | rdx >>= 0x3f; 0x00466455 shr rcx, 0x22 | rcx >>= 0x22; 0x00466459 add ecx, edx | ecx += edx; 0x0046645b add ecx, ecx | ecx += ecx; 0x0046645d lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x00466460 sub eax, ecx | eax -= ecx; 0x00466462 add al, 0x30 | al += 0x30; 0x00466464 mov byte [rbx + 8], al | *((rbx + 8)) = al; 0x00466467 mov byte [rbx + 0xa], 0 | *((rbx + 0xa)) = 0; 0x0046646b jmp 0x4665ed | | } else { 0x00466470 mov ebp, esi | 0x00466472 mov edi, dword [r14] | 0x00466475 call 0x46a6a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(r14), rsi); 0x0046647a movsxd rcx, eax | rcx = (int64_t) eax; 0x0046647d imul rax, rcx, 0x66666667 | rax = rcx * 0x66666667; 0x00466484 mov rdx, rax | rdx = rax; 0x00466487 shr rdx, 0x3f | rdx >>= 0x3f; 0x0046648b sar rax, 0x22 | rax >>= 0x22; 0x0046648f add eax, edx | eax += edx; 0x00466491 lea edx, [rax + rax] | edx = rax + rax; 0x00466494 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00466497 imul rsi, rcx, 0x51eb851f | rsi = rcx * 0x51eb851f; 0x0046649e imul rdi, rcx, 0x10624dd3 | rdi = rcx * 0x10624dd3; 0x004664a5 sub ecx, edx | ecx -= edx; 0x004664a7 add cl, 0x30 | cl += 0x30; 0x004664aa mov byte [rsp + 9], cl | *((rsp + 9)) = cl; 0x004664ae cdqe | rax = (int64_t) eax; 0x004664b0 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004664b7 mov rdx, rcx | rdx = rcx; 0x004664ba shr rdx, 0x3f | rdx >>= 0x3f; 0x004664be shr rcx, 0x22 | rcx >>= 0x22; 0x004664c2 add ecx, edx | ecx += edx; 0x004664c4 add ecx, ecx | ecx += ecx; 0x004664c6 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004664c9 sub eax, ecx | eax -= ecx; 0x004664cb add al, 0x30 | al += 0x30; 0x004664cd mov byte [rsp + 8], al | *((rsp + 8)) = al; 0x004664d1 mov rax, rsi | rax = rsi; 0x004664d4 shr rax, 0x3f | rax >>= 0x3f; 0x004664d8 sar rsi, 0x25 | rsi >>= 0x25; 0x004664dc add esi, eax | esi += eax; 0x004664de movsxd rax, esi | rax = (int64_t) esi; 0x004664e1 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004664e8 mov rdx, rcx | rdx = rcx; 0x004664eb shr rdx, 0x3f | rdx >>= 0x3f; 0x004664ef shr rcx, 0x22 | rcx >>= 0x22; 0x004664f3 add ecx, edx | ecx += edx; 0x004664f5 add ecx, ecx | ecx += ecx; 0x004664f7 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004664fa sub eax, ecx | eax -= ecx; 0x004664fc add al, 0x30 | al += 0x30; 0x004664fe mov byte [rsp + 7], al | *((rsp + 7)) = al; 0x00466502 mov rax, rdi | rax = rdi; 0x00466505 shr rax, 0x3f | rax >>= 0x3f; 0x00466509 sar rdi, 0x26 | rdi >>= 0x26; 0x0046650d add edi, eax | edi += eax; 0x0046650f movsxd rax, edi | rax = (int64_t) edi; 0x00466512 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00466519 mov rdx, rcx | rdx = rcx; 0x0046651c shr rdx, 0x3f | rdx >>= 0x3f; 0x00466520 shr rcx, 0x22 | rcx >>= 0x22; 0x00466524 add ecx, edx | ecx += edx; 0x00466526 add ecx, ecx | ecx += ecx; 0x00466528 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x0046652b sub eax, ecx | eax -= ecx; 0x0046652d add al, 0x30 | al += 0x30; 0x0046652f mov byte [rsp + 6], al | *((rsp + 6)) = al; 0x00466533 mov byte [rsp + 0xa], 0x2d | *((rsp + 0xa)) = 0x2d; 0x00466538 mov edi, dword [r14] | 0x0046653b call 0x46a660 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (*(r14), rsi); 0x00466540 cdqe | rax = (int64_t) eax; 0x00466542 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00466549 mov rdx, rcx | rdx = rcx; 0x0046654c shr rdx, 0x3f | rdx >>= 0x3f; 0x00466550 sar rcx, 0x22 | rcx >>= 0x22; 0x00466554 add ecx, edx | ecx += edx; 0x00466556 lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00466559 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x0046655c sub eax, edx | eax -= edx; 0x0046655e add al, 0x30 | al += 0x30; 0x00466560 mov byte [rsp + 0xc], al | *((rsp + 0xc)) = al; 0x00466564 movsxd rax, ecx | rax = (int64_t) ecx; 0x00466567 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046656e mov rdx, rcx | rdx = rcx; 0x00466571 shr rdx, 0x3f | rdx >>= 0x3f; 0x00466575 shr rcx, 0x22 | rcx >>= 0x22; 0x00466579 add ecx, edx | ecx += edx; 0x0046657b add ecx, ecx | ecx += ecx; 0x0046657d lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x00466580 sub eax, ecx | eax -= ecx; 0x00466582 add al, 0x30 | al += 0x30; 0x00466584 mov byte [rsp + 0xb], al | *((rsp + 0xb)) = al; 0x00466588 mov byte [rsp + 0xd], 0x2d | *((rsp + 0xd)) = 0x2d; 0x0046658d mov edi, dword [r14] | 0x00466590 call 0x46a620 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (*(r14), rsi); 0x00466595 cdqe | rax = (int64_t) eax; 0x00466597 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x0046659e mov rdx, rcx | rdx = rcx; 0x004665a1 shr rdx, 0x3f | rdx >>= 0x3f; 0x004665a5 sar rcx, 0x22 | rcx >>= 0x22; 0x004665a9 add ecx, edx | ecx += edx; 0x004665ab lea edx, [rcx + rcx] | edx = rcx + rcx; 0x004665ae lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x004665b1 sub eax, edx | eax -= edx; 0x004665b3 add al, 0x30 | al += 0x30; 0x004665b5 mov byte [rsp + 0xf], al | *((rsp + 0xf)) = al; 0x004665b9 movsxd rax, ecx | rax = (int64_t) ecx; 0x004665bc imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004665c3 mov rdx, rcx | 0x004665c6 shr rdx, 0x3f | rdx >>= 0x3f; 0x004665ca shr rcx, 0x22 | rcx >>= 0x22; 0x004665ce add ecx, edx | ecx += edx; 0x004665d0 add ecx, ecx | ecx += ecx; 0x004665d2 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004665d5 sub eax, ecx | eax -= ecx; 0x004665d7 add al, 0x30 | al += 0x30; 0x004665d9 mov byte [rsp + 0xe], al | *((rsp + 0xe)) = al; 0x004665dd movsxd rdx, ebp | rdx = (int64_t) ebp; 0x004665e0 lea rsi, [rsp + 6] | 0x004665e5 mov rdi, rbx | 0x004665e8 call 0x404980 | memcpy (rbx, rsp + 6, rcx); | } 0x004665ed mov eax, 0xa | eax = 0xa; 0x004665f2 add rsp, 0x10 | 0x004665f6 pop rbx | 0x004665f7 pop r14 | 0x004665f9 pop rbp | 0x004665fa ret | return rax; | }