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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x404
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [esp + 0x1c], esi
cmp esi, edi
mov dword [esp + 0x20], edi
je 0x508853
jmp 0x50829a
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
test ah, 2
je 0x508842
mov eax, dword [esi + 0xa4]
mov dword [esp + 0x10], edi
cmp eax, edi
mov dword [esp + 0x24], edi
je 0x5082dd
fld qword [eax + 0x10]
fchs
fstp qword [esp + 0x80]
fld qword [eax + 0x30]
fchs
fstp qword [esp + 0x88]
fld qword [eax + 0x50]
fchs
fstp qword [esp + 0x90]
jmp 0x50831f
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0xbff00000
push 0xc0
push 1
call fcn.00547150
mov ebx, eax
add esp, 8
cmp ebx, edi
je 0x508872
mov eax, dword [ebx]
push edi
and al, 0xfe
push edi
or al, 0x42
mov dword [ebx + 0x38], 1
mov dword [ebx], eax
call fcn.00457540
mov edi, dword [esi + 0xc]
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x5087cf
jmp 0x508366
mov edi, dword [esp + 0x14]
push edi
call fcn.00481650
fst qword [esp + 0x34]
fcomp qword [0x550f20]
add esp, 4
fnstsw ax
test ah, 0x41
jne 0x5087b9
mov eax, dword [edi]
test ah, 0x10
jne 0x5087b9
and eax, 0xe00
cmp eax, 0x600
jne 0x5083b1
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x40]
mov eax, dword [ebp + 0xc]
push ecx
push edx
push eax
call fcn.0049c3c0
add esp, 0xc
jmp 0x5083b7
mov ecx, dword [ebp + 0xc]
fld dword [ecx + 4]
fld qword [esp + 0x30]
fdiv st(1)
fadd qword [0x556000]
call fcn.00547c92
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], eax
cmp ecx, eax
mov dword [esp + 0x10], ecx
fstp st(0)
jg 0x5087b1
fild dword [esp + 0x30]
fstp qword [esp + 0xa0]
fild dword [esp + 0x10]
lea edx, [esp + 0x38]
push edx
fdiv qword [esp + 0xa4]
sub esp, 8
fstp qword [esp]
push edi
call fcn.0043ff80
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
add esp, 0x10
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x44]
inc edi
cmp edi, 2
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x24], edi
jle 0x5084d6
lea ecx, [esp + 0x238]
lea edx, [esp + 0xec]
push ecx
lea eax, [esp + 0x54]
push edx
push eax
call fcn.00508880
add esp, 0xc
test eax, eax
jne 0x508869
mov ecx, 6
lea esi, [esp + 0x260]
lea edi, [esp + 0xac]
push 0xbff00000
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xb0]
push eax
push ecx
call fcn.00418fa0
mov ecx, dword [ebp + 0x10]
lea edx, [esp + 0x24]
lea eax, [esp + 0x330]
push edx
push eax
push 1
lea edx, [esp + 0xc4]
push ecx
lea eax, [esp + 0x138]
push edx
push eax
call fcn.004fe990
add esp, 0x24
test eax, eax
jne 0x508872
mov ecx, dword [esp + 0x18]
push 2
lea edx, [esp + 0x328]
push ecx
push edx
call fcn.004beb30
add esp, 0xc
jmp 0x508678
lea eax, [esp + 0x38]
lea ecx, [esp + 0x38]
push eax
push esi
push ecx
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
call fcn.004465c0
add esp, 0xc
cmp edi, 1
jne 0x508503
call fcn.004ebe50
mov ecx, dword [ebp + 0x10]
lea edx, [esp + 0x18]
lea eax, [esp + 0x324]
push edx
push eax
push 1
lea edx, [esp + 0x8c]
push ecx
lea eax, [esp + 0x48]
push edx
push eax
call fcn.004fe990
add esp, 0x18
cmp eax, 0xffffffff
je 0x508869
mov ecx, dword [esp + 0x18]
push 2
lea edx, [esp + 0x328]
push ecx
push edx
call fcn.004beb30
add esp, 0xc
cmp edi, 2
jne 0x508678
lea eax, [esp + 0x60]
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0xe0]
push ecx
push edx
call fcn.00418960
lea eax, [esp + 0x254]
lea ecx, [esp + 0x340]
push eax
lea edx, [esp + 0xd4]
push ecx
push edx
call fcn.00418e20
lea eax, [esp + 0xf4]
push eax
call fcn.004189c0
fstp qword [esp + 0xb4]
lea ecx, [esp + 0xe0]
push ecx
call fcn.00418eb0
fstp qword [esp + 0x48]
fld qword [esp + 0xb8]
fcomp qword [0x550f20]
add esp, 0x20
fnstsw ax
test ah, 0x41
jne 0x508678
fld qword [esp + 0x28]
fcomp qword [0x550f20]
fnstsw ax
test ah, 0x41
jne 0x508678
fld qword [esp + 0x98]
fdiv qword [esp + 0x28]
fst qword [esp + 0x28]
fcomp qword [0x550f30]
fnstsw ax
test ah, 1
je 0x508678
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ecx, 6
lea esi, [esp + 0x248]
lea edi, [esp + 0x38]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xc8]
push eax
lea edx, [esp + 0x40]
push ecx
push edx
call fcn.00418e80
mov ecx, 6
lea esi, [esp + 0x35c]
lea edi, [esp + 0xbc]
push 0xbff00000
lea eax, [esp + 0xc0]
push 0
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00418fa0
mov eax, dword [ebp + 0x10]
lea ecx, [esp + 0x34]
lea edx, [esp + 0x340]
push ecx
push edx
push 1
lea ecx, [esp + 0xd4]
push eax
lea edx, [esp + 0x64]
push ecx
push edx
call fcn.004fe990
add esp, 0x34
mov eax, dword [esp + 0x10]
mov ecx, 6
lea esi, [esp + 0x334]
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov ecx, 6
lea esi, [esp + 0x334]
lea edi, [esp + 0x11c]
test eax, eax
rep movsd dword es:[edi], dword [esi]
jle 0x5086e7
mov eax, dword [esp + 0x14]
test byte [eax + 4], 0x80
jne 0x5086e7
lea ecx, [esp + 0x38]
push ebx
lea edx, [esp + 0x138]
push ecx
push edx
call fcn.00440210
add esp, 0xc
test eax, eax
je 0x508869
push 0xc
call fcn.004b2890
mov eax, dword [ebx + 0x10]
push eax
call fcn.0048e930
add esp, 8
call fcn.004b2a10
cmp dword [esp + 0x24], 1
jle 0x508738
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
mov dword [esp + 0x5c], ecx
mov ecx, 6
lea esi, [esp + 0x104]
lea edi, [esp + 0xec]
mov dword [esp + 0x54], edx
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x3b
lea esi, [esp + 0x238]
lea edi, [esp + 0x14c]
mov dword [esp + 0x58], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x68], ecx
mov ecx, 6
lea esi, [esp + 0x11c]
lea edi, [esp + 0x104]
mov edx, dword [esp + 0x70]
mov dword [esp + 0x64], eax
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10]
mov ecx, 0x3b
lea esi, [esp + 0x324]
lea edi, [esp + 0x238]
rep movsd dword es:[edi], dword [esi]
mov ecx, 6
lea esi, [esp + 0x38]
lea edi, [esp + 0x134]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x7c]
inc eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
cmp eax, ecx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x10], eax
jle 0x5083e9
mov dword [esp + 0x10], 1
mov edi, dword [edi + 0xc]
mov eax, dword [esi + 0xc]
cmp edi, eax
mov dword [esp + 0x14], edi
je 0x5087cf
test edi, edi
jne 0x508362
mov eax, dword [0x584ab4]
mov ecx, dword [0x584ab0]
push eax
push ecx
push ebx
call fcn.00488de0
mov eax, dword [ebx]
mov edx, dword [esi]
mov ecx, dword [ebx + 8]
xor edx, eax
and edx, 8
push ebx
xor edx, eax
mov eax, ecx
mov dword [ebx], edx
mov edi, dword [esi + 8]
xor eax, edi
push 0x585050
and eax, 1
xor eax, ecx
mov dword [ebx + 8], eax
mov edx, dword [esi + 8]
mov ecx, eax
xor ecx, edx
and ecx, 2
xor ecx, eax
mov eax, dword [ebx]
mov dword [ebx + 8], ecx
mov edx, dword [esi]
xor edx, eax
and edx, 0x100
xor edx, eax
mov dword [ebx], edx
call fcn.004894b0
push 3
push ebx
call fcn.004ac0f0
mov eax, dword [esp + 0x3c]
add esp, 0x1c
test eax, eax
jne 0x508842
mov dword [esp + 0x20], ebx
mov esi, dword [esi + 0x34]
xor edi, edi
cmp esi, edi
mov dword [esp + 0x1c], esi
jne 0x508296
mov eax, dword [esp + 0x20]
push eax
call fcn.005090d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.004888a0
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret