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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
push edi
fldz
xor eax, eax
fst dword [esp + 0x10]
fst dword [esp + 0x40]
fst dword [esp + 0x68]
xor ecx, ecx
mov word [esp + 0x80], ax
fstp dword [esp + 0x4c]
mov word [esp + 0x18], cx
xor edx, edx
xor esi, esi
mov dword [esp + 0x20], esi
mov word [esp + 0x24], dx
mov word [esp + 0x44], ax
mov word [esp + 0x48], cx
mov dword [esp + 0x68], esi
mov dx, word [esp + 0x18]
mov ecx, dword [0x424dd4]
movsx eax, dx
mov edx, dword [esp + 0x20]
lea eax, [eax + ecx - 0x1e89b82a]
imul edx, eax
mov edi, dword [ebp + 0x14]
push esi
mov dword [esp + 0x24], edx
dec dword [0x424dd4]
push edi
call fcn.004028f0
add esp, 8
test eax, eax
jne 0x404ffe
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00401b90
mov ebx, dword [ebp + 0x10]
push edi
push ebx
call fcn.00402500
add esp, 0x20
test eax, eax
jge 0x4050ab
mov edi, dword [ebp + 8]
add dword [esp + 0x20], 0x225f4e5
cmp edi, esi
je 0x405087
fldz
push 1
fst qword [esp + 0x6c]
push edi
fstp qword [esp + 0x70]
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov edx, dword [edi + 4]
add edx, edx
add edx, edx
push edx
push eax
mov eax, dword [edi + 8]
push eax
call fcn.0040af10
mov ecx, dword [edi + 8]
add esp, 0xc
mov dword [ecx], esi
mov dword [edi], 1
test esi, esi
jne 0x405942
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4050a2
push ebx
push eax
call fcn.004025f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x28]
push ebx
push edx
call fcn.004025f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea eax, [esp + 0x50]
push edi
push eax
call fcn.004025f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov ecx, dword [ebx + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x60]
mov edi, 1
push edx
mov dword [esp + 0x58], edi
mov dword [esp + 0x30], edi
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
fldz
lea eax, [esp + 0x5c]
push edi
fst qword [esp + 0x14]
push eax
fstp qword [esp + 0x18]
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov ecx, dword [esp + 0x60]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x6c]
push eax
call fcn.0040af10
mov ecx, dword [esp + 0x70]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x5c], edi
test esi, esi
jne 0x405942
mov dx, word [esp + 0x48]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fadd qword [0x423e10]
fcomp qword [0x41f700]
fnstsw ax
test ah, 1
jne 0x405183
fld dword [0x41f6f8]
fstp dword [0x4244c0]
lea ecx, [esp + 0x34]
push 2
push ecx
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea edx, [esp + 0x8c]
push 3
push edx
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea eax, [esp + 0x50]
push eax
call fcn.00402160
mov ebx, eax
add esp, 4
and ebx, 0x8000001f
jns 0x4051d4
dec ebx
or ebx, 0xffffffe0
inc ebx
cmp ebx, 0x1f
jge 0x405277
fld qword [0x4251f8]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fsubp st(1)
fsub qword [0x424260]
mov dx, word [0x42526c]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fmulp st(1)
call fcn.0040b420
mov edi, 0x1f
sub edi, ebx
lea ecx, [esp + 0x28]
push edi
mov word [0x42526c], ax
dec dword [esp + 0x24]
push ecx
mov dword [esp + 0x24], edi
call fcn.00403000
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea edx, [esp + 0x50]
push edi
push edx
call fcn.00403000
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov ax, word [0x424200]
movzx ecx, word [esp + 0x18]
cwde
sub ecx, eax
add ecx, 0x53740fb2
mov word [esp + 0x18], cx
dec word [0x424200]
jmp 0x40527f
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x54]
dec edi
dec eax
mov dword [esp + 0x7c], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
lea edx, [esp + 0x50]
push ebx
push edx
mov dword [esp + 0x7c], eax
call fcn.00403000
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00401980
add esp, 0x10
test eax, eax
jl 0x405303
lea esp, [esp]
movzx edx, word [0x425fd8]
mov eax, dword [esp + 0x64]
add edx, 0x5ca95270
mov word [0x425fd8], dx
inc dword [eax + edi*4]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edx, ecx
push edx
call fcn.00403820
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00401980
add esp, 0x14
test eax, eax
jge 0x4052c0
lea edx, [esp + 0x50]
push ebx
push edx
call fcn.00401670
fld1
mov eax, dword [esp + 0x84]
add esp, 8
cmp eax, dword [esp + 0x74]
mov dword [esp + 0x84], eax
jle 0x405823
add edi, edi
add edi, edi
add ebx, 0xffffffe0
mov dword [esp + 0x88], edi
mov dword [esp + 0x78], ebx
lea ecx, [ecx]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x58]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x74]
mov esi, dword [edx + eax*4]
mov dword [esp + 0x7c], ecx
cmp dword [ecx], esi
jb 0x405372
mov ecx, dword [esp + 0x64]
mov dword [edi + ecx - 4], 0xffffffff
jmp 0x4054bf
mov dx, word [0x425fc0]
movsx eax, dx
mov edx, dword [0x4243a0]
add edx, eax
mov dword [esp + 0x40], edx
mov edi, esi
shr edi, 0x10
fild dword [esp + 0x40]
fadd dword [0x424e60]
fstp dword [esp + 0x40]
mov ax, word [esp + 0x18]
movsx edx, ax
sub edx, 0x31f431f4
mov dword [esp + 0x10], edx
xor edx, edx
fild dword [esp + 0x10]
fmul qword [0x425ef0]
fstp qword [0x425ef0]
mov ecx, dword [ecx]
mov eax, ecx
div edi
mov edx, dword [esp + 0x7c]
mov ebx, eax
imul eax, edi
sub ecx, eax
movzx eax, word [edx - 2]
shl ecx, 0x10
or ecx, eax
movzx edx, si
mov eax, ebx
imul eax, edx
cmp ecx, eax
jae 0x405411
add ecx, esi
dec ebx
cmp ecx, esi
jb 0x4053f7
cmp ecx, eax
jae 0x4053f7
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x4053ec
fld dword [0x4244e8]
fsub dword [esp + 0x4c]
fstp dword [0x4244e8]
fld dword [esp + 0x4c]
fsub st(1)
fstp dword [esp + 0x4c]
mov dx, word [esp + 0x80]
sub ecx, eax
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld dword [esp + 0x40]
fcompp
fnstsw ax
test ah, 5
jp 0x40543d
mov edx, 0x6133
mov word [esp + 0x18], dx
xor edx, edx
mov eax, ecx
div edi
mov edx, eax
imul edx, edi
sub ecx, edx
mov edx, dword [esp + 0x7c]
movzx edx, word [edx - 4]
shl ecx, 0x10
or ecx, edx
mov dx, word [esp + 0x44]
movsx edx, dx
mov dword [esp + 0x10], edx
movzx edi, si
fild dword [esp + 0x10]
mov edx, eax
imul edx, edi
fadd qword [0x423df0]
fadd qword [0x41f6f0]
fstp qword [0x424df8]
inc dword [esp + 0x44]
fld qword [0x423df0]
fsub st(1)
fstp qword [0x423df0]
cmp ecx, edx
jae 0x4054a9
add ecx, esi
dec eax
cmp ecx, esi
jb 0x4054a9
cmp ecx, edx
jae 0x4054a9
add ecx, esi
dec eax
cmp ecx, esi
jae 0x40549e
mov ecx, dword [esp + 0x88]
shl ebx, 0x10
or ebx, eax
mov eax, dword [esp + 0x64]
mov dword [ecx + eax - 4], ebx
mov edi, ecx
fld dword [0x424394]
mov ebx, 1
fld qword [0x423c78]
fadd qword [0x41f6e8]
fsubp st(1)
fstp dword [esp + 0x10]
fadd qword [0x423c78]
mov eax, dword [esp + 0x64]
fstp qword [0x423c78]
add dword [edi + eax - 4], ebx
dec dword [0x424ebc]
add dword [esp + 0x18], ebx
mov dx, word [esp + 0x18]
mov ecx, dword [0x424ebc]
movsx eax, dx
mov edx, dword [0x424220]
sub eax, ecx
add eax, 0x9304d204
imul edx, eax
mov dword [0x424220], edx
mov eax, dword [esp + 0x64]
fldz
dec dword [edi + eax - 4]
fst qword [esp + 0x10]
lea eax, [esp + 0x34]
fstp qword [esp + 0x10]
push ebx
push eax
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov ecx, dword [esp + 0x38]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x44]
push eax
call fcn.0040af10
mov ecx, dword [esp + 0x48]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x34], ebx
test esi, esi
jne 0x405942
mov ecx, dword [esp + 0x74]
cmp ecx, ebx
jge 0x405580
xor eax, eax
jmp 0x405588
mov edx, dword [esp + 0x58]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x3c]
mov dword [edx], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x3c]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x64]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.00404080
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405942
fldz
lea ecx, [esp + 0x8c]
push ebx
fst qword [esp + 0x14]
push ecx
fstp qword [esp + 0x18]
call fcn.004012c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040af10
mov edx, dword [esp + 0xa0]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x8c], ebx
test esi, esi
jne 0x405942
fld qword [0x423c20]
fadd qword [0x41f6e0]
call fcn.0040b420
mov ecx, dword [esp + 0x84]
cmp ecx, 2
mov word [esp + 0x48], ax
fld qword [0x423c20]
fsub qword [0x41f358]
fstp qword [0x423c20]
jge 0x405654
xor eax, eax
jmp 0x40565c
mov eax, dword [esp + 0x30]
mov eax, dword [eax + ecx*4 - 8]
cmp ecx, ebx
mov edx, dword [esp + 0x94]
mov dword [edx], eax
jge 0x40566d
xor eax, eax
jmp 0x405675
mov eax, dword [esp + 0x30]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x94]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x94]
lea eax, [esp + 0x8c]
mov dword [edx + 8], ecx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00401980
add esp, 8
test eax, eax
jg 0x40551e
mov edx, dword [esp + 0x64]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00404080
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405942
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x78]
add eax, 0x7283c1f8
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
push ecx
lea edx, [esp + 0x38]
push edx
fmul dword [0x4241ac]
fstp dword [0x4241ac]
call fcn.00403000
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edx, ecx
push edx
call fcn.00403820
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405942
fld dword [0x4249ac]
push esi
fld dword [esp + 0x44]
mov ax, word [0x4242ec]
mov edx, dword [0x424eb8]
movsx ecx, ax
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x2c]
push eax
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
fsubp st(1)
fisub dword [esp + 0x18]
fsubp st(1)
fstp dword [0x4249ac]
call fcn.004028f0
add esp, 8
test eax, eax
jge 0x4057f8
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.004025f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
mov ax, word [esp + 0x24]
mov edx, dword [esp + 0x78]
movsx ecx, ax
sub ecx, 0x5bc338f8
mov dword [esp + 0x10], ecx
push edx
lea eax, [esp + 0x38]
fild dword [esp + 0x14]
push eax
fmul qword [0x4242b8]
fstp qword [0x4242b8]
dec dword [esp + 0x2c]
call fcn.00403000
mov esi, eax
add esp, 8
test esi, esi
jne 0x405942
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x2c]
push edx
mov eax, edx
push eax
call fcn.00404be0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405942
mov eax, dword [esp + 0x64]
dec dword [edi + eax - 4]
mov eax, dword [esp + 0x84]
fld1
sub dword [esp + 0x78], 0x20
sub eax, ebx
sub edi, 4
cmp eax, dword [esp + 0x74]
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], edi
jg 0x405340
mov edi, dword [ebp + 8]
test edi, edi
je 0x40588b
dec dword [esp + 0x24]
mov cx, word [esp + 0x24]
movsx edx, cx
cmp edx, 0xa6e7a707
je 0x40586c
fld dword [0x424164]
mov eax, dword [esp + 0x20]
fadd qword [0x41f6d8]
mov dword [esp + 0x68], eax
fiadd dword [esp + 0x68]
fadd dword [esp + 0x4c]
fstp dword [esp + 0x4c]
fsubr dword [0x424164]
fstp dword [0x424164]
jmp 0x40586e
fstp st(0)
lea ecx, [esp + 0x5c]
push ecx
push edi
call fcn.004025f0
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
add esp, 8
imul eax, dword [ecx]
mov dword [edi], eax
jmp 0x40588d
fstp st(0)
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x405942
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00401670
lea ecx, [esp + 0x30]
push ecx
push edi
call fcn.004025f0
mov ebx, 1
add dword [esp + 0x58], ebx
dec dword [esp + 0x90]
movzx edx, word [esp + 0x58]
mov cx, word [esp + 0x90]
movsx eax, dx
movsx edx, cx
sub eax, edx
mov dword [0x425ee8], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [edi], ecx
fld dword [0x4241d4]
movzx edx, word [esp + 0x54]
fsubr qword [0x41f6d0]
movsx eax, dx
mov dword [esp + 0x78], eax
fild dword [esp + 0x78]
fmulp st(1)
call fcn.0040b420
push 0
push edi
mov word [esp + 0x5c], ax
call fcn.004028f0
add esp, 0x18
test eax, eax
jne 0x40591c
mov dword [edi], ebx
mov cx, word [0x423de8]
movsx edx, cx
mov eax, 0x373d1eac
sub eax, edx
mov dword [esp + 0x68], eax
fild dword [esp + 0x68]
fstp dword [0x423ce0]
add word [0x423de8], bx
push 0
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004011f0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret