Function at 0x479780
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x40]
xor edx, edx
movq xmm1, qword [esp + 0x38]
mov ecx, eax
neg ecx
mov dword [esp + 0x18], eax
push esi
mov eax, ecx
mov dword [esp + 0x14], ecx
bts edx, eax
mov dword [esp + 0x30], 1
xor esi, esi
movd xmm0, ecx
cmp eax, 0x20
mov dword [esp + 0x34], 0
push edi
cmovae esi, edx
xor edx, esi
cmp eax, 0x40
mov eax, edx
mov dword [esp + 8], edx
cmovae esi, edx
add eax, 0xffffffff
mov edi, eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0xc], esi
push eax
lea eax, [esp + 0x2c]
mov edx, esi
push eax
mov eax, dword [esp + 0x28]
adc edx, 0xffffffff
and edi, dword [esp + 0x48]
add eax, 0x40
psrlq xmm1, xmm0
mov dword [esp + 0x18], edx
and edx, dword [esp + 0x4c]
movd ecx, xmm1
push eax
mov dword [esp + 0x30], edi
push ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], edx
call fcn.00478a90
mov ecx, dword [esp + 0x70]
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x50]
mov dword [ecx], eax
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov dword [ecx], 0
cmp dword [eax], 0
jle 0x47996c
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
xor edx, edx
div edi
mov edx, dword [ecx]
mov ecx, dword [esp + 0x54]
add al, 0x30
mov byte [ecx + edx], al
xor edx, edx
mov eax, dword [esp + 0x30]
div edi
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x60]
inc dword [ecx]
mov eax, dword [edx]
dec eax
mov dword [esp + 0x50], eax
mov dword [edx], eax
sub esi, 1
je 0x47997a
mov eax, 0xcccccccd
mul edi
mov edi, edx
shr edi, 3
cmp dword [esp + 0x50], 0
jg 0x479842
mov edi, dword [esp + 0x24]
test esi, esi
jle 0x4799c5
mov edx, dword [esp + 0x2c]
cmp edx, dword [esp + 0x38]
jb 0x4799c5
ja 0x4798b6
cmp edi, dword [esp + 0x34]
jbe 0x4799c5
mov eax, edi
mov ecx, edx
shld ecx, eax, 2
shl eax, 2
add edi, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x34], eax
adc edx, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x38], ecx
shld ecx, eax, 2
shld edx, edi, 1
shl eax, 2
add edi, edi
mov dword [esp + 0x2c], edx
add dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
adc dword [esp + 0x38], ecx
shld dword [esp + 0x38], eax, 1
mov ecx, dword [esp + 0x20]
add eax, eax
neg ecx
mov dword [esp + 0x34], eax
mov eax, edi
call fcn.004891f0
mov edx, dword [esp + 0x5c]
add al, 0x30
mov ecx, dword [esp + 0x54]
dec esi
and edi, dword [esp + 0x14]
mov edx, dword [edx]
mov byte [ecx + edx], al
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x2c]
and edx, dword [esp + 0x10]
inc dword [ecx]
dec dword [eax]
test esi, esi
jg 0x4798a0
jne 0x4799c5
push eax
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [esp + 0x18]
push dword [esp + 0x18]
push edx
push edi
push dword [ecx]
push dword [esp + 0x78]
push dword [esp + 0x78]
call fcn.0047be80
add esp, 0x28
pop edi
pop esi
add esp, 0x34
ret
test esi, esi
jne 0x479896
mov edi, dword [esp + 0x28]
jmp 0x47997c
mov eax, edx
mov ecx, dword [esp + 0x18]
xor edx, edx
push eax
push 0
push 1
mov eax, edi
call fcn.00489100
mov ecx, dword [esp + 0x24]
push edx
push eax
mov eax, dword [esp + 0x44]
xor edx, edx
call fcn.00489100
add eax, dword [esp + 0x38]
adc edx, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x74]
push eax
push dword [edx]
push dword [esp + 0x78]
push dword [esp + 0x78]
call fcn.0047be80
add esp, 0x28
pop edi
pop esi
add esp, 0x34
ret
pop edi
xor al, al
pop esi
add esp, 0x34
ret