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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4fc
push ebx
mov ebx, dword [ebp + 8]
push esi
cmp ebx, 7
push edi
jge 0x40116e
push 0x40d14c
call fcn.0040270e
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x40d144
mov dword [esp + 0x90], 0xac44
call fcn.00402f01
add esp, 4
test eax, eax
je 0x4011a0
lea ecx, [esp + 0x8c]
push ecx
push 0x40d140
push eax
call fcn.00402ecd
add esp, 0xc
mov edx, dword [esp + 0x8c]
push edx
push 0x40d130
call fcn.00402e9c
mov ecx, dword [0x40d044]
mov eax, dword [esp + 0x94]
and ecx, 0xffff
mov esi, dword [ebp + 0xc]
imul ecx, eax
add esp, 8
lea edx, [esp + 0xf0]
mov dword [0x40d03c], eax
mov dword [0x40d040], ecx
mov eax, dword [esi + 0xc]
push edx
push 0x40d12c
push eax
mov dword [esp + 0xf4], 0
mov dword [esp + 0xf8], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 0x40590000
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0x40590000
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc8], 0
mov dword [esp + 0xe4], 0
mov dword [esp + 0xe8], 0
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 0x40590000
call fcn.00402ecd
mov edx, dword [esi + 0x10]
add esp, 0xc
lea ecx, [esp + 0xd0]
push ecx
push 0x40d12c
push edx
call fcn.00402ecd
mov ecx, dword [esi + 0x14]
add esp, 0xc
lea eax, [esp + 0xe0]
push eax
push 0x40d12c
push ecx
call fcn.00402ecd
mov eax, dword [esi + 0x18]
add esp, 0xc
lea edx, [esp + 0xf8]
push edx
push 0x40d12c
push eax
call fcn.00402ecd
mov ecx, dword [esi + 0x10]
push 0x40
push ecx
call fcn.00402de0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x401394
lea edx, [esp + 0xa0]
lea eax, [edi + 1]
push edx
push 0x40d12c
push eax
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], 0x405e0000
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
call fcn.00402ecd
push 0x2b
push edi
call fcn.00402de0
add esp, 0x14
test eax, eax
jne 0x40135c
push 0x2d
push edi
call fcn.00402de0
add esp, 8
test eax, eax
je 0x40136f
lea ecx, [esp + 0x48]
push ecx
push 0x40d12c
push eax
call fcn.00402ecd
add esp, 0xc
fld qword [0x40c100]
fdiv qword [esp + 0xa0]
fmul qword [esp + 0xd0]
fmul qword [0x40c0f8]
fadd qword [esp + 0x48]
fstp qword [esp + 0xd0]
fld qword [esp + 0xf0]
fld st(0)
fmul qword [0x40c0f0]
cmp ebx, 0xc
fstp qword [esp + 0x58]
fld qword [esp + 0xe0]
fadd st(1)
fmul qword [0x40c0f0]
fstp qword [esp + 0x90]
fadd qword [esp + 0xd0]
fld st(0)
fsub qword [esp + 0xf8]
fmul qword [0x40c0f0]
fstp qword [esp + 0x10]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
fmul qword [0x40c0f0]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
fstp qword [esp + 0x48]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x68], ecx
mov eax, ecx
mov ecx, edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
jl 0x4015b0
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0x100]
push edx
push 0x40d12c
push eax
call fcn.00402ecd
mov edx, dword [esi + 0x20]
add esp, 0xc
lea ecx, [esp + 0xb0]
push ecx
push 0x40d12c
push edx
call fcn.00402ecd
mov ecx, dword [esi + 0x24]
add esp, 0xc
lea eax, [esp + 0x98]
push eax
push 0x40d12c
push ecx
call fcn.00402ecd
mov eax, dword [esi + 0x28]
add esp, 0xc
lea edx, [esp + 0xc0]
push edx
push 0x40d12c
push eax
call fcn.00402ecd
mov edx, dword [esi + 0x2c]
add esp, 0xc
lea ecx, [esp + 0xb8]
push ecx
push 0x40d12c
push edx
call fcn.00402ecd
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
add esp, 0xc
cmp ebx, 0xe
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
jl 0x401520
mov eax, dword [esi + 0x34]
lea edx, [esp + 0xd8]
push edx
push 0x40d12c
push eax
call fcn.00402ecd
add esp, 0xc
cmp ebx, 0x10
jl 0x401520
mov edx, dword [esi + 0x38]
lea ecx, [esp + 0xc8]
push ecx
push 0x40d12c
push edx
call fcn.00402ecd
mov ecx, dword [esi + 0x3c]
add esp, 0xc
lea eax, [esp + 0xa8]
push eax
push 0x40d12c
push ecx
call fcn.00402ecd
add esp, 0xc
fld qword [esp + 0xf0]
fld st(0)
fmul qword [0x40c0f0]
fstp qword [esp + 0x58]
fld qword [esp + 0xe0]
fadd st(1)
fmul qword [0x40c0f0]
fstp qword [esp + 0x90]
fld qword [esp + 0xf8]
fadd qword [esp + 0xe0]
fadd st(1)
fld st(0)
fmul qword [0x40c0f0]
fstp qword [esp + 0x10]
fadd qword [esp + 0xc8]
fmul qword [0x40c0f0]
fstp qword [esp + 0x30]
fadd qword [esp + 0xd0]
fld st(0)
fsub qword [esp + 0xd8]
fld st(0)
fsub qword [esp + 0x100]
fmul qword [0x40c0f0]
fstp qword [esp + 0x48]
fmul qword [0x40c0f0]
fstp qword [esp + 0x68]
fmul qword [0x40c0f0]
fstp qword [esp + 0x80]
cmp ebx, 0xd
jl 0x4015ce
mov eax, dword [esi + 0x30]
lea edx, [esp + 0xe8]
push edx
push 0x40d12c
push eax
call fcn.00402ecd
add esp, 0xc
fld qword [esp + 0xe8]
fmul qword [0x40c0f0]
fstp qword [esp + 0x40]
fld qword [esp + 0xb0]
fmul qword [0x40c0e8]
fstp qword [esp + 0xb0]
fld qword [esp + 0x98]
fmul qword [0x40c0e8]
fstp qword [esp + 0x98]
fld qword [esp + 0xc0]
fmul qword [0x40c0e8]
fstp qword [esp + 0xc0]
fld qword [esp + 0xb8]
fmul qword [0x40c0e8]
fstp qword [esp + 0xb8]
fld qword [esp + 0xa8]
fmul qword [0x40c0e8]
fstp qword [esp + 0xa8]
fld qword [esp + 0x58]
fcomp qword [esp + 0x90]
fnstsw ax
test ah, 0x41
je 0x4025b6
fld qword [esp + 0x90]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
je 0x4025b6
fld qword [esp + 0x10]
fcomp qword [esp + 0x30]
fnstsw ax
test ah, 0x41
je 0x4025b6
fld qword [esp + 0x30]
fcomp qword [esp + 0x48]
fnstsw ax
test ah, 0x41
je 0x4025b6
fld qword [esp + 0x48]
fcomp qword [esp + 0x68]
fnstsw ax
test ah, 0x41
je 0x4025b6
fld qword [esp + 0x68]
fcomp qword [esp + 0x80]
fnstsw ax
test ah, 0x41
je 0x4025b6
mov ebx, dword [esi + 4]
mov esi, dword [esi + 8]
push 0
push esi
call fcn.00401000
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x88], esi
jne 0x4016fe
push 0x2c
call fcn.00402775
push 0
mov esi, eax
push 0x40d030
push 0x24
push esi
mov dword [esp + 0x9c], esi
call fcn.004010f0
add esp, 0x14
push esi
call fcn.004010a0
add esp, 4
test eax, eax
je 0x4025c3
mov ecx, dword [esi + 4]
push ecx
push 0x40d11c
call fcn.00402e9c
add esp, 8
cmp word [esi + 0x22], 0x10
je 0x40173e
push 0x40d0f0
call fcn.0040270e
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x88]
xor edi, edi
mov edx, dword [ecx + 0x18]
mov dword [esp + 0x8c], edx
mov eax, dword [ecx + 0x10]
mov di, word [ecx + 0x16]
add eax, 0x14
add eax, ecx
mov ecx, 0x40d0b4
mov dword [esp + 0x64], eax
mov edx, dword [eax]
mov eax, dword [ecx]
cmp edx, eax
jne 0x40259d
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x88]
xor esi, esi
mov eax, dword [eax + 4]
mov si, word [ecx + 0x20]
cdq
idiv esi
mov ecx, dword [ecx + 0x18]
mov dword [esp + 0xa0], ecx
fild dword [esp + 0xa0]
fld st(0)
fmul qword [esp + 0x58]
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
mov dword [esp + 0x74], eax
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x90]
mov dword [esp + 0xc], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x10]
mov dword [esp + 0x58], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x30]
mov dword [esp + 0x2c], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x48]
mov dword [esp + 0x60], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x68]
mov dword [esp + 0x78], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fld st(0)
fmul qword [esp + 0x80]
mov dword [esp + 0x48], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
fmul qword [esp + 0x40]
mov dword [esp + 0x90], eax
fmul qword [0x40c0e0]
fadd qword [0x40c0d8]
call fcn.00402fd0
mov edx, dword [esp + 0xc]
mov dword [esp + 0x3c], eax
lea esi, [eax + eax]
mov eax, dword [esp + 0x90]
sub eax, edx
push ebx
shl eax, 1
mov dword [esp + 0x80], eax
lea edx, [esp + 0x30c]
xor eax, eax
push 0x40d0e8
push edx
mov dword [esp + 0x30], 0x24
mov dword [esp + 0x2c], eax
mov dword [esp + 0xac], eax
call fcn.00402d6f
add esp, 0xc
lea eax, [esp + 0x108]
push ebx
push 0x40d0e0
push eax
call fcn.00402d6f
push 0
lea ecx, [esp + 0x318]
push ecx
call fcn.00401000
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x90]
add esp, 0x14
cmp esi, eax
jle 0x40190b
mov ecx, dword [esp + 0x7c]
mov eax, esi
sub eax, ecx
mov dword [esp + 0x7c], esi
mov dword [esp + 0xa0], eax
mov edx, dword [esp + 0x7c]
push edx
call fcn.00402775
mov ebx, dword [esp + 0x84]
add esp, 4
test ebx, ebx
mov dword [esp + 0x1c], eax
jne 0x40194f
push 0x2c
call fcn.00402775
push ebx
push 0x40d030
push 0x24
push eax
mov dword [esp + 0x94], eax
call fcn.004010f0
add esp, 0x14
mov dword [esp + 0x3c], ebx
jmp 0x4019fd
push ebx
call fcn.004010a0
add esp, 4
test eax, eax
je 0x401b63
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x28]
test esi, esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
jle 0x401aef
lea edx, [esp + 0x108]
push 0x40d0dc
push edx
call fcn.00402a2b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4019fd
mov eax, dword [ebx + 0x10]
push eax
mov dword [esp + 0x44], eax
call fcn.00402cf7
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
add esp, 4
cmp esi, eax
jge 0x401aa5
mov eax, esi
push 2
neg eax
push eax
push ebx
call fcn.0040297f
mov ecx, dword [esp + 0x28]
push ebx
push esi
push 1
push ecx
call fcn.00402626
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x5c]
sub eax, esi
push eax
push edx
call fcn.00402bb1
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
add esp, 0x24
sub ecx, esi
sub eax, esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
push ebx
call fcn.004025d0
add esp, 4
mov eax, dword [esp + 0x80]
test eax, eax
je 0x40259d
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0xc]
mov eax, edx
mov ebx, ecx
sub eax, ecx
cmp ecx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x28], ebx
jge 0x401c8a
mov eax, ecx
mov edx, dword [esp + 0x64]
imul eax, edi
mov dword [esp + 0x40], eax
lea esi, [ecx + ecx]
lea eax, [edx + eax*2 + 8]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x38], eax
lea eax, [edx + edx]
mov edx, dword [esp + 0x24]
add edx, eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x20]
add edx, eax
mov dword [esp + 0x20], edx
cmp ebx, dword [esp + 0x74]
jge 0x401c42
sub ebx, ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], ebx
cmp edi, 2
fild dword [esp + 0x10]
fmul qword [esp + 0xb0]
fidiv dword [esp + 0x54]
jne 0x401bba
test eax, eax
jl 0x401b85
mov edx, dword [esp + 0x38]
movsx edx, word [edx]
mov dword [esp + 0x30], edx
jmp 0x401b8d
push 0
push 0
push ebx
call fcn.0040297f
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
sub ecx, eax
push ebx
push eax
add ecx, esi
push 1
push ecx
call fcn.00402626
mov edx, dword [esp + 0x5c]
push 0
push edx
call fcn.00402bb1
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
add esp, 0x24
sub ecx, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], 0
jmp 0x4019f4
jge 0x4019fd
lea ecx, [esp + 0x108]
push 0x40d0d8
push ecx
call fcn.00402a2b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4019fd
mov eax, esi
mov dword [esp + 0x10], 0
cdq
sub eax, edx
sar eax, 1
neg eax
test eax, eax
jle 0x401b4a
mov dword [esp + 0x40], eax
push ebx
push 1
lea edx, [esp + 0x18]
push 2
push edx
call fcn.00402aa7
mov eax, dword [esp + 0x50]
add esp, 0x10
dec eax
mov dword [esp + 0x40], eax
jne 0x401b2d
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub eax, esi
sub edx, esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
jmp 0x4019f4
push ebx
call fcn.00402a3e
mov edx, dword [esp + 0x8c]
add esp, 4
push edx
call fcn.00402a3e
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x30], 0
inc eax
test eax, eax
jl 0x401ba0
mov eax, dword [esp + 0x38]
movsx edx, word [eax + 2]
mov dword [esp + 0x68], edx
jmp 0x401ba8
mov dword [esp + 0x68], 0
fild dword [esp + 0x68]
fiadd dword [esp + 0x30]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x401bd7
test eax, eax
jl 0x401bcb
mov eax, dword [esp + 0x38]
movsx edx, word [eax]
mov dword [esp + 0x30], edx
jmp 0x401bd3
mov dword [esp + 0x30], 0
fimul dword [esp + 0x30]
cmp ebx, dword [esp + 0x3c]
jge 0x401bf5
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
movsx edx, word [eax + ecx]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x401c0c
fstp st(0)
fld qword [0x40c0d0]
jmp 0x401c21
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x401c21
fstp st(0)
fld qword [0x40c0c8]
mov eax, dword [esp + 0xc]
mov ebx, esi
add eax, eax
sub ebx, eax
call fcn.00402fd0
mov ecx, dword [esp + 0x1c]
mov word [ebx + ecx], ax
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x28]
jmp 0x401c5f
mov eax, dword [esp + 0x3c]
mov edx, ebx
sub edx, ecx
cmp edx, eax
jl 0x401c5f
mov eax, esi
lea edx, [ecx + ecx]
sub eax, edx
mov edx, dword [esp + 0x1c]
mov word [eax + edx], 0
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x38]
add eax, edi
inc ebx
mov dword [esp + 0x40], eax
lea eax, [edi + edi]
add edx, eax
add esi, 2
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x58]
cmp ebx, edx
mov dword [esp + 0x28], ebx
jl 0x401a61
mov eax, dword [esp + 0x2c]
mov ecx, eax
sub ecx, edx
test ecx, ecx
mov dword [esp + 0x54], ecx
jle 0x401e35
cmp edx, eax
mov dword [esp + 0x28], edx
jge 0x401e35
mov eax, edx
mov ebx, dword [esp + 0x64]
imul eax, edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], ecx
lea ebx, [ebx + eax*2 + 8]
lea eax, [ecx + ecx]
mov ecx, dword [esp + 0x24]
lea esi, [edx + edx]
add ecx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x74]
cmp edx, eax
mov eax, edx
jge 0x401de3
sub eax, dword [esp + 0x58]
cmp edi, 2
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmul qword [esp + 0x98]
fild dword [esp + 0x40]
fmul qword [esp + 0xb0]
faddp st(1)
fidiv dword [esp + 0x54]
jne 0x401d56
test ecx, ecx
jl 0x401d25
movsx eax, word [ebx]
mov dword [esp + 0x68], eax
jmp 0x401d2d
mov dword [esp + 0x68], 0
inc ecx
test ecx, ecx
jl 0x401d3c
movsx ecx, word [ebx + 2]
mov dword [esp + 0x30], ecx
jmp 0x401d44
mov dword [esp + 0x30], 0
fild dword [esp + 0x30]
fiadd dword [esp + 0x68]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x401d6f
test ecx, ecx
jl 0x401d63
movsx eax, word [ebx]
mov dword [esp + 0x30], eax
jmp 0x401d6b
mov dword [esp + 0x30], 0
fimul dword [esp + 0x30]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
sub edx, ecx
cmp edx, eax
jge 0x401d95
mov edx, dword [esp + 0x1c]
mov eax, esi
add ecx, ecx
sub eax, ecx
movsx eax, word [eax + edx]
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x401dac
fstp st(0)
fld qword [0x40c0d0]
jmp 0x401dc1
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x401dc1
fstp st(0)
fld qword [0x40c0c8]
mov ecx, dword [esp + 0xc]
mov ebx, esi
lea eax, [ecx + ecx]
sub ebx, eax
call fcn.00402fd0
mov edx, dword [esp + 0x1c]
mov word [ebx + edx], ax
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x10]
jmp 0x401e05
mov ecx, dword [esp + 0xc]
sub eax, ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x401e05
mov ecx, dword [esp + 0xc]
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [eax + ecx], 0
mov ecx, dword [esp + 0x40]
inc edx
add esi, 2
dec ecx
lea eax, [edi + edi]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x38]
add ebx, eax
mov eax, dword [esp + 0x2c]
add ecx, edi
cmp edx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], ebx
jl 0x401ce1
mov ebx, dword [esp + 0x60]
mov edx, dword [esp + 0x2c]
mov ecx, ebx
sub ecx, edx
test ecx, ecx
mov dword [esp + 0x54], ecx
jle 0x401ffa
cmp edx, ebx
mov dword [esp + 0x28], edx
jge 0x401ffa
mov esi, edx
mov ebx, dword [esp + 0x64]
mov eax, esi
mov dword [esp + 0x58], ecx
imul eax, edi
mov dword [esp + 0x40], eax
add esi, esi
lea eax, [ebx + eax*2 + 8]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x38], eax
lea eax, [ecx + ecx]
mov ecx, dword [esp + 0x20]
add ebx, eax
add ecx, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0xc]
jmp 0x401ea3
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x40]
cmp edx, dword [esp + 0x74]
jge 0x401faa
mov ebx, edx
sub ebx, dword [esp + 0x2c]
cmp edi, 2
mov dword [esp + 0x10], ebx
fild dword [esp + 0x10]
fmul qword [esp + 0xa8]
fild dword [esp + 0x58]
fmul qword [esp + 0x98]
faddp st(1)
fidiv dword [esp + 0x54]
jne 0x401f1e
test eax, eax
jl 0x401ee9
mov ebx, dword [esp + 0x38]
movsx ebx, word [ebx]
mov dword [esp + 0x30], ebx
jmp 0x401ef1
mov dword [esp + 0x30], 0
inc eax
test eax, eax
jl 0x401f04
mov eax, dword [esp + 0x38]
movsx eax, word [eax + 2]
mov dword [esp + 0x10], eax
jmp 0x401f0c
mov dword [esp + 0x10], 0
fild dword [esp + 0x10]
fiadd dword [esp + 0x30]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x401f3b
test eax, eax
jl 0x401f2f
mov eax, dword [esp + 0x38]
movsx eax, word [eax]
mov dword [esp + 0x10], eax
jmp 0x401f37
mov dword [esp + 0x10], 0
fimul dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
sub edx, ecx
cmp edx, eax
jge 0x401f5d
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
movsx edx, word [eax + ecx]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x401f74
fstp st(0)
fld qword [0x40c0d0]
jmp 0x401f89
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x401f89
fstp st(0)
fld qword [0x40c0c8]
mov eax, dword [esp + 0xc]
mov ebx, esi
add eax, eax
sub ebx, eax
call fcn.00402fd0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
mov word [ebx + ecx], ax
mov ebx, dword [esp + 0x60]
jmp 0x401fca
mov eax, edx
sub eax, ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x401fca
mov ecx, dword [esp + 0xc]
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [eax + ecx], 0
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x40]
inc edx
add esi, 2
dec ecx
add eax, edi
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x40], eax
lea eax, [edi + edi]
add ecx, eax
cmp edx, ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x38], ecx
jl 0x401e9b
mov eax, dword [esp + 0x78]
mov ecx, eax
sub ecx, ebx
test ecx, ecx
mov dword [esp + 0x54], ecx
jle 0x4021a7
mov edx, ebx
cmp ebx, eax
mov dword [esp + 0x28], edx
jge 0x4021a7
mov eax, ebx
lea esi, [ebx + ebx]
imul eax, edi
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x40], eax
mov dword [esp + 0x58], ecx
lea ebx, [ebx + eax*2 + 8]
lea eax, [ecx + ecx]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x68], ebx
add ecx, eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x74]
cmp edx, eax
mov eax, edx
jge 0x402155
sub eax, dword [esp + 0x60]
cmp edi, 2
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmul qword [esp + 0xc0]
fild dword [esp + 0x58]
fmul qword [esp + 0xa8]
faddp st(1)
fidiv dword [esp + 0x54]
jne 0x4020c8
test ecx, ecx
jl 0x402097
movsx eax, word [ebx]
mov dword [esp + 0x30], eax
jmp 0x40209f
mov dword [esp + 0x30], 0
inc ecx
test ecx, ecx
jl 0x4020ae
movsx ecx, word [ebx + 2]
mov dword [esp + 0x10], ecx
jmp 0x4020b6
mov dword [esp + 0x10], 0
fild dword [esp + 0x10]
fiadd dword [esp + 0x30]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x4020e1
test ecx, ecx
jl 0x4020d5
movsx eax, word [ebx]
mov dword [esp + 0x10], eax
jmp 0x4020dd
mov dword [esp + 0x10], 0
fimul dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
sub edx, ecx
cmp edx, eax
jge 0x402107
mov edx, dword [esp + 0x1c]
mov eax, esi
add ecx, ecx
sub eax, ecx
movsx eax, word [edx + eax]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x40211e
fstp st(0)
fld qword [0x40c0d0]
jmp 0x402133
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x402133
fstp st(0)
fld qword [0x40c0c8]
mov ecx, dword [esp + 0xc]
mov ebx, esi
lea eax, [ecx + ecx]
sub ebx, eax
call fcn.00402fd0
mov edx, dword [esp + 0x1c]
mov word [edx + ebx], ax
mov ebx, dword [esp + 0x68]
mov edx, dword [esp + 0x28]
jmp 0x402177
mov ecx, dword [esp + 0xc]
sub eax, ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x402177
mov ecx, dword [esp + 0xc]
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [ecx + eax], 0
mov ecx, dword [esp + 0x58]
inc edx
add esi, 2
dec ecx
lea eax, [edi + edi]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x40]
add ebx, eax
mov eax, dword [esp + 0x78]
add ecx, edi
cmp edx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x68], ebx
jl 0x402053
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x78]
mov ecx, edx
sub ecx, esi
test ecx, ecx
mov dword [esp + 0x54], ecx
jle 0x40236b
mov eax, esi
cmp eax, edx
mov dword [esp + 0x28], eax
jge 0x40236b
imul eax, edi
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], ecx
add esi, esi
lea eax, [ebx + eax*2 + 8]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x2c], eax
lea eax, [ecx + ecx]
mov ecx, dword [esp + 0x20]
add ebx, eax
add ecx, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x28]
jmp 0x402213
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x60]
cmp ecx, dword [esp + 0x74]
jge 0x40231b
mov edx, ecx
sub edx, dword [esp + 0x78]
cmp edi, 2
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul qword [esp + 0xb8]
fild dword [esp + 0x58]
fmul qword [esp + 0xc0]
faddp st(1)
fidiv dword [esp + 0x54]
jne 0x40228e
test eax, eax
jl 0x402259
mov edx, dword [esp + 0x2c]
movsx edx, word [edx]
mov dword [esp + 0x30], edx
jmp 0x402261
mov dword [esp + 0x30], 0
inc eax
test eax, eax
jl 0x402274
mov eax, dword [esp + 0x2c]
movsx edx, word [eax + 2]
mov dword [esp + 0x10], edx
jmp 0x40227c
mov dword [esp + 0x10], 0
fild dword [esp + 0x10]
fiadd dword [esp + 0x30]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x4022ab
test eax, eax
jl 0x40229f
mov eax, dword [esp + 0x2c]
movsx edx, word [eax]
mov dword [esp + 0x10], edx
jmp 0x4022a7
mov dword [esp + 0x10], 0
fimul dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
sub ecx, ebx
cmp ecx, eax
jge 0x4022ce
mov eax, esi
lea ecx, [ebx + ebx]
sub eax, ecx
mov ecx, dword [esp + 0x1c]
movsx edx, word [eax + ecx]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x4022e5
fstp st(0)
fld qword [0x40c0d0]
jmp 0x4022fa
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x4022fa
fstp st(0)
fld qword [0x40c0c8]
mov eax, dword [esp + 0xc]
mov ebx, esi
add eax, eax
sub ebx, eax
call fcn.00402fd0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
mov word [ebx + ecx], ax
mov ecx, dword [esp + 0x28]
jmp 0x40233b
mov eax, ecx
sub eax, ebx
mov ebx, dword [esp + 0x3c]
cmp eax, ebx
jl 0x40233b
mov ebx, dword [esp + 0xc]
mov eax, esi
add ebx, ebx
sub eax, ebx
mov ebx, dword [esp + 0x1c]
mov word [eax + ebx], 0
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x60]
inc ecx
add esi, 2
dec ebx
add eax, edi
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
lea eax, [edi + edi]
add ebx, eax
cmp ecx, edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
jl 0x40220b
mov eax, dword [esp + 0x90]
mov ecx, eax
sub ecx, edx
test ecx, ecx
mov dword [esp + 0x54], ecx
jle 0x402504
cmp edx, eax
mov dword [esp + 0x28], edx
jge 0x402504
mov eax, edx
mov ebx, dword [esp + 0x64]
imul eax, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x58], ecx
lea ebx, [ebx + eax*2 + 8]
lea eax, [ecx + ecx]
mov ecx, dword [esp + 0x24]
lea esi, [edx + edx]
add ecx, eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
cmp edx, dword [esp + 0x74]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
jge 0x4024b1
fild dword [esp + 0x58]
cmp edi, 2
fmul qword [esp + 0xb8]
fidiv dword [esp + 0x54]
jne 0x402429
test eax, eax
jl 0x4023f8
movsx eax, word [ebx]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
jmp 0x402400
mov dword [esp + 0x10], 0
inc eax
test eax, eax
jl 0x40240f
movsx eax, word [ebx + 2]
mov dword [esp + 0x48], eax
jmp 0x402417
mov dword [esp + 0x48], 0
fild dword [esp + 0x48]
fiadd dword [esp + 0x10]
fmulp st(1)
fmul qword [0x40c0d8]
jmp 0x402442
test eax, eax
jl 0x402436
movsx eax, word [ebx]
mov dword [esp + 0x48], eax
jmp 0x40243e
mov dword [esp + 0x48], 0
fimul dword [esp + 0x48]
mov eax, dword [esp + 0x3c]
sub edx, ecx
cmp edx, eax
jge 0x402464
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
movsx edx, word [eax + ecx]
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
faddp st(1)
fcom qword [0x40c0d0]
fnstsw ax
test ah, 0x41
jne 0x40247b
fstp st(0)
fld qword [0x40c0d0]
jmp 0x402490
fcom qword [0x40c0c8]
fnstsw ax
test ah, 1
je 0x402490
fstp st(0)
fld qword [0x40c0c8]
mov eax, dword [esp + 0xc]
mov ebx, esi
add eax, eax
sub ebx, eax
call fcn.00402fd0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
mov word [ebx + ecx], ax
mov ebx, dword [esp + 0x30]
jmp 0x4024d1
mov eax, edx
sub eax, ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x4024d1
mov ecx, dword [esp + 0xc]
mov eax, esi
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [eax + ecx], 0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x58]
add eax, edi
inc edx
mov dword [esp + 0x2c], eax
lea eax, [edi + edi]
add ebx, eax
mov eax, dword [esp + 0x90]
add esi, 2
dec ecx
cmp edx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x30], ebx
jl 0x4023c1
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x80]
push 0x40d0d4
lea ecx, [eax + edx]
mov edx, dword [esp + 0x24]
add eax, edx
mov dword [edi + 4], ecx
mov dword [edi + 0x28], eax
lea eax, [esp + 0x30c]
push eax
call fcn.00402a2b
mov esi, eax
add esp, 8
test esi, esi
je 0x402554
push esi
push 0x2c
push 1
push edi
call fcn.00402aa7
push esi
call fcn.004025d0
add esp, 0x14
lea ecx, [esp + 0x108]
push 0x40d0d8
push ecx
call fcn.00402a2b
mov esi, eax
add esp, 8
test esi, esi
je 0x40258a
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x1c]
push esi
push edx
push 1
push eax
call fcn.00402aa7
push esi
call fcn.004025d0
add esp, 0x14
push edi
call fcn.00402a3e
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00402a3e
add esp, 8
mov edx, dword [esp + 0x88]
push edx
call fcn.00402a3e
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x40d0bc
call fcn.0040270e
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret