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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x94
movsx eax, byte [ecx + 0x424]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
call fcn.004967dc
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x400]
movzx ecx, word [eax + 0x390]
mov word [esp + 0x30], cx
movzx ebx, word [eax + 0x392]
mov word [esp + 0x32], bx
movzx ebp, word [eax + 0x394]
mov word [esp + 0x34], bp
movzx esi, word [eax + 0x396]
mov word [esp + 0x36], si
movzx edi, word [eax + 0x398]
mov word [esp + 0x38], di
movzx ecx, word [eax + 0x39a]
mov word [esp + 0x3a], cx
movzx ecx, word [eax + 0x39c]
mov word [esp + 0x3c], cx
movzx ecx, word [eax + 0x39e]
mov word [esp + 0x3e], cx
mov ecx, dword [eax + 0x3a0]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 0x3a4]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 0x3a8]
mov dword [esp + 0x48], ecx
mov ecx, dword [eax + 0x3ac]
mov dword [esp + 0x4c], ecx
mov ecx, dword [eax + 0x3b0]
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + 0x3b4]
mov dword [esp + 0x54], ecx
mov ecx, dword [eax + 0x3b8]
mov dword [esp + 0x58], ecx
mov ecx, dword [eax + 0x3bc]
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + 0x3c0]
mov dword [esp + 0x60], ecx
mov ecx, dword [eax + 0x3c4]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 0x3c8]
mov dword [esp + 0x68], ecx
movzx ecx, word [eax + 0x3cc]
mov word [esp + 0x6c], cx
movzx eax, word [eax + 0x3ce]
mov word [esp + 0x6e], ax
xor eax, eax
mov dword [esp + 0x70], edx
mov ecx, dword [edx + 0x580]
mov dword [esp + 0x74], ecx
mov ebx, dword [edx + 0x584]
mov dword [esp + 0x78], ebx
mov edx, dword [edx + 0x588]
mov dword [esp + 0x7c], edx
mov word [esp + 0x38], ax
mov dword [esp + 0x80], 0
xor eax, eax
mov dword [esp + 0x84], 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x88], 0
mov dword [esp + 0x48], edx
mov dword [esp + 0x14], eax
call fcn.0048e12c
test eax, eax
jne 0x4964f6
mov eax, 0x12
mov dword [esp + 8], eax
jmp 0x4964ff
mov eax, 0x24
mov dword [esp + 8], eax
mov edx, eax
mov ebx, 1
xor ebp, ebp
mov eax, 3
cmp edx, 1
jle 0x49651e
add ebx, eax
add eax, 3
add ebp, 1
cmp edx, ebx
jg 0x496512
lea eax, [ebx + ebx]
add eax, eax
lea edx, [eax + eax]
add edx, eax
push edx
call 0x8581c5
mov dword [esp + 0x10], eax
add esp, 4
mov dword [eax], 0
cmp ebx, 1
mov dword [eax + 4], 0
mov dword [eax + 8], 0
jle 0x49661e
test ebp, ebp
jle 0x49661e
mov dword [esp], ebp
fild dword [esp]
fdivr dword [0x90269c]
fst dword [esp + 0x20]
mov dword [esp + 0x1c], ebx
fstp dword [esp + 0x28]
xor ecx, ecx
mov edi, 0x5555
mov esi, 1
mov ebp, 0xc
lea edx, [ebx + ebx]
add edx, edx
lea eax, [edx + edx]
add eax, edx
mov dword [esp + 0x24], eax
mov ebx, ecx
mov ecx, ebx
call 0x82dcbc
fmul dword [esp + 0x28]
mov edx, dword [esp + 0xc]
fstp dword [ebp + edx]
mov ecx, ebx
mov dword [ebp + edx + 4], 0
call 0x82ddd8
fmul dword [esp + 0x28]
mov edx, dword [esp + 0xc]
fstp dword [ebp + edx + 8]
add ebp, 0xc
mov edx, dword [esp + 0x24]
cmp ebp, edx
jge 0x49661a
add ebx, edi
mov edx, edi
shr edx, 0x1f
add edx, edi
sar edx, 1
neg edx
add edx, 0x10000
cmp ebx, edx
jle 0x496593
fld dword [esp + 0x28]
fadd dword [esp + 0x20]
fstp dword [esp + 0x28]
mov eax, 0x10000
add esi, 1
lea ecx, [esi + esi]
add ecx, esi
xor edx, edx
idiv ecx
xor ebx, ebx
test esi, 1
mov edi, eax
je 0x496593
mov ebx, edi
shr ebx, 0x1f
add ebx, edi
sar ebx, 1
jmp 0x496593
mov ebx, dword [esp + 0x1c]
mov edx, ebx
shr edx, 0x1f
add edx, ebx
sar edx, 1
cmp edx, 1
jle 0x4966dd
xor eax, eax
test edx, edx
jle 0x4966dd
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
push eax
call fcn.0048e52c
mov ebx, eax
push ebx
call fcn.0048e52c
mov dword [esp + 0x20], eax
add esp, 8
mov eax, ebx
cdq
mov ebx, dword [esp + 0x1c]
idiv ebx
mov ecx, edx
mov eax, dword [esp + 0x18]
cdq
idiv ebx
cmp ecx, edx
jne 0x496684
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x1c]
lea eax, [ebx + edx + 1]
cdq
idiv ebp
mov edi, dword [esp + 0xc]
add ecx, ecx
add ecx, ecx
lea eax, [ecx + ecx]
add eax, ecx
mov ecx, dword [eax + edi]
mov ebx, dword [eax + edi + 4]
mov ebp, dword [eax + edi + 8]
add edx, edx
add edx, edx
lea esi, [edx + edx]
add esi, edx
mov edx, dword [esi + edi]
mov dword [eax + edi], edx
mov edx, dword [esi + edi + 4]
mov dword [eax + edi + 4], edx
mov edx, dword [esi + edi + 8]
mov dword [eax + edi + 8], edx
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov dword [esi + edi], ecx
mov dword [esi + edi + 4], ebx
add eax, 1
cmp eax, edx
mov dword [esi + edi + 8], ebp
mov dword [esp + 0x2c], eax
jl 0x496646
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 8]
mov dword [esi + 0x4e8], 0
xor esi, esi
test eax, eax
jle 0x49679e
mov edi, dword [esp + 0x18]
mov ebp, esi
shl ebp, 0x10
lea eax, [esi + esi]
add eax, eax
lea ebx, [eax + eax]
add ebx, eax
add ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
mov edx, dword [ebx]
mov dword [esp + 0x80], edx
mov ecx, dword [ebx + 4]
mov dword [esp + 0x84], ecx
mov edx, dword [ebx + 8]
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], eax
push edi
call fcn.0048e52c
mov edi, eax
add esp, 4
mov dword [esp + 0x90], edi
lea ecx, [esp + 0x30]
lea edx, [esp + 0x36]
push edx
push ecx
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x400]
call fcn.0048d67c
test eax, eax
je 0x49679e
lea edx, [esp + 0x30]
push edx
call fcn.0048c4dc
pop ecx
test eax, eax
je 0x49679e
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 8]
add dword [edx + 0x4e8], 1
add ebx, 0xc
add ebp, 0x10000
add esi, 1
mov eax, ebp
cdq
idiv ecx
cmp esi, ecx
jl 0x496714
mov eax, dword [esp + 0xc]
push eax
call 0x857e98
pop ecx
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x4e8]
test edx, edx
jle 0x4967ce
mov edx, eax
add edx, 0x38
xor eax, eax
push eax
push eax
push edx
push 0x3cf
call 0x814298
add esp, 0x10
add esp, 0x94
pop ebx
pop ebp
pop esi
pop edi
ret