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

Disassembly:
sub esp, 0x98
mov eax, dword [0x572844]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x9c]
push ebx
cdq
mov ebx, ecx
xor eax, edx
mov dword [esp + 0x10], ebx
push ebp
sub eax, edx
mov dword [ebx + 0x40], eax
push esi
push edi
cmp eax, 0x3e8
jbe 0x49793b
push eax
push str._rr_u
lea eax, [esp + 0x84]
push 0x14
push eax
call fcn.00402c90
xor eax, eax
mov dword [esp + 0x48], 0x54266c
add esp, 0x10
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x3c], 0x54266c
mov dword [esp + 0x40], 0x54266c
mov dword [esp + 0x44], 0x54266c
mov dword [esp + 0x48], 0x54266c
mov dword [esp + 0x4c], 0x54266c
mov dword [esp + 0x78], 0x64
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], str.1000
mov dword [esp + 0x70], 2
call fcn.004b2040
mov dword [ebx + 0x40], 0xc8
mov eax, 0xc8
mov edx, dword [esp + 0xb0]
lea ebp, [eax + eax]
mov eax, edx
mov dword [ebx + 0x24], 0xc8
and eax, 0x3ff
mov dword [esp + 0x10], ebp
or eax, 0
mov dword [ebx + 0x28], ebp
je 0x497966
mov eax, 1
jmp 0x497968
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov edi, edx
shrd edi, ecx, 0xa
shr ecx, 0xa
add edi, eax
mov eax, edi
adc ecx, 0
or eax, ecx
jne 0x49798a
lea edi, [eax + 1]
xor ecx, ecx
jmp 0x4979a1
mov esi, 0xc8
test ecx, ecx
ja 0x497a65
jb 0x4979a1
cmp edi, esi
jae 0x497a65
mov eax, ecx
mov edx, edi
mov dword [ebx + 0x24], edx
mov dword [esp + 0x14], edx
mul ebp
mov ebx, eax
mov eax, edi
mul ebp
mov ebp, 0x47ae147a
add ebx, edx
mov ecx, eax
mov edx, 0xe147ae15
mov dword [esp + 0x18], ecx
mul edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], eax
mov esi, edx
mov eax, ecx
mov ecx, 0xe147ae15
mul ebp
mov edi, eax
mov ebp, edx
mov eax, ebx
mul ecx
mov ecx, eax
mov ebx, edx
mov eax, dword [esp + 0x10]
mov edx, 0x47ae147a
mul edx
add ecx, esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x20], eax
adc ebx, 0
add edi, ecx
mov ecx, dword [esp + 0x20]
adc ebp, 0
mov dword [esp + 0x28], edi
xor eax, eax
add ebx, ebp
adc eax, eax
add ecx, ebx
mov ebx, dword [esp + 0x18]
adc edx, eax
mov eax, dword [esp + 0x10]
sub ebx, ecx
sbb eax, edx
shrd ebx, eax, 1
shr eax, 1
add ebx, ecx
adc eax, edx
shrd ebx, eax, 7
mov eax, 0xcccccccd
shl ebx, 2
mul ebx
mov ebx, dword [esp + 0x1c]
mov ebp, edx
mov edx, dword [esp + 0xb0]
shr ebp, 2
mov dword [esp + 0x10], ebp
mov dword [ebx + 0x28], ebp
test ebp, ebp
jne 0x497a65
mov ebp, 1
mov dword [ebx + 0x28], 1
mov dword [esp + 0x10], ebp
lea eax, [esi + esi*4]
add eax, eax
cmp ebp, eax
jbe 0x497a77
mov ebp, eax
mov dword [ebx + 0x28], eax
mov dword [esp + 0x10], ebp
mov edi, dword [esp + 0xb4]
lea eax, [esi + ebp]
push 0
push esi
push edi
push edx
mov dword [ebx + 0x2c], eax
call fcn.0051e380
or eax, edx
je 0x497a99
mov ebp, 1
jmp 0x497a9b
xor ebp, ebp
push 0
push esi
push edi
push dword [esp + 0xbc]
call fcn.0051e0c0
add eax, ebp
mov ecx, 0
mov ebp, eax
adc edx, 0
and ebp, 1
add ebp, eax
mov eax, 0x10000000
mov dword [ebx + 0x30], ebp
adc ecx, edx
xor edx, edx
div dword [esp + 0x10]
mov edx, ebp
mov dword [esp + 0x14], ecx
add edx, 0x10000
mov dword [ebx + 0x34], ecx
adc ecx, 0
xor edi, edi
cmp edi, ecx
jb 0x497af0
ja 0x497aea
cmp eax, edx
jbe 0x497af0
lea eax, [ebp + 0x10000]
and eax, 0xffff0000
mov dword [ebx], eax
cmp eax, 0x10000
jae 0x497b04
mov dword [ebx], 0x10000
movzx eax, bp
or eax, 0
je 0x497b13
mov ecx, 1
jmp 0x497b15
xor ecx, ecx
mov eax, dword [esp + 0x14]
mov edi, ebp
shrd edi, eax, 0x10
shr eax, 0x10
add edi, ecx
lea ecx, [esi*8 + 0x48]
mov dword [ebx + 0x50], edi
adc eax, 0
mov dword [ebx + 0x54], eax
mul ecx
mov esi, eax
mov eax, edi
mul ecx
mov ecx, dword [esp + 0xa4]
add esi, edx
add eax, ebp
pop edi
adc esi, dword [esp + 0x10]
mov dword [ebx + 0x4c], esi
pop esi
pop ebp
mov dword [ebx + 0x48], eax
pop ebx
xor ecx, esp
call fcn.0051dca8
add esp, 0x98
ret 0xc