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

Disassembly:
sub esp, 0x370
fldz
push ebx
fst dword [esp + 0x28]
push ebp
fst dword [esp + 0x24]
xor ebp, ebp
fstp dword [esp + 0x34]
xor eax, eax
fldz
mov dword [esp + 0xc], ebp
mov word [esp + 0x3c], ax
fst qword [esp + 0x58]
mov ebx, 1
mov dword [esp + 0x10], ebp
fst qword [esp + 0x60]
fst qword [esp + 0x34]
mov edx, 0xa61ed28a
add dword [esp + 0xc], ebx
fld qword [esp + 0x58]
mov ecx, dword [esp + 0xc]
fsubr qword [0x41f790]
sub edx, ecx
mov dword [esp + 8], edx
fild dword [esp + 8]
push edi
fcompp
fnstsw ax
test ah, 5
jp 0x407095
mov eax, dword [esp + 0x10]
imul eax, eax, 0x2d37c904
mov dword [esp + 0x10], eax
jmp 0x40709d
fld qword [esp + 0x38]
fstp dword [esp + 0x28]
mov edi, dword [esp + 0x38c]
fstp qword [esp + 0x38]
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x70]
push edi
mov dword [esp + 0x40], ebp
mov dword [esp + 0x74], ebp
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ecx
call fcn.00401540
add esp, 8
test eax, eax
jl 0x40792a
mov eax, dword [edi + 8]
test byte [eax], bl
je 0x40792a
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.00401ec0
push ebp
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00402080
push 0x300
lea ecx, [esp + 0x94]
push ebp
push ecx
call fcn.0040b690
mov edx, dword [esp + 0x3a8]
push edx
call fcn.00401c70
add esp, 0x24
cmp eax, 0x29f
jle 0x407133
mov dword [esp + 0x20], 6
jmp 0x407163
cmp eax, 0xef
jle 0x407144
mov dword [esp + 0x20], 5
jmp 0x407163
cmp eax, 0x4f
jle 0x407153
mov dword [esp + 0x20], 4
jmp 0x407163
xor ecx, ecx
cmp eax, 0x17
setg cl
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0x20], ecx
add dword [esp + 0x14], ebx
mov edx, dword [esp + 0x14]
push esi
sub edx, 0x5dbab867
mov word [0x42590c], dx
mov esi, dword [edi + 4]
add esi, ebx
mov ebx, dword [esp + 0x384]
push esi
push ebx
call fcn.00401690
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x4078a0
lea eax, [esp + 0x8c]
push esi
push eax
call fcn.00401690
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x4078a0
lea ecx, [esi + esi]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00401690
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x4078a0
mov ebp, dword [esp + 0x394]
test ebp, ebp
je 0x407200
cmp dword [ebp + 8], 0
je 0x407200
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
jmp 0x407291
lea eax, [esp + 0x48]
push 1
push eax
call fcn.004030f0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a7
mov ecx, dword [edi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00401f40
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a7
mov eax, dword [0x425dd0]
lea ecx, [esp + 0x48]
push edi
sub eax, 0x5752a66d
push ecx
mov edx, ecx
mov word [0x425e08], ax
inc dword [0x425dd0]
push edx
call fcn.00406c20
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a7
mov dword [0x423cb8], 0x7d3cbe5f
test ebp, ebp
je 0x407291
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
mov esi, dword [esp + 0x388]
push edi
push esi
call fcn.00401540
add esp, 8
test eax, eax
jl 0x4072ba
push edi
lea eax, [esp + 0x90]
push esi
push eax
call fcn.00406c20
add esp, 0xc
jmp 0x4072cb
lea ecx, [esp + 0x8c]
push esi
push ecx
call fcn.00401840
add esp, 8
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x54]
push edx
push eax
push edi
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x9c]
push edx
call fcn.00403170
lea eax, [esp + 0x5c]
push eax
push ebx
call fcn.00401840
add esp, 0x1c
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a7
fld dword [esp + 0x2c]
fsub qword [0x41f788]
fadd qword [0x424638]
call fcn.0040b550
mov dword [esp + 0x14], eax
fld qword [0x424638]
fld1
lea ecx, [esp + 0x54]
fsub st(1), st(0)
push ecx
fxch st(1)
fstp qword [0x424638]
fadd dword [esp + 0x30]
mov edx, dword [esp + 0x24]
push edx
push edi
fstp dword [esp + 0x38]
push ebx
call fcn.00404380
fld dword [0x41f780]
mov ecx, dword [esp + 0x34]
fstp dword [esp + 0x44]
add esp, 0x10
cmp ecx, 1
jle 0x4074fd
dec dword [esp + 0x44]
mov ax, word [esp + 0x44]
movsx edx, ax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsub qword [esp + 0x68]
fcomp qword [0x41f778]
fnstsw ax
test ah, 0x41
jp 0x407397
fld dword [0x425da0]
fsub qword [0x41f770]
fstp dword [0x425da0]
fld dword [esp + 0x34]
mov eax, dword [esp + 0x14]
fadd qword [0x41f768]
mov dword [esp + 0x10], eax
lea ebx, [ecx - 1]
mov ecx, ebx
fadd qword [0x41f760]
mov ebp, 1
fild dword [esp + 0x10]
shl ebp, cl
fmulp st(1)
call fcn.0040b550
mov ecx, dword [edi + 4]
inc ecx
lea esi, [ebp + ebp*2]
push ecx
lea esi, [esp + esi*4 + 0x84]
push esi
mov dword [esp + 0x1c], eax
call fcn.00401690
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a0
lea edx, [esp + 0x8c]
push edx
push esi
call fcn.00401840
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a0
test ebx, ebx
jle 0x40742a
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x54]
push eax
push ecx
push edi
push esi
push esi
call fcn.00403170
add esp, 0x14
sub ebx, 1
jne 0x407410
fld dword [esp + 0x34]
mov edx, dword [esp + 0x18]
fadd qword [0x41f758]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b550
mov ecx, dword [esp + 0x24]
mov ebx, 1
shl ebx, cl
inc ebp
mov dword [esp + 0x18], eax
cmp ebp, ebx
jge 0x4074f6
lea esi, [ebp + ebp*2]
lea esi, [esp + esi*4 + 0x80]
lea ebx, [ebx]
mov eax, dword [edi + 4]
inc eax
push eax
push esi
call fcn.00401690
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a0
mov cx, word [0x425804]
mov edx, dword [0x423d6c]
movsx eax, cx
add eax, 0x7c728d93
cmp eax, edx
je 0x4074b5
movzx eax, word [0x423df0]
sub eax, 0x2ff00d61
mov word [0x423df0], ax
lea ecx, [esi - 0xc]
push ecx
push esi
call fcn.00401840
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4078a0
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x54]
push edx
push eax
push edi
lea ecx, [esp + 0x98]
push ecx
push esi
call fcn.00403170
inc ebp
add esp, 0x14
add esi, 0xc
cmp ebp, ebx
jl 0x407470
mov ebx, dword [esp + 0x384]
mov cx, word [0x424694]
mov edx, dword [esp + 0x38c]
mov eax, dword [edx + 4]
mov edx, dword [0x424778]
mov dword [esp + 0x10], eax
movsx eax, cx
sub eax, edx
sub eax, 0x3403a7a1
mov word [0x424694], ax
xor ebp, ebp
fld qword [0x4247a0]
mov ax, word [str.k_ab]
fadd qword [0x41f750]
mov edx, dword [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ebp
fild dword [esp + 0x28]
mov dword [esp + 0x28], edx
fsubp st(1)
fild dword [esp + 0x28]
fmulp st(1)
call fcn.0040b550
mov dword [esp + 0x14], eax
fld qword [0x4247a0]
fld1
xor eax, eax
fadd st(1), st(0)
mov dword [esp + 0x38], eax
fxch st(1)
mov dword [esp + 0x28], eax
fstp qword [0x4247a0]
fld dword [0x423c94]
fld qword [0x425fb8]
fadd qword [0x423eb8]
fsub qword [0x41f748]
fsubp st(1)
fstp dword [0x423c94]
fld qword [0x425fb8]
fadd st(1)
fstp qword [0x425fb8]
cmp dword [esp + 0x30], 0
jne 0x4075fe
mov eax, dword [esp + 0x10]
mov ecx, eax
mov esi, 1
sub eax, esi
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x4077ed
add word [0x425910], si
fld qword [esp + 0x68]
mov dx, word [0x425910]
movsx eax, dx
sub eax, 0x7c919a0f
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
mov dword [esp + 0x30], 0x20
fsubp st(1)
fstp qword [esp + 0x68]
mov ecx, dword [esp + 0x38c]
fld qword [0x424600]
mov edx, dword [ecx + 8]
fsub qword [esp + 0x68]
mov eax, dword [esp + 0x10]
dec dword [esp + 0x30]
mov esi, dword [edx + eax*4]
mov ecx, dword [esp + 0x30]
shr esi, cl
mov cx, word [0x425904]
movsx edx, cx
mov dword [esp + 0x3c], edx
and esi, 1
fild dword [esp + 0x3c]
fmulp st(1)
call fcn.0040b550
mov word [0x425904], ax
fld qword [0x424600]
fadd st(1)
fstp qword [0x424600]
test esi, esi
jne 0x407686
cmp dword [esp + 0x28], esi
je 0x4075ae
cmp dword [esp + 0x28], 1
jne 0x407686
mov ecx, dword [esp + 0x20]
fstp st(0)
lea eax, [esp + 0x54]
push eax
push ecx
push edi
push ebx
push ebx
call fcn.00403170
fld1
add esp, 0x14
jmp 0x4075ae
fld qword [esp + 0x60]
mov edx, dword [esp + 0x24]
fadd st(1)
inc ebp
mov ecx, edx
sub ecx, ebp
fstp qword [esp + 0x60]
shl esi, cl
fld qword [0x423e48]
mov dword [esp + 0x28], 2
fadd st(1)
or dword [esp + 0x38], esi
fstp qword [0x423e48]
fld qword [esp + 0x60]
fsub qword [0x425f70]
fld qword [0x423e48]
fsubr qword [0x41f740]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4076e9
dec dword [esp + 0x18]
mov eax, dword [0x42592c]
mov ecx, dword [esp + 0x18]
imul eax, ecx
mov dword [0x42592c], eax
cmp ebp, edx
jne 0x4077d3
dec dword [esp + 0x18]
fstp st(0)
mov edx, dword [esp + 0x18]
mov eax, 0xaca2ad7f
sub eax, edx
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fadd qword [esp + 0x60]
call fcn.0040b550
mov esi, dword [esp + 0x24]
mov word [0x42580c], ax
test esi, esi
jle 0x40773b
mov ebp, dword [esp + 0x20]
lea ecx, [esp + 0x54]
push ecx
push ebp
push edi
push ebx
push ebx
call fcn.00403170
add esp, 0x14
sub esi, 1
jne 0x407725
mov dx, word [0x423d88]
movsx eax, dx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x54]
fild dword [esp + 0x3c]
push ecx
lea eax, [eax + eax*2]
lea ecx, [esp + eax*4 + 0x84]
fmul dword [0x424720]
mov edx, dword [esp + 0x24]
push edx
push edi
push ecx
fstp dword [0x424720]
push ebx
call fcn.00403170
add esp, 0x14
fld dword [0x4258e8]
mov dword [esp + 0x28], 1
fsubr qword [0x41f738]
fcomp qword [0x41f730]
fnstsw ax
fld dword [0x4258e8]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x4258e8]
test ah, 0x41
jp 0x4077c1
fld dword [esp + 0x34]
fadd qword [0x425e30]
fadd qword [esp + 0x60]
fstp qword [esp + 0x60]
fld dword [0x41f728]
xor ebp, ebp
fstp dword [0x425d44]
mov dword [esp + 0x38], ebp
mov dx, word [0x4259e4]
movsx ecx, dx
mov eax, 0x4418c197
sub eax, ecx
add dword [esp + 0x14], eax
jmp 0x4075ae
mov ecx, dword [esp + 0x24]
fstp st(0)
rol esi, cl
test ebp, ebp
jle 0x40786e
mov dword [esp + 0x10], ebp
lea ecx, [ecx]
mov ebp, dword [esp + 0x20]
lea edx, [esp + 0x54]
push edx
push ebp
push edi
push ebx
push ebx
call fcn.00403170
mov eax, dword [esp + 0x4c]
add eax, eax
add esp, 0x14
mov dword [esp + 0x38], eax
test eax, esi
je 0x40783b
lea eax, [esp + 0x54]
push eax
push ebp
push edi
lea ecx, [esp + 0x98]
push ecx
push ebx
call fcn.00403170
add esp, 0x14
sub dword [esp + 0x10], 1
fld dword [esp + 0x2c]
fadd qword [0x41f348]
fstp dword [esp + 0x2c]
mov dx, word [0x4258f4]
movsx eax, dx
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fsub dword [esp + 0x2c]
fadd dword [esp + 0x34]
fstp dword [esp + 0x34]
jne 0x407800
movzx ecx, word [esp + 0x44]
mov edx, dword [0x425e60]
sub ecx, edx
add ecx, 0x67fb99d8
mov word [esp + 0x44], cx
dec dword [0x425e60]
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x54]
push eax
push ecx
push edi
push ebx
call fcn.00404380
add esp, 0x10
mov ebp, dword [esp + 0x394]
mov esi, dword [esp + 0x24]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x4078e3
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x80]
mov edi, edx
push 0
push esi
call fcn.00401b40
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x4078d0
pop esi
push 0
lea edx, [esp + 0x54]
lea eax, [esp + 0x8c]
test ebp, ebp
je 0x40790d
push edx
push eax
call fcn.00401b40
mov eax, dword [esp + 0x24]
add esp, 0xc
pop edi
pop ebp
pop ebx
add esp, 0x370
ret
lea ecx, [esp + 0x48]
push ecx
push edx
push eax
call fcn.00401b40
mov eax, dword [esp + 0x28]
add esp, 0x10
pop edi
pop ebp
pop ebx
add esp, 0x370
ret
pop edi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x370
ret