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

Disassembly:
sub esp, 0xa4
xor eax, eax
mov dword [esp + 0x14], 0
push ebp
xor ebp, ebp
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x70], ebp
mov dword [esp + 0x30], 0x7fffffff
test eax, eax
je 0x487465
cmp dword [esp + 0xb8], ebp
je 0x487465
cmp dword [eax + 0x20], 3
je 0x487472
mov eax, 6
pop ebp
add esp, 0xa4
ret
mov ebp, dword [eax + 4]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
push ebx
mov ebx, dword [eax]
push esi
mov esi, dword [eax + 0x10]
push edi
mov edi, dword [eax + 0x14]
mov eax, esi
sub eax, ecx
mov dword [esp + 0x60], ebp
mov ebp, dword [esp + 0xb8]
mov dword [esp + 0x80], ebx
mov dword [esp + 0x6c], 5
lea eax, [eax + eax*2]
sub eax, ebx
add eax, dword [ebp + 8]
mov dword [esp + 0x2c], eax
mov eax, edi
sub eax, edx
lea eax, [eax + eax*2]
add eax, dword [ebp + 0xc]
mov ebp, dword [esp + 0x60]
sub eax, ebp
mov dword [esp + 0x30], eax
lea eax, [esi + esi]
sub ecx, eax
sub esi, ebx
lea eax, [edi + edi]
add ecx, ebx
sub edx, eax
sub edi, ebp
add edx, ebp
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x48], ecx
add ecx, ecx
lea eax, [edx + edx*2]
mov dword [esp + 0x14], ecx
lea edx, [esi + esi*2]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], edx
add eax, eax
lea edx, [edi + edi*2]
mov dword [esp + 0x20], eax
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0xbc]
shl edx, 0xa
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0xc0]
shl edx, 0xa
xor eax, eax
mov dword [esp + 0x74], edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x64], 0
nop dword [eax]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0xa4], eax
mov ebx, dword [esp + 0xa4]
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x34]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0xa0], eax
mov esi, dword [esp + 0xa0]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x9c], eax
mov ebp, dword [esp + 0x9c]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x34]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0xb0], eax
mov edi, dword [esp + 0xb0]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0xac]
add ecx, esi
mov esi, dword [esp + 0x84]
add esi, edi
add ecx, ebx
add ecx, dword [esp + 0x80]
add esi, ebp
add esi, dword [esp + 0x60]
shl esi, 0xa
mov eax, esi
shl ecx, 0xa
sub eax, dword [esp + 0x74]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x10], ecx
sub ecx, dword [esp + 0x78]
push eax
mov dword [esp + 0x54], ecx
call fcn.0040169a
mov edi, dword [esp + 0x1c]
add esp, 4
cmp eax, dword [esp + 0x3c]
jge 0x487714
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x7c], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0x38]
lea ebx, [eax + eax*2]
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x88], eax
mov esi, dword [esp + 0x88]
add edi, edi
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x8c], eax
mov ebp, dword [esp + 0x8c]
add ebp, esi
mov dword [esp + 0x10], ebx
add ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x90], eax
mov esi, dword [esp + 0x90]
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x94]
add ebx, esi
add ebx, dword [esp + 0x44]
lea esi, [eax + eax*2]
add esi, esi
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x50]
cdq
and edx, 0x3ff
lea edi, [edx + eax]
mov eax, dword [esp + 0x54]
cdq
and edx, 0x3ff
sar edi, 0xa
mov dword [esp + 0x50], edi
lea esi, [edx + eax]
mov eax, dword [esp + 0x98]
add eax, dword [esp + 0x20]
sar esi, 0xa
imul eax, esi
mov dword [esp + 0x54], esi
cdq
and edx, 0x3f
lea ecx, [edx + eax]
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x14]
imul eax, edi
sar ecx, 6
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add ecx, eax
mov eax, ebx
imul eax, ebx
imul ebx, esi
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add ecx, eax
mov eax, ebp
imul eax, ebp
imul ebp, edi
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add ecx, eax
mov eax, ebx
cdq
and edx, 0x3f
push ecx
lea ecx, [edx + eax]
mov eax, ebp
cdq
and edx, 0x3f
sar ecx, 6
add eax, edx
sar eax, 6
add ecx, eax
push ecx
call fcn.00401c08
mov ecx, dword [esp + 0x20]
add esp, 8
sub ecx, eax
mov dword [esp + 0x18], ecx
cmp ecx, 0x10000
ja 0x48791f
mov eax, dword [esp + 0x64]
inc eax
mov dword [esp + 0x64], eax
cmp ax, 4
jb 0x487530
mov eax, dword [esp + 0x68]
add eax, 0x4000
sub dword [esp + 0x6c], 1
mov dword [esp + 0x68], eax
jne 0x487520
mov eax, dword [esp + 0x70]
lea ebx, [eax + eax*2]
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x1c]
lea edi, [ebp*2]
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
add eax, esi
mov dword [esp + 0x14], ebx
add eax, dword [esp + 0x40]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x78]
add eax, esi
add eax, dword [esp + 0x44]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x24]
sub eax, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x5c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x74]
sub eax, edi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x58]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x20], eax
sub esi, dword [esp + 0x20]
mov edx, dword [esp + 0xc4]
mov eax, dword [esp + 0x3c]
sets cl
mov dword [edx], eax
lea ecx, [ecx*2 - 1]
mov byte [edx + 8], cl
test ebp, ebp
je 0x487abf
cmp ebp, 0x10000
je 0x487abf
pop edi
pop esi
pop ebx
mov dword [edx + 4], 0x10000
xor eax, eax
pop ebp
add esp, 0xa4
ret
sub dword [esp + 0x24], ebx
lea eax, [esp + 0x58]
sub dword [esp + 0x28], edi
push eax
call fcn.00402162
lea eax, [esp + 0x28]
push eax
call fcn.00402162
add esp, 8
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x28]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x24]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0xc4]
sub esi, dword [esp + 0x1c]
xor eax, eax
pop edi
mov dword [ecx + 4], esi
pop esi
pop ebx
pop ebp
add esp, 0xa4
ret