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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [ecx + 0x118]
test eax, eax
mov dword [esp + 8], ecx
mov ecx, dword [ecx]
mov edx, dword [ecx + 0x820]
mov ecx, dword [edx + 8]
push ebx
push esi
push edi
je 0x531b2d
movzx ebx, ax
cmp ebx, dword [ecx + 8]
jae 0x531b2d
lea ebx, [ebx + ebx*4]
shl ebx, 5
add ebx, dword [ecx]
cmp dword [ebx + 0x9c], eax
jne 0x531b2d
mov esi, dword [ebp + 0xc]
fld dword [esi + 0x18]
fcomp qword [0x688740]
fnstsw ax
test ah, 0x41
jne 0x53153f
fld dword [esi + 0x18]
fsubr qword [0x688750]
fadd qword [0x6893b0]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
call fcn.00643d70
fld dword [esi + 0x14]
fadd dword [esi + 0xc]
push eax
push 0x208
fsub qword [0x688be0]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
call fcn.00643d70
fld dword [esi + 0x10]
fsub qword [0x6885b0]
push eax
call fcn.00643d70
mov esi, dword [ebp + 8]
push eax
call fcn.0058d860
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x74]
test eax, eax
mov edi, 0xff
mov dword [esp + 0x10], edi
jl 0x531591
imul eax, eax, 0xff
mov ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jg 0x53157e
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x10]
jmp 0x531591
cmp eax, 0xff
jl 0x53158b
mov dword [esp + 0x10], edi
jmp 0x531591
mov dword [esp + 0x10], eax
mov edi, eax
push edi
mov edx, 0xff
push 0xff
mov ecx, edx
lea eax, [esp + 0x38]
call fcn.0056a3b0
mov eax, dword [0x7329cc]
mov ecx, dword [0x7329d0]
mov edx, dword [0x7329d4]
mov dword [esp + 0x20], eax
mov eax, dword [0x7329d8]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x28]
cmp eax, 2
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov byte [esp + 0xf], 0
jne 0x531635
push edi
push 0
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x48]
call fcn.0056a3b0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0xc]
mov eax, dword [0x7329cc]
mov dword [esp + 0x38], ecx
mov ecx, dword [0x7329d0]
mov dword [esp + 0x3c], edx
mov edx, dword [0x7329d4]
mov dword [esp + 0x20], eax
mov eax, dword [0x7329d8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov byte [esp + 0xf], 0
jmp 0x5317f7
cmp dword [esi + 0x24], 0x19
jne 0x53172f
cmp eax, 1
je 0x53172f
mov ecx, dword [esi + 0xcc]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp dword [esi + 0xc8], ecx
jge 0x53172f
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x5568]
cdq
mov ecx, 0x28
idiv ecx
push 9
push 0xff
push 0x9b
mov ecx, 0x27
mov eax, edx
xor edx, edx
mov dword [esp + 0x24], eax
call fcn.00515e70
add esp, 0xc
cmp dword [esi + 0xac], 0
mov dword [esp + 0x1c], eax
jg 0x5316b7
cmp dword [esi + 0xb4], 0
jg 0x5316b7
push edi
push eax
jmp 0x5316d6
mov eax, dword [esp + 0x18]
push 9
push 0x4b
push 0x41
mov ecx, 0x27
xor edx, edx
call fcn.00515e70
mov ecx, dword [esp + 0x28]
add esp, 0xc
push edi
push ecx
mov edx, eax
mov ecx, eax
lea eax, [esp + 0x48]
call fcn.0056a3b0
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], ecx
mov ecx, dword [0x7329cc]
mov dword [esp + 0x3c], eax
mov eax, dword [0x7329d4]
mov dword [esp + 0x38], edx
mov edx, dword [0x7329d0]
mov dword [esp + 0x20], ecx
mov ecx, dword [0x7329d8]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov byte [esp + 0xf], 0
jmp 0x5317f7
cmp byte [esi + 0xb8], 0
je 0x531779
mov edx, dword [0x732940]
mov ecx, dword [0x732944]
mov eax, dword [0x732948]
mov dword [esp + 0x30], edx
mov edx, dword [0x73294c]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
jmp 0x5317f2
cmp dword [esi + 0xac], 0
jg 0x5317a6
cmp dword [esi + 0xb4], 0
jg 0x5317a6
cmp dword [esi + 0x64], 0xa
jne 0x5317f7
mov ecx, 0x64
cmp dword [esi + 0xc8], ecx
jge 0x5317f7
push edi
push 0x19
lea edx, [ecx + 0x32]
jmp 0x5317b3
push edi
mov edx, 0x4b
push 0xff
mov ecx, edx
lea eax, [esp + 0x48]
call fcn.0056a3b0
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x3c], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [eax]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
mov byte [esp + 0xf], 1
mov eax, dword [esi + 0x54]
test eax, eax
jle 0x53185a
mov ecx, esi
call fcn.00538b10
cmp eax, 0xffffffff
jne 0x53185a
mov ecx, dword [esi + 0x54]
lea ecx, [ecx + ecx*4]
add ecx, ecx
push 0xff
push ecx
mov edx, ecx
lea eax, [esp + 0x48]
call fcn.0056a3b0
lea esi, [esp + 0x20]
mov edi, eax
lea edx, [esp + 0x50]
call fcn.005171d0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov byte [esp + 0xf], 1
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x48], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0x50], edx
mov edx, dword [esp + 0x24]
mov dword [ebx + 0x6c], ecx
mov ecx, dword [esp + 0x2c]
mov dword [ebx + 0x70], edx
mov dl, byte [esp + 0xf]
mov dword [ebx + 0x54], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x74], eax
mov dword [ebx + 0x78], ecx
mov byte [ebx + 0x7c], dl
mov eax, dword [esi + 0x24]
cmp eax, 0xd
jne 0x5318d1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
mov al, 1
call fcn.00530b40
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
push edx
push esi
mov ecx, ebx
call fcn.004769c0
mov eax, dword [ebp + 0xc]
push eax
push esi
mov esi, dword [esp + 0x1c]
xor al, al
call fcn.00530b40
jmp 0x53190c
cmp eax, 0x14
jne 0x5318e3
mov ecx, dword [ebp + 8]
push ecx
mov ecx, esi
call fcn.00530f00
jmp 0x53190c
cmp eax, 8
jne 0x5318fd
mov edx, dword [ebp + 8]
push edx
mov edi, esi
call fcn.00531260
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
jmp 0x53190c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push eax
push ecx
mov ecx, ebx
call fcn.004769c0
cmp dword [esi + 0xd8], 0
je 0x531ac5
cmp dword [esi + 0x28], 2
push edi
jne 0x53196e
push 0
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x58]
call fcn.0056a3b0
mov edx, dword [eax]
mov dword [ebx + 0x48], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x4c], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 0x50], edx
mov eax, dword [eax + 0xc]
mov dword [ebx + 0x54], eax
mov ecx, dword [0x7329cc]
mov dword [ebx + 0x6c], ecx
mov edx, dword [0x7329d0]
mov dword [ebx + 0x70], edx
mov eax, dword [0x7329d4]
mov dword [ebx + 0x74], eax
mov ecx, dword [0x7329d8]
mov dword [ebx + 0x78], ecx
jmp 0x531a1a
mov eax, dword [esi + 0x58]
test eax, eax
mov edx, 0xff
push edx
mov ecx, edx
jle 0x5319d8
lea eax, [eax + eax*4]
add eax, eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x58]
call fcn.0056a3b0
mov edx, dword [eax]
mov dword [ebx + 0x48], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x4c], ecx
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x50], edx
mov eax, dword [eax + 0xc]
push 0xff
mov dword [ebx + 0x54], eax
push ecx
mov edx, ecx
lea eax, [esp + 0x58]
call fcn.0056a3b0
mov ecx, dword [eax]
mov dword [ebx + 0x6c], ecx
mov edx, dword [eax + 4]
mov dword [ebx + 0x70], edx
mov ecx, dword [eax + 8]
mov dword [ebx + 0x74], ecx
mov edx, dword [eax + 0xc]
mov dword [ebx + 0x78], edx
mov byte [ebx + 0x7c], 1
jmp 0x531a1e
lea eax, [esp + 0x58]
call fcn.0056a3b0
mov ecx, dword [eax]
mov dword [ebx + 0x48], ecx
mov edx, dword [eax + 4]
mov dword [ebx + 0x4c], edx
mov ecx, dword [eax + 8]
mov dword [ebx + 0x50], ecx
mov edx, dword [eax + 0xc]
mov dword [ebx + 0x54], edx
mov eax, dword [0x7329cc]
mov dword [ebx + 0x6c], eax
mov ecx, dword [0x7329d0]
mov dword [ebx + 0x70], ecx
mov edx, dword [0x7329d4]
mov dword [ebx + 0x74], edx
mov eax, dword [0x7329d8]
mov dword [ebx + 0x78], eax
mov byte [ebx + 0x7c], 0
fldz
mov eax, dword [esi + 0x5c]
test eax, eax
fst dword [esp + 0x14]
jle 0x531aa0
add eax, 0xfffffff4
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fdiv qword [0x6893a8]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x531a65
fstp st(0)
fstp st(0)
fld dword [0x688b74]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fstp dword [esp + 0x14]
jmp 0x531aa2
fld1
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x531a80
fstp st(0)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fstp dword [esp + 0x14]
jmp 0x531aa2
fstp st(1)
fldz
fld qword [0x6885f0]
fsub st(1), st(0)
fxch st(1)
fmulp st(2)
faddp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fstp dword [esp + 0x14]
jmp 0x531aa2
fstp st(0)
mov edi, dword [ebp + 8]
fld dword [edi + 8]
push 1
fadd dword [esp + 0x18]
push edi
mov ecx, ebx
fstp dword [edi + 8]
call fcn.004769c0
fld dword [edi + 8]
fsub dword [esp + 0x14]
fstp dword [edi + 8]
jmp 0x531ac8
mov edi, dword [ebp + 8]
mov esi, dword [esi + 0xd8]
cmp esi, 2
je 0x531add
cmp esi, 1
je 0x531add
cmp esi, 3
jne 0x531b26
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x48], ecx
mov ecx, dword [esp + 0x3c]
mov dword [ebx + 0x4c], edx
mov edx, dword [esp + 0x20]
mov dword [ebx + 0x50], eax
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x6c], edx
mov edx, dword [esp + 0x2c]
mov dword [ebx + 0x54], ecx
mov ecx, dword [esp + 0x28]
mov dword [ebx + 0x70], eax
mov al, byte [esp + 0xf]
mov dword [ebx + 0x74], ecx
push 3
push edi
mov ecx, ebx
mov dword [ebx + 0x78], edx
mov byte [ebx + 0x7c], al
call fcn.004769c0
mov ecx, edi
call fcn.0058d830
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc