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

Disassembly:
sub esp, 0xf0
push ebx
push ebp
mov ebp, dword [esp + 0xfc]
push esi
push edi
xor ebx, ebx
mov eax, dword [ebp]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 4]
mov dword [esp + 0x64], eax
mov eax, dword [edx + 0x2c]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], eax
lea edi, [ebp + 0x38]
mov ecx, 0xa
xor eax, eax
mov dword [esp + 0x78], edi
mov dword [esp + 0x8c], 0xffffffff
rep stosd dword es:[edi], eax
mov dword [ebp + 0x50], 0xa2879f2e
mov dword [ebp + 0x54], 0x547d42ae
mov cl, byte [edx + 0x20]
mov eax, dword [edx + 0x44]
not cl
and ecx, 0xff
mov dword [esp + 0x74], edx
and ecx, 8
mov esi, 1
shl ecx, 4
or ecx, 3
cmp eax, ebx
mov dword [esp + 0x80], ecx
je 0x48790a
mov edx, eax
mov dword [esp + 0x7c], 0xffffcfff
mov dword [esp + 0x5c], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x70], ecx
jmp 0x487996
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0xd0]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x8c]
lea eax, [esp + 0xb8]
mov dword [esp + 0xf4], esi
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], eax
mov byte [esp + 0xfc], 5
mov ecx, dword [edx + 0x10]
mov dword [esp + 0xdc], ecx
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 0x1c]
mov dword [esp + 0xbc], esi
mov dword [esp + 0xb8], ecx
mov al, byte [edx + 0x24]
test al, 1
jne 0x487977
mov edx, dword [edx + 0x10]
mov eax, dword [edx + 8]
mov dword [esp + 0xe4], eax
lea edx, [esp + 0xd0]
mov dword [esp + 0x7c], 0xfff0ffff
mov dword [esp + 0x5c], edx
mov dword [esp + 0x70], 3
mov dword [esp + 0x14], ebx
mov eax, dword [ebp + 0x20]
cmp eax, ebx
je 0x4879a1
mov ecx, dword [eax]
jmp 0x4879a3
xor ecx, ecx
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x68], ecx
cmp eax, ebx
je 0x4879d0
mov edi, dword [ebp + 0x34]
lea esi, [eax + eax*4]
mov byte [esp + 0x12], 0
lea esi, [eax + esi*2]
xor eax, eax
mov ax, word [edi + esi*8 - 0x52]
cmp eax, ecx
mov dword [esp + 0x6c], eax
setl byte [esp + 0x13]
jmp 0x4879e5
mov eax, dword [ebp + 0x24]
cmp ecx, ebx
setg byte [esp + 0x13]
cmp eax, ebx
mov dword [esp + 0x6c], ebx
setne byte [esp + 0x12]
cmp edx, ebx
je 0x4881d7
mov ebx, dword [esp + 0x5c]
mov al, byte [esp + 0x13]
mov byte [esp + 0x19], al
xor eax, eax
mov ecx, dword [ebx + 8]
lea edi, [esp + 0x1c]
mov dword [esp + 0x44], ecx
mov cl, byte [esp + 0x12]
mov byte [esp + 0x1b], cl
mov ecx, 0xa
rep stosd dword es:[edi], eax
mov ax, word [esp + 0x6c]
xor edx, edx
mov word [esp + 0x22], ax
mov eax, dword [ebx + 0x24]
mov esi, 1
mov dword [esp + 0x58], edx
mov dword [esp + 0x84], edx
mov dword [esp + 0x48], edx
mov byte [esp + 0x1a], dl
mov word [esp + 0x20], dx
cmp eax, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x50], esi
mov dword [esp + 0x88], 0x3ff00000
jle 0x487b42
mov edi, dword [esp + 0x70]
mov ecx, dword [ebx + 4]
and edx, 0xffff
mov eax, dword [ecx + edx*4]
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 0x10]
push edi
push ecx
mov ecx, dword [esp + 0x58]
push edx
push eax
mov eax, dword [esp + 0x68]
push eax
push ecx
call fcn.00486b20
add esp, 0x1c
test eax, eax
je 0x487b3e
mov ecx, dword [esp + 0x1c]
or ecx, 0x11000
mov dword [esp + 0x1c], ecx
mov cx, word [eax + 0x10]
test cl, 1
je 0x487afa
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax]
or edx, 0x40000
mov dword [esp + 0x1c], edx
mov dx, word [ecx + 2]
and edx, 0x800
cmp edx, 0x800
jne 0x487ae2
lea ecx, [esi + esi*4]
mov dword [esp + 0x58], 1
lea esi, [ecx + ecx*4]
mov dword [esp + 0x50], esi
jmp 0x487b07
mov ecx, dword [ecx + 0x10]
test ecx, ecx
je 0x487b07
mov ecx, dword [ecx]
test ecx, ecx
je 0x487b07
imul ecx, esi
mov esi, ecx
mov dword [esp + 0x50], esi
jmp 0x487b07
test cl, 0x80
je 0x487b07
or dword [esp + 0x1c], 0x80000
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
mov eax, dword [esp + 0x3c]
or eax, ecx
mov ecx, dword [ebx + 0x24]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
or eax, edx
inc word [esp + 0x20]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, edx
and eax, 0xffff
cmp eax, ecx
jl 0x487a60
jmp 0x487b42
mov edx, dword [esp + 0x20]
mov ecx, dword [ebx + 0x24]
mov eax, edx
and eax, 0xffff
cmp eax, ecx
jne 0x487b9c
cmp byte [ebx + 0x2c], 0
je 0x487b9c
mov eax, dword [esp + 0x1c]
test eax, 0xc0000
jne 0x487cba
mov esi, eax
mov eax, dword [ebp + 0x2c]
or esi, 0x2000000
test eax, eax
mov dword [esp + 0x1c], esi
je 0x487b8f
lea ecx, [eax + eax*4]
lea eax, [eax + ecx*2]
mov ecx, dword [ebp + 0x34]
test dword [ecx + eax*8 - 0x58], 0x4000000
je 0x487cba
or dword [esp + 0x1c], 0x4000000
jmp 0x487cba
cmp byte [ebx + 0x2e], 0
jne 0x487cba
cmp eax, ecx
jne 0x487baf
or edi, 0xffffffff
jmp 0x487bb5
mov edx, dword [ebx + 4]
mov edi, dword [edx + eax*4]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [esp + 0x58]
push 0x3c
push ecx
mov ecx, dword [esp + 0x58]
push edx
push edi
push eax
push ecx
call fcn.00486b20
add esp, 0x1c
test eax, eax
je 0x487cb6
mov edx, dword [esp + 0x14]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [esp + 0x58]
push 0x18
push eax
mov eax, dword [esp + 0x58]
push ecx
push edi
push edx
push eax
call fcn.00486b20
mov ecx, dword [esp + 0x30]
mov edx, dword [ebp + 0x14]
mov esi, eax
mov eax, dword [ebp + 0x10]
push ecx
mov ecx, dword [esp + 0x74]
push 0x24
push edx
mov edx, dword [esp + 0x74]
push eax
push edi
push ecx
push edx
call fcn.00486b20
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x9c]
mov edi, eax
lea eax, [esp + 0xbc]
push eax
push esi
and ecx, 0xffff
push edi
push ecx
push ebx
push edx
call fcn.004884d0
add esp, 0x50
test esi, esi
je 0x487c7a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x3c]
or eax, 0x100000
mov dword [esp + 0x48], 1
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
or edx, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x3c], edx
or eax, ecx
mov dword [esp + 0x40], eax
test edi, edi
je 0x487cae
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x3c]
or eax, 0x200000
inc ecx
mov dword [esp + 0x1c], eax
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x40]
or esi, edx
or ecx, eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], ecx
or dword [esp + 0x1c], 0x22000
mov edx, dword [esp + 0x20]
mov al, byte [esp + 0x13]
test al, al
je 0x487d3b
mov ecx, dword [esp + 0x74]
test byte [ecx + 0x20], 8
jne 0x487d3b
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x60]
push edx
push eax
push ebx
push ebp
mov dword [esp + 0x70], 2
call fcn.00488510
mov ecx, dword [esp + 0x7c]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x32]
add esp, 0x10
and eax, 0xffff
cmp ecx, eax
jl 0x487d08
test dword [esp + 0x1c], 0x2000000
je 0x487d10
or dword [esp + 0x1c], 0x800000
cmp dword [esp + 0x68], eax
jne 0x487d28
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x19], 0
or eax, 0x22000
mov dword [esp + 0x1c], eax
test byte [esp + 0x60], 1
je 0x487d37
or dword [esp + 0x1c], 0x1000000
mov edx, dword [esp + 0x20]
mov al, byte [esp + 0x12]
test al, al
je 0x487d83
mov ecx, dword [ebp + 0x24]
mov eax, dword [esp + 0x4c]
and edx, 0xffff
push edx
mov edx, dword [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x6c]
push edx
push ebx
push eax
push ecx
call fcn.00488230
add esp, 0x18
test eax, eax
je 0x487d83
mov eax, dword [esp + 0x1c]
test eax, 0x40000
jne 0x487d83
or eax, 0x40022000
mov byte [esp + 0x1b], 0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x487de3
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x14]
mov edi, dword [eax + 0x38]
mov ebx, dword [eax + 0x3c]
mov eax, dword [ecx + 0x24]
test eax, eax
jle 0x487dd0
mov esi, dword [ecx + 4]
mov dword [esp + 0x60], eax
mov ecx, dword [esi]
cmp ecx, 0x3f
jge 0x487dc2
mov eax, 1
xor edx, edx
call fcn.004b1760
not eax
not edx
and edi, eax
and ebx, edx
mov eax, dword [esp + 0x60]
add esi, 4
dec eax
mov dword [esp + 0x60], eax
jne 0x487da7
or edi, ebx
jne 0x487dde
or dword [esp + 0x1c], 0x400000
jmp 0x487de3
mov byte [esp + 0x1a], 1
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
and edx, 0xffff
mov dword [esp + 0xc4], 0
lea ecx, [eax + edx*4]
mov eax, dword [esp + 0x58]
mov edx, dword [ecx]
imul edx, dword [esp + 0x50]
mov dword [esp + 0xc0], edx
fild qword [esp + 0xc0]
test eax, eax
fst qword [esp + 0x24]
je 0x487e8d
mov eax, dword [esp + 0x44]
mov dword [esp + 0x94], 0
fld st(0)
mov edx, dword [eax]
fadd st(0), st(0)
mov dword [esp + 0x90], edx
fild qword [esp + 0x90]
fcompp
fnstsw ax
test ah, 1
je 0x487e8d
shr edx, 1
xor eax, eax
mov dword [esp + 0xa8], edx
fstp st(0)
mov dword [esp + 0xac], eax
mov dword [esp + 0xcc], eax
fild qword [esp + 0xa8]
fst qword [esp + 0x24]
mov ecx, dword [ecx]
mov dword [esp + 0xc8], ecx
fild qword [esp + 0xc8]
fdivr st(1)
call fcn.004b0ca0
mov dword [esp + 0x50], eax
fdiv qword [esp + 0x84]
fst qword [esp + 0x24]
fcomp qword [0x4f2198]
fnstsw ax
test ah, 1
je 0x487eb5
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0x3ff00000
mov ecx, dword [esp + 0x1c]
mov edx, ecx
and edx, 0xfe7fffff
cmp edx, 0x400000
jne 0x487f26
mov eax, dword [esp + 0x4c]
test byte [eax + 0x16], 4
jne 0x487f26
mov eax, dword [0x50be10]
test eax, eax
je 0x487f26
mov edx, dword [esp + 0x64]
mov eax, dword [edx]
test byte [eax + 0x34], 0x40
jne 0x487f26
mov edx, dword [esp + 0x44]
mov dword [esp + 0x9c], 0
mov eax, dword [edx]
mov edx, dword [esp + 0x5c]
mov esi, dword [edx + 0x24]
lea eax, [eax + eax*2]
add eax, esi
or ecx, 0x80020000
mov dword [esp + 0x98], eax
mov dword [esp + 0x1c], ecx
fild qword [esp + 0x98]
fstp qword [esp + 0x34]
jmp 0x487fd4
test ecx, 0x100f3000
jne 0x487f7d
mov eax, dword [esp + 0x44]
mov dword [esp + 0xa4], 0
and ecx, 0xffbfffff
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
shl edx, 2
mov dword [esp + 0xa0], edx
mov dword [esp + 0x1c], ecx
fild qword [esp + 0xa0]
test eax, eax
fstp qword [esp + 0x34]
je 0x487fd4
mov eax, ecx
and eax, 0xff7fffff
mov dword [esp + 0x1c], eax
mov ax, word [esp + 0x6c]
mov word [esp + 0x22], ax
jmp 0x487fd4
mov ecx, dword [esp + 0x44]
mov dword [esp + 0xb4], 0
sub esp, 8
mov edx, dword [ecx]
mov dword [esp + 0xb8], edx
fild qword [esp + 0xb8]
fstp qword [esp]
call fcn.00487340
mov eax, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x487fc4
mov al, byte [esp + 0x1a]
fild dword [esp + 0x50]
test al, al
je 0x487fc8
fadd qword [esp + 0x24]
jmp 0x487fc8
fild dword [esp + 0x50]
fmul st(1)
fadd qword [esp + 0x24]
fstp qword [esp + 0x34]
fstp st(0)
mov al, byte [esp + 0x19]
test al, al
je 0x48802e
mov eax, dword [esp + 0x22]
mov ecx, dword [esp + 0x68]
and eax, 0xffff
sub esp, 8
sub ecx, eax
mov dword [esp + 0x60], ecx
fild dword [esp + 0x60]
fmul qword [esp + 0x2c]
fidiv dword [esp + 0x70]
fstp qword [esp]
call fcn.00487340
mov dx, word [esp + 0x2a]
add esp, 8
neg dx
sbb edx, edx
add edx, 3
mov dword [esp + 0x58], edx
fild dword [esp + 0x58]
fmul st(1)
fmul qword [esp + 0x24]
fadd qword [esp + 0x34]
fstp qword [esp + 0x34]
fstp st(0)
mov al, byte [esp + 0x1b]
test al, al
je 0x48805a
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.00487340
fmul qword [esp + 0x2c]
add esp, 8
fmul qword [0x4f2280]
fadd qword [esp + 0x34]
fstp qword [esp + 0x34]
fld qword [esp + 0x24]
fcomp qword [0x4f2278]
fnstsw ax
test ah, 0x41
jne 0x48815e
fld qword [esp + 0x34]
fcomp qword [ebp + 0x50]
fnstsw ax
test ah, 0x41
je 0x48815e
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
and eax, 0xffff
mov ecx, dword [esi + 4]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x48], edx
push eax
push ecx
call fcn.00485890
fld qword [esp + 0x2c]
fcom qword [0x4f2278]
mov ecx, dword [esi + 0x20]
mov edi, dword [esi + 0x18]
mov ebx, eax
add esp, 8
fnstsw ax
test ah, 0x41
jne 0x488141
lea esi, [ecx + 0x10]
test edi, edi
je 0x488141
test byte [esi + 2], 2
jne 0x488130
mov eax, dword [ebp + 0x18]
mov ecx, dword [esi + 0x10]
and eax, ecx
mov ecx, dword [ebp + 0x1c]
and ecx, dword [esi + 0x14]
cmp eax, ebx
jne 0x488130
cmp ecx, edx
jne 0x488130
mov ax, word [esi]
test al, 0x83
je 0x488105
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4880fd
dec eax
mov dword [esp + 0x44], eax
jmp 0x488130
fmul qword [0x4f2238]
jmp 0x48812c
test al, 0x3c
je 0x488120
mov eax, dword [esp + 0x48]
test eax, eax
je 0x488118
dec eax
mov dword [esp + 0x48], eax
jmp 0x488130
fmul qword [0x4f2270]
jmp 0x48812c
cmp ax, 0x800
je 0x488130
fmul qword [0x4f2180]
fst qword [esp + 0x24]
fcom qword [0x4f2278]
dec edi
add esi, 0x28
fnstsw ax
test ah, 0x41
je 0x4880c7
fcomp qword [0x4f2278]
fnstsw ax
test ah, 1
je 0x48815e
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0x40000000
mov eax, dword [esp + 0x14]
test eax, eax
je 0x48816e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4881a2
mov ebx, dword [esp + 0x78]
lea edx, [esp + 0x1c]
push ebx
push edx
call fcn.004856d0
add esp, 8
test eax, eax
je 0x4881a2
mov eax, dword [esp + 0x7c]
mov ecx, 0xa
lea esi, [esp + 0x1c]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx]
and ecx, eax
mov dword [ebx], ecx
mov ecx, dword [esp + 0x14]
mov dword [ebp + 0x48], ecx
mov edx, dword [esp + 0x74]
mov eax, dword [edx + 0x44]
test eax, eax
jne 0x4881d7
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x7c], 0xffffcfff
mov eax, dword [ecx + 0x14]
test eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x14], eax
jne 0x4879ed
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4881f9
mov edx, dword [esp + 0x64]
mov eax, dword [edx]
test dword [eax + 0x18], 0x10000
je 0x4881f9
mov esi, dword [esp + 0x78]
or dword [esi], 0x1000000
jmp 0x4881fd
mov esi, dword [esp + 0x78]
push ebp
call fcn.00487380
push ebp
call fcn.004883a0
mov ecx, dword [esp + 0x78]
mov eax, dword [esi]
add esp, 8
or eax, ecx
mov dword [esi], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf0
ret