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

Disassembly:
sub esp, 0x8c
fldz
push ebx
mov ebx, dword [esp + 0xa0]
fst qword [esp + 0x60]
push ebp
xor ebp, ebp
xor eax, eax
mov word [esp + 0x7c], ax
mov dword [esp + 0x30], ebp
xor ecx, ecx
mov word [esp + 0x10], cx
mov dword [esp + 0xc], ebp
xor edx, edx
mov word [esp + 0x20], dx
mov dword [esp + 0x90], ebp
fstp qword [esp + 0x28]
fldz
mov dword [esp + 8], ebp
push ebp
fst dword [esp + 0x64]
push ebx
fstp dword [esp + 0x80]
call fcn.004038e0
add esp, 8
test eax, eax
jne 0x4061ba
lea eax, [ebp - 0xc]
pop ebp
pop ebx
add esp, 0x8c
ret
push esi
push edi
push ebp
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.004012f0
mov edi, dword [esp + 0xc0]
push ebx
push edi
call fcn.004011f0
add esp, 0x20
test eax, eax
jge 0x406259
mov edx, dword [esp + 0x38]
mov eax, dword [0x423124]
sub edx, 0x3260960a
imul edx, eax
mov eax, dword [esp + 0xa0]
mov dword [0x423124], edx
cmp eax, ebp
je 0x40622d
push ebp
push eax
call fcn.004017f0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
mov eax, dword [esp + 0xa4]
cmp eax, ebp
je 0x40624c
push edi
push eax
call fcn.00402de0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8c
ret
lea ecx, [esp + 0x3c]
push edi
push ecx
call fcn.00402de0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea edx, [esp + 0x48]
push ebx
push edx
call fcn.00402de0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
movzx eax, word [esp + 0x18]
mov ecx, 0xee4658fb
sub ecx, eax
add ecx, dword [esp + 0x14]
movzx edx, word [esp + 0x18]
imul ecx, edx
mov word [esp + 0x18], cx
mov eax, 1
add dword [esp + 0x18], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], eax
add dword [esp + 0x10], 0xaae7dd35
mov eax, dword [edi + 4]
add eax, 2
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.00401350
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea eax, [esp + 0x74]
mov edx, 0xffffe15d
push ebp
push eax
mov word [0x424270], dx
call fcn.004017f0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea ecx, [esp + 0x58]
push 2
push ecx
call fcn.00401350
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea edx, [esp + 0x8c]
push 3
push edx
call fcn.00401350
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea eax, [esp + 0x48]
push eax
call fcn.00401f90
add esp, 4
and eax, 0x8000001f
jns 0x40634f
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x4063c8
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
mov edi, 0x1f
fld dword [esp + 0x80]
sub edi, eax
fadd qword [0x41f710]
mov dword [esp + 0x88], edi
fsub qword [0x41f708]
fsubp st(1)
call fcn.0040af50
lea edx, [esp + 0x3c]
push edi
push edx
mov dword [esp + 0x40], eax
call fcn.004020f0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
lea eax, [esp + 0x48]
push edi
push eax
call fcn.004020f0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406b5f
add dword [0x425ad8], 0xa10e340d
jmp 0x4063cf
mov dword [esp + 0x88], ebp
mov cx, word [0x425488]
movsx edx, cx
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [0x4231a0]
fsubr dword [esp + 0x24]
call fcn.0040af50
mov ebx, dword [esp + 0x40]
mov word [0x425488], ax
fld qword [0x423100]
fadd qword [0x41f700]
dec ebx
mov edi, ebx
fstp qword [0x425ad0]
fld qword [0x423100]
mov eax, dword [esp + 0x4c]
fsub qword [0x41f340]
dec eax
sub edi, eax
mov ebp, edi
mov dword [esp + 0x64], eax
fstp qword [0x423100]
shl ebp, 5
lea eax, [esp + 0x48]
push ebp
push eax
call fcn.004020f0
dec dword [esp + 0x1c]
mov ecx, dword [0x4241e8]
mov edx, dword [esp + 0x1c]
sub ecx, edx
lea eax, [esp + 0x50]
mov dword [0x4241e8], ecx
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.004026e0
add esp, 0x10
test eax, eax
jl 0x40649f
lea esp, [esp]
mov eax, dword [esp + 0x7c]
inc dword [eax + edi*4]
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x40]
push eax
mov ecx, eax
push ecx
call fcn.00405a50
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.004026e0
add esp, 0x14
test eax, eax
jge 0x406470
lea ecx, [esp + 0x48]
push ebp
push ecx
call fcn.004027e0
add esp, 8
cmp ebx, dword [esp + 0x64]
mov dword [esp + 0x54], ebx
jle 0x406ac3
lea eax, [edi*4]
add ebp, 0xffffffe0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebp
jmp 0x4064d4
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x54]
lea ebp, [edx + ecx*4]
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x64]
lea ecx, [edx + ecx*4]
mov edx, dword [ebp]
mov dword [esp + 0x30], ebp
cmp edx, dword [ecx]
jb 0x40650d
mov ecx, dword [esp + 0x7c]
or ebp, 0xffffffff
mov dword [eax + ecx - 4], ebp
mov ecx, dword [esp + 0x7c]
inc dword [eax + ecx - 4]
jmp 0x406854
mov edx, dword [esp + 0x98]
cmp edx, 0xcdc00745
jg 0x40652e
mov eax, dword [0x4235bc]
imul eax, eax, 0x36848c17
mov dword [0x4235bc], eax
jmp 0x40655e
mov dx, word [0x425264]
movsx eax, dx
mov edx, dword [esp + 0x10]
add edx, eax
mov dword [esp + 0x2c], edx
or eax, 0xffffffff
fild dword [esp + 0x2c]
fadd qword [esp + 0x6c]
fstp qword [0x423598]
add word [0x425264], ax
add dword [esp + 0x10], eax
mov edi, dword [ecx]
mov esi, dword [ebp]
mov eax, esi
xor edx, edx
mov ebx, edi
shr ebx, 0x10
div ebx
mov ecx, eax
imul ecx, ebx
sub esi, ecx
mov ecx, dword [0x425914]
movzx edx, word [0x423184]
add ecx, 0xec6dbb0f
imul edx, ecx
mov word [0x423184], dx
movzx ecx, word [ebp - 2]
mov ebp, eax
mov dword [esp + 0x2c], eax
movzx eax, di
imul ebp, eax
shl esi, 0x10
or esi, ecx
cmp esi, ebp
jae 0x4065f1
fld dword [esp + 0x68]
mov dx, word [0x4241f8]
fadd qword [0x41f6f8]
movsx eax, dx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
faddp st(1)
call fcn.0040af50
mov word [0x4241f8], ax
mov eax, 1
sub dword [esp + 0x2c], eax
add esi, edi
cmp esi, edi
jb 0x4065f1
cmp esi, ebp
jae 0x4065f1
sub dword [esp + 0x2c], eax
add esi, edi
cmp esi, edi
jae 0x4065e3
dec word [0x4235d0]
mov cx, word [0x4235d0]
movsx edx, cx
mov dword [esp + 0x1c], edx
sub esi, ebp
fild dword [esp + 0x1c]
fadd qword [0x4235d8]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
faddp st(1)
call fcn.0040af50
mov dword [esp + 0x10], eax
mov ecx, dword [0x4235c8]
xor edx, edx
mov eax, esi
div ebx
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [0x4254d8]
fmul dword [esp + 0x1c]
mov ebp, eax
call fcn.0040af50
mov edx, ebp
imul edx, ebx
mov dword [0x4235c8], eax
mov eax, dword [esp + 0x30]
movzx ecx, word [eax - 4]
sub esi, edx
shl esi, 0x10
or esi, ecx
movzx eax, di
mov ecx, ebp
imul ecx, eax
mov dword [esp + 0x10], 0x9a1be334
cmp esi, ecx
jae 0x4067a7
fld qword [esp + 0x6c]
mov edx, 1
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x6c]
fld qword [0x4235b0]
fsubr qword [0x41f6f0]
fld dword [0x423174]
fadd qword [0x41f6e8]
fsub qword [esp + 0x6c]
fucompp
fnstsw ax
fld dword [0x423174]
fadd st(1)
fstp dword [0x423174]
test ah, 0x44
jp 0x40673f
add dword [0x42476c], edx
movzx eax, word [esp + 0x84]
cwde
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fadd qword [0x4254e8]
movzx eax, word [esp + 0x18]
mov ebx, dword [0x42476c]
dec dword [esp + 0x18]
add dword [esp + 0x84], edx
cwde
lea eax, [eax + ebx - 0x10923aec]
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40672f
add dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
fld dword [0x42424c]
fstp st(0)
fld dword [0x423120]
fstp st(0)
jmp 0x40673f
mov ax, word [0x42306c]
cwde
sub eax, 0x2b6f245a
mov dword [esp + 0x14], eax
mov ax, word [0x423068]
cwde
add eax, 0x56826705
mov dword [esp + 0x30], eax
add esi, edi
sub ebp, edx
fild dword [esp + 0x30]
fld qword [0x425ab0]
fld qword [0x425440]
fsubp st(2)
fsubrp st(1)
fstp qword [0x425ab0]
fld qword [0x425440]
fsub st(1)
fstp qword [0x425440]
cmp esi, edi
jb 0x40678b
cmp esi, ecx
jae 0x40678b
add esi, edi
sub ebp, edx
cmp esi, edi
jae 0x40677f
fld qword [0x424278]
fstp qword [0x4254a0]
fld qword [0x424278]
fsub st(1)
fstp qword [0x424278]
jmp 0x4067a9
fld1
mov cx, word [0x4253e4]
movzx edx, word [esp + 0x28]
movsx eax, cx
mov ecx, dword [esp + 0x7c]
add edx, eax
mov eax, dword [esp + 0x2c]
mov word [esp + 0x28], dx
mov edx, dword [esp + 0x20]
fadd dword [esp + 0x68]
shl eax, 0x10
or eax, ebp
mov dword [edx + ecx - 4], eax
fstp dword [esp + 0x68]
fld dword [0x42314c]
fsub dword [esp + 0x68]
fcomp qword [0x4252a8]
fnstsw ax
test ah, 1
jne 0x406810
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x7c]
imul eax, eax, 0xbd701c6b
mov dword [esp + 0x14], eax
mov eax, edx
or ebp, 0xffffffff
inc dword [eax + ecx - 4]
jmp 0x406854
mov cx, word [0x424270]
movsx edx, cx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fld qword [esp + 0x6c]
fsub qword [0x41f6e0]
fsub qword [0x41f6d8]
fsubp st(1)
call fcn.0040af50
mov ecx, dword [esp + 0x7c]
mov word [0x424270], ax
mov eax, dword [esp + 0x20]
or ebp, 0xffffffff
inc dword [eax + ecx - 4]
jmp 0x406854
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x7c]
add dword [eax + ecx - 4], ebp
lea eax, [esp + 0x58]
push 0
push eax
call fcn.004017f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406b5d
mov ecx, dword [esp + 0x64]
cmp ecx, 1
jl 0x406886
mov edx, dword [esp + 0x50]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x60]
mov dword [edx], eax
mov ax, word [0x425488]
mov edx, dword [esp + 0x38]
cwde
add edx, eax
mov word [0x425488], dx
add dword [esp + 0x38], ebp
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x60]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x5c]
push eax
mov ecx, eax
push ecx
call fcn.00404e80
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406b5d
movzx edx, word [esp + 0x28]
mov ecx, dword [0x4235c8]
movsx eax, dx
movzx edx, word [esp + 0x18]
lea eax, [eax + ecx + 0x4b357a94]
imul edx, eax
lea eax, [esp + 0x8c]
push esi
push eax
mov word [esp + 0x20], dx
call fcn.004017f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406b5d
mov eax, dword [esp + 0x54]
cmp eax, 2
jge 0x406923
xor ecx, ecx
jmp 0x40692b
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0x94]
mov dword [edx], ecx
jge 0x40693d
xor ecx, ecx
jmp 0x406945
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x94]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x44]
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 + 0x5c]
push edx
call fcn.004026e0
add esp, 8
test eax, eax
jg 0x406850
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fadd qword [esp + 0x6c]
fld dword [esp + 0x80]
fsub qword [0x41f6d0]
fcompp
fnstsw ax
test ah, 0x41
jp 0x4069c9
fld qword [0x4230d8]
fsub qword [0x41f340]
fstp qword [0x4230d8]
fld qword [0x4230d8]
fsubr qword [0x41f6c8]
fmul qword [esp + 0x6c]
fstp qword [esp + 0x6c]
mov ecx, dword [esp + 0x7c]
mov edi, dword [esp + 0x20]
mov edx, dword [edi + ecx - 4]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x60]
push ecx
call fcn.00404e80
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406b5d
mov ebx, dword [esp + 0x24]
lea edx, [esp + 0x58]
push ebx
push edx
mov dword [esp + 0x1c], 0x9f48fe1c
call fcn.004020f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406b5d
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x40]
push ecx
mov edx, ecx
push edx
call fcn.00405a50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406b5d
push eax
lea eax, [esp + 0x40]
push eax
call fcn.004038e0
add esp, 8
test eax, eax
jge 0x406aa2
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x5c]
push edx
call fcn.00402de0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406b5d
lea eax, [esp + 0x58]
push ebx
push eax
call fcn.004020f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406b5d
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x40]
push edx
mov eax, edx
push eax
call fcn.00404800
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406b5d
mov eax, dword [esp + 0x7c]
add dword [edi + eax - 4], ebp
mov eax, dword [esp + 0x54]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x54], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], edi
jg 0x4064d0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fld dword [esp + 0x80]
fadd qword [0x41f6c0]
fsubp st(1)
call fcn.0040af50
mov edi, dword [esp + 0xa0]
mov dword [esp + 0x14], eax
test edi, edi
je 0x406b15
lea edx, [esp + 0x74]
push edx
push edi
call fcn.00402de0
mov eax, dword [esp + 0xb0]
mov ecx, dword [eax]
mov edx, dword [esp + 0xb4]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
mov edi, dword [esp + 0xa4]
test edi, edi
je 0x406b5d
mov eax, dword [esp + 0x88]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.004027e0
lea edx, [esp + 0x44]
push edx
push edi
call fcn.00402de0
mov eax, dword [esp + 0xb8]
mov ecx, dword [eax]
push 0
push edi
mov dword [edi], ecx
call fcn.004038e0
add esp, 0x18
test eax, eax
jne 0x406b5d
mov dword [edi], 1
xor ebp, ebp
push ebp
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x50]
push eax
call fcn.00401df0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret