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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
fldz
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ebx
fst qword [esp + 0x98]
fldz
mov dword [esp + 0x64], ebx
fst dword [esp + 0x20]
push esi
fst dword [esp + 0x84]
push edi
mov edi, dword [ebp + 0x14]
fxch st(1)
mov dword [esp + 0x2c], ebx
fst qword [esp + 0x18]
mov dword [esp + 0x10], ebx
fst qword [esp + 0xa0]
fxch st(1)
xor eax, eax
fst dword [esp + 0x48]
lea edx, [esp + 0xb8]
fxch st(1)
push edx
fstp qword [esp + 0x84]
lea ecx, [esp + 0xac]
mov word [esp + 0x10], ax
mov eax, 1
push edi
fstp dword [esp + 0x60]
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], ecx
call fcn.00402310
add esp, 8
test eax, eax
jne 0x405268
lea eax, [ebx - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.004011f0
mov esi, dword [ebp + 0x10]
push edi
push esi
call fcn.00401f90
add esp, 0x20
test eax, eax
jge 0x40536c
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x405308
fldz
push 1
mov dword [esp + 0x30], ebx
fstp qword [esp + 0xa4]
push edi
call fcn.004019b0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
add edx, edx
add edx, edx
push edx
push ebx
push eax
call fcn.0040b710
mov dword [0x424428], 0x49fbdc81
mov ecx, dword [edi + 8]
mov dword [ecx], ebx
add esp, 0xc
mov dword [edi], 1
add dword [esp + 0x2c], 0xe592451e
cmp esi, ebx
jne 0x405bf6
mov esi, dword [ebp + 0x10]
mov dx, word [0x424bac]
movsx eax, dx
add eax, 0x4a485ca3
cmp eax, 0x749edba5
jl 0x405348
fld dword [0x4244a4]
fsub qword [0x41f690]
fadd dword [0x4244a4]
fstp dword [0x4244a4]
fld dword [0x4244a4]
fadd qword [0x41f340]
fstp dword [0x4244a4]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x405363
push esi
push eax
call fcn.00402f10
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x30]
push esi
push ecx
call fcn.00402f10
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
fld qword [esp + 0x80]
mov edx, dword [0x4241d4]
fsub qword [0x41f688]
dec dword [0x4241d4]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fcompp
fnstsw ax
test ah, 1
jne 0x4053cc
mov ecx, dword [0x424394]
mov edx, dword [esp + 0x2c]
mov eax, 0xcd5dc74a
sub eax, ecx
imul edx, eax
mov dword [esp + 0x2c], edx
inc dword [0x424394]
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00402f10
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
mov eax, 1
add edx, 2
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], eax
push edx
lea eax, [esp + 0x78]
push eax
call fcn.004019b0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
lea ecx, [esp + 0x74]
push ebx
push ecx
call fcn.00401af0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
fld dword [0x424330]
lea edx, [esp + 0x3c]
fsub qword [0x41f680]
push 2
push edx
fsub qword [0x41f678]
fmul qword [0x4230a0]
fstp qword [0x4230a0]
fld dword [0x424330]
fadd qword [0x41f340]
fstp dword [0x424330]
call fcn.004019b0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
lea ecx, [esp + 0x8c]
mov eax, 0x6444
push 3
push ecx
mov word [0x424938], ax
call fcn.004019b0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
lea edx, [esp + 0x4c]
push edx
call fcn.00401740
add esp, 4
and eax, 0x8000001f
jns 0x4054b3
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
fld qword [0x425eb0]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsubp st(1)
fstp qword [0x425eb0]
jge 0x405547
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x30]
push edi
push edx
mov dword [0x4249e4], 0x351e324
mov dword [esp + 0x2c], edi
call fcn.00403390
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
add dword [esp + 0x14], 0xdf913cf2
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00403390
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405bf6
fld dword [0x4242ec]
fadd dword [0x424498]
fadd dword [esp + 0x48]
fstp dword [esp + 0x48]
fld dword [0x424498]
fsub qword [0x41f340]
fstp dword [0x424498]
jmp 0x40554b
mov dword [esp + 0x24], ebx
mov ecx, dword [esp + 0x6c]
sub ecx, 0x6143dc04
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
lea edx, [esp + 0x4c]
fstp qword [esp + 0xa0]
dec dword [esp + 0x6c]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
dec edi
dec eax
mov dword [esp + 0x10], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
push ebx
push edx
mov dword [esp + 0x78], eax
call fcn.00403390
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00402310
add esp, 0x10
test eax, eax
jl 0x4055d1
mov eax, dword [esp + 0x7c]
inc dword [eax + edi*4]
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00404650
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00402310
add esp, 0x14
test eax, eax
jge 0x4055a2
lea ecx, [esp + 0x4c]
push ebx
push ecx
call fcn.00402870
fld dword [0x423270]
fsub qword [0x41f670]
mov eax, dword [esp + 0x18]
add esp, 8
cmp eax, dword [esp + 0x70]
fadd qword [esp + 0x18]
mov dword [esp + 0x64], eax
fadd dword [0x42433c]
fstp dword [0x42433c]
fld qword [esp + 0x18]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x18]
fld dword [0x423270]
fadd st(1)
fstp dword [0x423270]
jle 0x405b35
lea eax, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
jmp 0x405646
fld1
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x64]
mov esi, dword [esp + 0x70]
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x54]
mov edi, dword [edx + esi*4]
mov dword [esp + 0x58], ecx
cmp dword [ecx], edi
jb 0x405674
mov ecx, dword [esp + 0x7c]
or ebx, 0xffffffff
mov dword [eax + ecx - 4], ebx
jmp 0x4057da
mov esi, dword [ecx]
xor edx, edx
mov eax, esi
mov ebx, edi
shr ebx, 0x10
div ebx
mov edx, eax
imul edx, ebx
sub esi, edx
mov edx, esi
mov si, word [0x4235dc]
movsx esi, si
mov dword [esp + 0x18], esi
shl edx, 0x10
mov dword [esp + 0x68], eax
fild dword [esp + 0x18]
fstp dword [esp + 0x28]
dec word [0x4235dc]
movzx esi, word [ecx - 2]
or esi, edx
movzx ecx, di
mov edx, eax
imul edx, ecx
cmp esi, edx
jae 0x4056da
dec eax
add esi, edi
mov dword [esp + 0x68], eax
cmp esi, edi
jb 0x4056da
cmp esi, edx
jae 0x4056d6
add esi, edi
dec eax
cmp esi, edi
jae 0x4056cb
mov dword [esp + 0x68], eax
sub esi, edx
fld qword [esp + 0x80]
xor edx, edx
fsub st(1)
mov eax, esi
div ebx
fstp qword [esp + 0x80]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fld qword [esp + 0x80]
fsubr qword [0x41f668]
fadd qword [0x41f660]
fsubp st(1)
call fcn.0040b5d0
mov ecx, dword [esp + 0x18]
mov edx, ecx
imul edx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x58]
fld dword [esp + 0x28]
sub esi, edx
movzx edx, word [eax - 4]
fmul dword [esp + 0x28]
movzx eax, di
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fsub st(1)
mov ebx, ecx
imul ebx, eax
fstp dword [esp + 0x28]
shl esi, 0x10
or esi, edx
cmp esi, ebx
jae 0x4057c0
mov ax, word [0x424510]
mov edx, dword [esp + 0x6c]
cwde
add eax, 0xae57f032
add edx, eax
cmp edx, 0xa595b2c2
jge 0x4057ae
fld dword [esp + 0x88]
fsub st(1)
fstp dword [esp + 0x88]
mov eax, dword [0x4241f8]
mov dword [esp + 0x58], eax
fild dword [esp + 0x58]
fld dword [esp + 0x88]
fsub qword [0x4244e8]
fsubp st(1)
call fcn.0040b5d0
mov ecx, dword [esp + 0x18]
mov dword [0x4241f8], eax
add esi, edi
dec ecx
cmp esi, edi
jb 0x4057c0
cmp esi, ebx
jae 0x4057c0
add esi, edi
dec ecx
cmp esi, edi
jae 0x4057b5
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0xc]
shl eax, 0x10
or eax, ecx
mov ecx, dword [esp + 0x7c]
mov dword [edx + ecx - 4], eax
mov eax, edx
or ebx, 0xffffffff
fsubr dword [esp + 0x48]
mov ecx, dword [esp + 0x7c]
mov edi, 1
add dword [eax + ecx - 4], edi
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
mov ecx, dword [esp + 0x2c]
fadd qword [0x41f658]
mov dword [esp + 0x58], ecx
fiadd dword [esp + 0x58]
fadd qword [0x424210]
fstp qword [0x424210]
jmp 0x405817
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x7c]
fldz
add dword [eax + ecx - 4], ebx
lea edx, [esp + 0x3c]
push edi
mov dword [esp + 0x1c], 0
fstp qword [esp + 0x5c]
push edx
call fcn.004019b0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405bf4
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040b710
mov eax, dword [esp + 0x50]
mov dword [0x424428], 0x49fbdc81
mov dword [eax], esi
add esp, 0xc
mov dword [esp + 0x3c], edi
add dword [esp + 0x18], 0xe592451e
test esi, esi
jne 0x405bf4
mov ecx, dword [esp + 0x70]
cmp ecx, edi
jge 0x40588f
xor eax, eax
jmp 0x405897
mov edx, dword [esp + 0x54]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x44]
mov dword [edx], eax
add word [0x424a14], bx
mov ax, word [0x424a14]
movsx edx, ax
mov dword [esp + 0x58], edx
fild dword [esp + 0x58]
fld qword [0x424b00]
fucompp
fnstsw ax
test ah, 0x44
jp 0x4058d8
fld qword [esp + 0x80]
fsub qword [0x41f650]
fstp qword [esp + 0x80]
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x44]
mov dword [edx + 4], ecx
mov eax, dword [0x424394]
mov ecx, dword [esp + 0x7c]
imul eax, eax, 0x892404ce
mov edx, dword [esp + 0xc]
mov dword [0x424394], eax
mov eax, dword [edx + ecx - 4]
push eax
lea ecx, [esp + 0x40]
push ecx
mov edx, ecx
push edx
call fcn.004049f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405bf4
fldz
mov dword [esp + 0x18], eax
lea eax, [esp + 0x8c]
fstp qword [esp + 0x58]
push edi
push eax
call fcn.004019b0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405bf4
mov ecx, dword [esp + 0x90]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x9c]
push eax
call fcn.0040b710
mov ecx, dword [esp + 0xa0]
mov dword [0x424428], 0x49fbdc81
mov dword [ecx], esi
add esp, 0xc
mov dword [esp + 0x8c], edi
add dword [esp + 0x18], 0xe592451e
test esi, esi
jne 0x405bf4
mov eax, dword [esp + 0x64]
cmp eax, 2
jge 0x405999
xor ecx, ecx
jmp 0x4059a1
mov edx, dword [esp + 0x38]
mov ecx, dword [edx + eax*4 - 8]
cmp eax, edi
mov edx, dword [esp + 0x94]
mov dword [edx], ecx
jge 0x4059b2
xor ecx, ecx
jmp 0x4059ba
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x94]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x94]
lea ecx, [esp + 0x8c]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00402310
add esp, 8
test eax, eax
jg 0x405813
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0xc]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.004049f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405bf4
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.00403390
mov esi, eax
add esp, 8
test esi, esi
jne 0x405bf4
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00404650
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405bf4
fldz
xor edx, edx
mov word [esp + 0xc], dx
fstp dword [esp + 0x9c]
mov eax, 1
lea ecx, [esp + 0xac]
mov dword [esp + 0x9c], edx
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
push ecx
lea edx, [esp + 0x34]
lea eax, [esp + 0xa0]
push edx
mov dword [esp + 0xbc], eax
call fcn.00402310
add esp, 8
test eax, eax
jge 0x405b12
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00402f10
mov esi, eax
add esp, 8
test esi, esi
jne 0x405bf4
lea edx, [esp + 0x3c]
push ebx
push edx
call fcn.00403390
mov esi, eax
add esp, 8
test esi, esi
jne 0x405bf4
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x34]
push ecx
mov edx, ecx
push edx
call fcn.00404750
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405bf4
fld qword [esp + 0x80]
call fcn.0040b5d0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x7c]
dec dword [edi + eax - 4]
mov eax, dword [esp + 0x64]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x70]
mov dword [esp + 0x64], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
jg 0x405640
jmp 0x405b37
fstp st(0)
fld qword [esp + 0xa0]
mov edi, dword [ebp + 8]
fsubr qword [0x41f648]
fstp qword [esp + 0xa0]
test edi, edi
je 0x405b6d
lea eax, [esp + 0x74]
push eax
push edi
call fcn.00402f10
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x14]
add esp, 8
imul edx, dword [eax]
mov dword [edi], edx
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x405bf4
mov ecx, dword [esp + 0x24]
fld qword [0x41f640]
push ecx
fstp qword [0x4235a8]
lea edx, [esp + 0x34]
push edx
call fcn.00402870
lea eax, [esp + 0x38]
push eax
push edi
call fcn.00402f10
fldz
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov dword [edi], edx
xor eax, eax
lea edx, [esp + 0xd4]
push edx
mov word [esp + 0x20], ax
fstp dword [esp + 0xac]
mov ebx, 1
lea ecx, [esp + 0xac]
push edi
mov dword [esp + 0xb0], eax
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe4], ecx
call fcn.00402310
add esp, 0x18
test eax, eax
jne 0x405bf4
mov dword [edi], ebx
xor ebx, ebx
push ebx
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401420
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret