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

Disassembly:
sub esp, 0xac
fldz
push ebp
fst dword [esp + 0x20]
xor ebp, ebp
fldz
push esi
fst qword [esp + 0x74]
push edi
mov edi, dword [esp + 0xc8]
fxch st(1)
fst dword [esp + 0x24]
lea ecx, [esp + 0x94]
push ecx
mov dword [esp + 0x18], ebp
fst dword [esp + 0x24]
fxch st(1)
mov esi, 1
fst qword [esp + 0x7c]
lea eax, [esp + 0x90]
fst qword [esp + 0x5c]
push edi
fstp qword [esp + 0x88]
mov dword [esp + 0x20], ebp
fst dword [esp + 0x24]
fst dword [esp + 0x5c]
fst dword [esp + 0x34]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov dword [esp + 0x94], ebp
fstp dword [esp + 0x14]
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], eax
call fcn.00402350
add esp, 8
test eax, eax
jne 0x404833
pop edi
pop esi
lea eax, [ebp - 0xc]
pop ebp
add esp, 0xac
ret
push ebx
push ebp
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.004011d0
mov ebx, dword [esp + 0xe0]
push edi
push ebx
call fcn.004014d0
add esp, 0x20
test eax, eax
jge 0x404903
mov edi, dword [esp + 0xc0]
cmp edi, ebp
je 0x4048d7
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
dec dword [esp + 0x1c]
add dword [esp + 0x20], esi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
sub ecx, edx
sub ecx, eax
push esi
push edi
mov dword [esp + 0x24], ecx
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
add ecx, ecx
add ecx, ecx
push ecx
push ebp
push edx
call fcn.0040ade0
mov eax, dword [edi + 8]
add esp, 0xc
mov dword [eax], ebp
mov dword [edi], 1
cmp esi, ebp
jne 0x4051b6
mov eax, dword [esp + 0xc4]
cmp eax, ebp
je 0x4048f6
push ebx
push eax
call fcn.00401cf0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xac
ret
lea ecx, [esp + 0x34]
push ebx
push ecx
call fcn.00401cf0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
lea edx, [esp + 0x4c]
push edi
push edx
call fcn.00401cf0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
fld dword [esp + 0x28]
mov eax, 1
fadd dword [esp + 0x28]
lea ecx, [esp + 0x64]
fmul dword [0x4226d0]
fstp dword [0x4226d0]
fld dword [esp + 0x28]
mov dword [esp + 0x4c], eax
fsub qword [0x41e348]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 4]
add eax, 2
push eax
fstp dword [esp + 0x2c]
push ecx
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
or edi, 0xffffffff
add word [0x422600], di
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fadd qword [esp + 0x5c]
mov ax, word [0x422600]
movsx ecx, ax
sub ecx, 0xdb02806
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fcompp
fnstsw ax
test ah, 0x41
jp 0x4049c8
fld dword [0x4225fc]
fadd dword [esp + 0x20]
fstp dword [esp + 0x20]
lea edx, [esp + 0x64]
push ebp
push edx
call fcn.00401620
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
fld dword [esp + 0x24]
fsub qword [0x41e5b0]
fcomp qword [0x41e5a8]
fnstsw ax
fld dword [esp + 0x24]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x24]
test ah, 5
jp 0x404a19
fstp st(0)
fld dword [0x423e64]
fsubr qword [0x41e5a0]
fadd dword [esp + 0x24]
jmp 0x404a40
fld dword [esp + 0x24]
mov eax, dword [0x423870]
fsub qword [0x41e598]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
faddp st(1)
call fcn.0040a7e0
mov dword [0x423870], eax
fsubr dword [esp + 0x24]
lea ecx, [esp + 0x40]
fstp dword [esp + 0x24]
push 2
push ecx
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
add dword [esp + 0x1c], edi
mov eax, dword [0x424b30]
mov edx, dword [esp + 0x1c]
inc dword [0x424b30]
add eax, 0x84a3ddcd
add edx, 0x5bdd16f0
cmp edx, eax
je 0x404a9a
mov eax, dword [0x42351c]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fadd qword [esp + 0x7c]
call fcn.0040a7e0
mov dword [0x42351c], eax
lea ecx, [esp + 0x70]
push 3
push ecx
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
fld qword [esp + 0x5c]
lea edx, [esp + 0x4c]
fld dword [esp + 0x28]
push edx
fsub qword [0x41e590]
fsubp st(1)
fstp qword [esp + 0x60]
call fcn.00402530
add esp, 4
and eax, 0x8000001f
jns 0x404ae0
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x404b33
mov edi, 0x1f
sub edi, eax
lea eax, [esp + 0x34]
push edi
push eax
mov dword [esp + 0x20], edi
call fcn.00403950
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
fld dword [esp + 0x2c]
lea ecx, [esp + 0x4c]
fsub qword [0x41e588]
push edi
push ecx
fstp qword [esp + 0x8c]
call fcn.00403950
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b6
jmp 0x404b37
mov dword [esp + 0x18], ebp
mov dx, word [0x422498]
movsx eax, dx
sub eax, 0x4ba6b91a
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x4c]
fild dword [esp + 0x30]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x2c]
inc word [0x422498]
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x50]
dec ebp
dec eax
mov edi, ebp
sub edi, eax
mov ebx, edi
shl ebx, 5
push ebx
push ecx
mov dword [esp + 0x28], eax
call fcn.00403950
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00402350
add esp, 0x10
test eax, eax
jl 0x404bc4
mov eax, dword [esp + 0x6c]
inc dword [eax + edi*4]
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.00403610
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00402350
add esp, 0x14
test eax, eax
jge 0x404b95
lea eax, [esp + 0x4c]
push ebx
push eax
call fcn.00402110
add esp, 8
cmp ebp, dword [esp + 0x20]
mov dword [esp + 0x5c], ebp
jle 0x4050f9
add edi, edi
add edi, edi
add ebx, 0xffffffe0
mov dword [esp + 0x10], edi
mov dword [esp + 0x30], ebx
nop
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x54]
lea ebx, [ecx + edx*4]
mov ecx, dword [esp + 0x20]
mov edx, dword [ebx]
cmp edx, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
jb 0x404c1d
mov eax, dword [esp + 0x6c]
or ecx, 0xffffffff
mov dword [edi + eax - 4], ecx
jmp 0x404d3f
mov ecx, dword [0x42393c]
sub ecx, 0x38a86ed7
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
xor edx, edx
fadd dword [esp + 0x24]
fmul dword [0x422500]
fstp dword [0x422500]
inc dword [0x42393c]
mov esi, dword [eax]
fld qword [esp + 0x7c]
mov eax, dword [ebx]
fsub qword [0x41e580]
mov edi, esi
shr edi, 0x10
div edi
fstp qword [esp + 0x7c]
mov ecx, dword [ebx]
mov ebp, eax
movzx eax, word [ebx - 2]
dec dword [0x4238e0]
mov edx, ebp
fld dword [esp + 0x58]
imul edx, edi
fadd qword [0x41e578]
sub ecx, edx
mov edx, dword [0x4238e0]
shl ecx, 0x10
mov dword [esp + 0x14], edx
or ecx, eax
movzx edx, si
fiadd dword [esp + 0x14]
mov eax, ebp
imul eax, edx
fmul dword [esp + 0x2c]
fstp dword [esp + 0x2c]
cmp ecx, eax
jae 0x404cbb
add ecx, esi
dec ebp
cmp ecx, esi
jb 0x404cbb
nop
cmp ecx, eax
jae 0x404cbb
add ecx, esi
dec ebp
cmp ecx, esi
jae 0x404cb0
sub ecx, eax
mov eax, dword [0x423870]
imul eax, eax, 0x5efbbc87
mov dword [0x423870], eax
mov eax, ecx
xor edx, edx
fld dword [esp + 0x2c]
div edi
movzx edx, word [ebx - 4]
mov dword [esp + 0x14], eax
imul eax, edi
sub ecx, eax
shl ecx, 0x10
or ecx, edx
mov edi, ecx
call fcn.0040a7e0
mov word [0x423428], ax
mov eax, dword [esp + 0x14]
movzx edx, si
mov ecx, eax
imul ecx, edx
cmp edi, ecx
jae 0x404d1b
add edi, esi
dec eax
cmp edi, esi
jb 0x404d1b
lea ecx, [ecx]
cmp edi, ecx
jae 0x404d1b
add edi, esi
dec eax
cmp edi, esi
jae 0x404d10
fld dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
fsub qword [0x41e570]
shl ebp, 0x10
or ebp, eax
mov eax, dword [esp + 0x6c]
mov dword [ecx + eax - 4], ebp
fstp dword [esp + 0x2c]
mov edi, ecx
or ecx, 0xffffffff
fld qword [esp + 0x84]
fsubr qword [0x41e568]
fcomp qword [0x41e560]
fnstsw ax
test ah, 1
jne 0x404d81
fld qword [0x423450]
fstp st(0)
fld dword [0x422500]
fstp st(0)
fld qword [esp + 0x7c]
fstp st(0)
fld dword [0x422500]
fsub qword [0x41e348]
fstp dword [0x422500]
mov eax, dword [esp + 0x6c]
mov ebx, 1
add dword [edi + eax - 4], ebx
jmp 0x404d95
mov ebx, ebp
or ecx, 0xffffffff
mov dx, word [0x42208c]
fld qword [0x4224a0]
movsx edx, dx
mov eax, 0x28852d04
sub eax, edx
mov edx, dword [esp + 0x1c]
add edx, eax
mov dword [esp + 0x10], edx
xor ebp, ebp
push ebx
fild dword [esp + 0x14]
fsubp st(1)
fstp qword [0x4224a0]
add word [0x42208c], bx
add dword [esp + 0x20], ecx
mov eax, dword [esp + 0x70]
add dword [edi + eax - 4], ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
add dword [esp + 0x18], ecx
add dword [esp + 0x14], ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
sub eax, ecx
sub eax, edx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x44]
push eax
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4051b4
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
lea edx, [ecx*4]
push edx
push ebp
push eax
call fcn.0040ade0
mov ecx, dword [esp + 0x54]
add esp, 0xc
mov dword [ecx], ebp
mov dword [esp + 0x40], ebx
cmp esi, ebp
jne 0x4051b4
mov esi, dword [esp + 0x20]
cmp esi, 1
jge 0x404e4c
xor eax, eax
jmp 0x404e54
mov edx, dword [esp + 0x54]
mov eax, dword [edx + esi*4 - 4]
fld dword [esp + 0x28]
mov ecx, dword [esp + 0x48]
fadd qword [0x41e348]
mov dword [ecx], eax
fstp dword [esp + 0x28]
mov edx, dword [0x424b2c]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
add eax, 0x4b6c820a
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsub dword [esp + 0x28]
fsubp st(1)
call fcn.0040a7e0
mov ecx, dword [esp + 0x54]
mov dword [0x424b2c], eax
mov edx, dword [ecx + esi*4]
mov eax, dword [esp + 0x48]
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x6c]
mov edx, dword [edi + ecx - 4]
push edx
lea eax, [esp + 0x44]
push eax
mov ecx, eax
push ecx
call fcn.00404200
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4051b4
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
dec dword [esp + 0x14]
mov ebp, 1
add dword [esp + 0x10], ebp
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
sub edx, eax
sub edx, ecx
mov dword [esp + 0x14], edx
lea edx, [esp + 0x70]
push ebp
push edx
call fcn.00401220
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x4051b4
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
lea ecx, [eax*4]
push ecx
push ebx
push edx
call fcn.0040ade0
mov eax, dword [esp + 0x84]
add esp, 0xc
mov dword [eax], ebx
mov dword [esp + 0x70], ebp
cmp esi, ebx
jne 0x4051b4
mov ecx, dword [esp + 0x5c]
cmp ecx, 2
jge 0x404f47
xor eax, eax
jmp 0x404f4f
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + ecx*4 - 8]
cmp ecx, 1
mov edx, dword [esp + 0x78]
mov dword [edx], eax
jge 0x404f5e
xor eax, eax
jmp 0x404f66
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x78]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x78]
lea eax, [esp + 0x70]
mov dword [edx + 8], ecx
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00402350
add esp, 8
test eax, eax
jg 0x404d90
mov edx, dword [esp + 0x6c]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00404200
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4051b4
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0x40]
push ebx
push eax
call fcn.00403950
mov esi, eax
add esp, 8
test esi, esi
jne 0x4051b4
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.00403610
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4051b4
fldz
lea edx, [esp + 0xa4]
fst dword [esp + 0x30]
push edx
fstp dword [esp + 0x14]
lea ecx, [esp + 0x90]
fld dword [esp + 0x14]
mov dword [esp + 0x90], eax
fstp dword [esp + 0x14]
mov eax, ebp
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0xb4], ecx
call fcn.00402350
add esp, 8
test eax, eax
jge 0x4050d8
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00401cf0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4051b4
lea eax, [esp + 0x40]
push ebx
push eax
call fcn.00403950
mov esi, eax
add esp, 8
test esi, esi
jne 0x4051b4
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.00404280
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4051b4
mov eax, dword [esp + 0x6c]
dec dword [edi + eax - 4]
fld qword [0x423948]
fadd qword [0x41e348]
fstp qword [0x423948]
fld qword [0x423948]
mov cx, word [0x4227c8]
movsx edx, cx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fsubp st(1)
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
mov eax, dword [esp + 0x5c]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], edi
jg 0x404bf0
mov edi, dword [esp + 0xc0]
test edi, edi
je 0x405127
lea eax, [esp + 0x64]
push eax
push edi
call fcn.00401cf0
mov ecx, dword [esp + 0xd0]
mov edx, dword [ecx]
mov eax, dword [esp + 0xd4]
add esp, 8
imul edx, dword [eax]
mov dword [edi], edx
mov edi, dword [esp + 0xc4]
test edi, edi
je 0x4051b4
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.00402110
lea eax, [esp + 0x3c]
push eax
push edi
call fcn.00401cf0
fldz
mov ecx, dword [esp + 0xd8]
mov edx, dword [ecx]
mov dword [edi], edx
fst dword [esp + 0x68]
fstp dword [esp + 0x28]
mov eax, 1
fld dword [esp + 0x28]
lea ecx, [esp + 0xc0]
mov dword [esp + 0xc0], eax
fstp dword [esp + 0x28]
mov dword [esp + 0xc4], eax
push ecx
lea eax, [esp + 0xa8]
push edi
mov dword [esp + 0xac], 0
mov dword [esp + 0xd0], eax
call fcn.00402350
add esp, 0x18
test eax, eax
jne 0x4051b4
mov dword [edi], 1
xor ebp, ebp
push ebp
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.00401bc0
inc word [0x422698]
mov cx, word [0x422698]
add esp, 0x18
movsx edx, cx
mov eax, 0xc479717b
sub eax, edx
mov dword [esp + 0x58], eax
pop ebx
pop edi
fild dword [esp + 0x50]
mov eax, esi
pop esi
pop ebp
fsub qword [esp + 0x74]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
fld qword [esp + 0x74]
fsub qword [0x41e348]
fstp qword [esp + 0x74]
add esp, 0xac
ret