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

Disassembly:
sub esp, 0xb0
fldz
push ebx
xor ebx, ebx
mov dword [esp + 0x14], ebx
fst qword [esp + 0x80]
mov dword [esp + 0x30], ebx
fst qword [esp + 0x28]
xor eax, eax
mov word [esp + 4], ax
xor ecx, ecx
mov word [esp + 8], cx
fst qword [esp + 0x4c]
xor edx, edx
mov word [esp + 4], dx
fst qword [esp + 0xac]
fstp qword [esp + 0x60]
push ebp
fldz
mov ebp, dword [esp + 0xc8]
mov word [esp + 0x1c], ax
push esi
lea eax, [esp + 0x90]
push eax
mov esi, 1
lea edx, [esp + 0x88]
mov word [esp + 0x10], cx
fstp dword [esp + 0x1c]
push ebp
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], edx
call fcn.004012c0
add esp, 8
test eax, eax
jne 0x405235
pop esi
pop ebp
lea eax, [ebx - 0xc]
pop ebx
add esp, 0xb0
ret
push edi
push ebx
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004018c0
mov edi, dword [esp + 0xe4]
push ebp
push edi
call fcn.00401ee0
add esp, 0x20
test eax, eax
jge 0x40533d
mov ax, word [0x422fd0]
add word [0x422fd0], si
movsx ecx, ax
add ecx, 0x6bdffaaa
cmp ecx, 0x5cec8286
jg 0x4052ac
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x6c], edx
fild dword [esp + 0x6c]
fsub dword [0x423414]
call fcn.0040abf0
mov dword [esp + 0x3c], eax
jmp 0x4052f2
dec dword [0x424a78]
mov eax, dword [0x424a78]
cmp eax, 0x6f111023
jne 0x4052d4
fld qword [esp + 0x6c]
fsub qword [0x41e638]
call fcn.0040abf0
mov dword [0x424ac4], eax
jmp 0x4052f2
fld qword [esp + 0x58]
fadd qword [0x41e348]
fstp qword [esp + 0x58]
fld dword [0x424e64]
fsub qword [esp + 0x58]
fstp dword [0x424e64]
mov eax, dword [esp + 0xc4]
cmp eax, ebx
je 0x405311
push ebx
push eax
call fcn.00402960
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
mov eax, dword [esp + 0xc8]
cmp eax, ebx
je 0x405330
push edi
push eax
call fcn.00402ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb0
ret
mov cx, word [0x4223f8]
movzx edx, word [esp + 0x14]
movsx eax, cx
sub eax, edx
mov word [0x4223f8], ax
lea eax, [esp + 0x28]
push edi
push eax
call fcn.00402ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
mov cx, word [0x424e30]
movsx edx, cx
cmp edx, 0x8119339f
jl 0x405390
mov ax, word [esp + 0x24]
fld qword [esp + 0x34]
mov cx, word [0x424e70]
fstp st(0)
lea edx, [esp + 0x40]
push ebp
push edx
call fcn.00402ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
mov eax, 1
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], eax
mov eax, dword [edi + 4]
add eax, 2
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.00402200
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
lea edx, [esp + 0x60]
push ebx
push edx
call fcn.00402960
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
lea eax, [esp + 0x4c]
push 2
push eax
call fcn.00402200
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
lea ecx, [esp + 0x7c]
push 3
push ecx
call fcn.00402200
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
lea edx, [esp + 0x40]
push edx
call fcn.00402140
add esp, 4
and eax, 0x8000001f
jns 0x405436
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x405478
mov edi, 0x1f
sub edi, eax
lea eax, [esp + 0x28]
push edi
push eax
mov dword [esp + 0x74], edi
call fcn.004025e0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
lea ecx, [esp + 0x40]
push edi
push ecx
call fcn.004025e0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x405a99
jmp 0x40547c
mov dword [esp + 0x6c], ebx
mov edx, dword [0x424b38]
mov ebp, dword [esp + 0x2c]
sub edx, 0x2da7fdc6
dec ebp
cmp edx, 0xe14ddec1
jg 0x4054f2
dec dword [esp + 0x24]
mov ax, word [0x423028]
mov cx, word [esp + 0x24]
cwde
movsx edx, cx
mov ecx, dword [0x4220c8]
inc word [0x423028]
sub eax, edx
add eax, 0x219c4e9
cmp eax, ecx
jl 0x4054f2
mov dx, word [0x424e30]
movsx eax, dx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x424ab0]
mov ecx, dword [0x424cd8]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
faddp st(1)
call fcn.0040abf0
mov dword [0x424cd8], eax
mov eax, dword [esp + 0x44]
dec eax
mov edi, ebp
sub edi, eax
mov ebx, edi
shl ebx, 5
lea edx, [esp + 0x40]
push ebx
push edx
mov dword [esp + 0x20], eax
call fcn.004025e0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.004012c0
add esp, 0x10
test eax, eax
jl 0x4055ae
lea esp, [esp]
mov eax, dword [esp + 0x68]
inc dword [eax + edi*4]
fld dword [0x424cbc]
mov dx, word [esp + 0x14]
movsx eax, dx
add eax, 0x6e7ee257
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x40]
push ecx
fisub dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
mov eax, edx
push eax
fstp dword [0x424cbc]
dec dword [esp + 0x20]
call fcn.00404af0
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x38]
fadd qword [esp + 0x68]
push eax
fadd qword [esp + 0x48]
fstp qword [esp + 0x48]
fld qword [esp + 0x6c]
fadd qword [0x41e348]
fstp qword [esp + 0x6c]
dec dword [esp + 0x34]
call fcn.004012c0
add esp, 0x14
test eax, eax
jge 0x405530
lea ecx, [esp + 0x40]
push ebx
push ecx
call fcn.00401130
add esp, 8
cmp ebp, dword [esp + 0x18]
mov dword [esp + 0x10], ebp
jle 0x405933
add edi, edi
add edi, edi
add ebx, 0xffffffe0
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], ebx
lea esp, [esp]
fld dword [0x422f6c]
mov esi, dword [esp + 0x18]
fsubr qword [0x41e630]
fmul dword [0x424028]
mov edx, dword [esp + 0x30]
lea ecx, [edx + ebp*4]
mov edx, dword [esp + 0x48]
fstp dword [0x424028]
mov eax, dword [ecx]
mov esi, dword [edx + esi*4]
cmp eax, esi
jb 0x405620
mov eax, dword [esp + 0x68]
or ebx, 0xffffffff
mov dword [edi + eax - 4], ebx
jmp 0x4056f7
xor edx, edx
mov edi, esi
shr edi, 0x10
div edi
mov dx, word [0x422f94]
movzx ebp, si
mov ebx, eax
movsx eax, dx
mov dword [esp + 0x1c], eax
mov edx, ebx
imul edx, edi
fild dword [esp + 0x1c]
fadd qword [esp + 0xb8]
fsub qword [0x41e628]
fstp qword [0x424a58]
dec word [0x422f94]
mov eax, dword [ecx - 4]
mov ecx, dword [ecx]
sub ecx, edx
mov dword [esp + 0x1c], eax
shr eax, 0x10
shl ecx, 0x10
or ecx, eax
mov eax, ebx
imul eax, ebp
cmp ecx, eax
jae 0x40568d
add ecx, esi
dec ebx
cmp ecx, esi
jb 0x40568d
cmp ecx, eax
jae 0x40568d
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x405682
sub ecx, eax
xor edx, edx
mov eax, ecx
div edi
mov edx, eax
imul edx, edi
sub ecx, edx
movzx edx, word [esp + 0x1c]
shl ecx, 0x10
or ecx, edx
mov edx, eax
imul edx, ebp
cmp ecx, edx
jae 0x4056dd
dec dword [esp + 0x24]
mov di, word [0x424d00]
movzx ebp, word [esp + 0x24]
movsx edi, di
add ecx, esi
sub edi, ebp
dec eax
mov word [0x424d00], di
cmp ecx, esi
jb 0x4056dd
cmp ecx, edx
jae 0x4056dd
add ecx, esi
dec eax
cmp ecx, esi
jae 0x4056d2
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x10]
shl ebx, 0x10
or ebx, eax
mov eax, dword [esp + 0x68]
mov dword [ecx + eax - 4], ebx
mov edi, ecx
or ebx, 0xffffffff
mov eax, dword [esp + 0x68]
inc dword [edi + eax - 4]
nop
mov eax, dword [esp + 0x68]
add dword [edi + eax - 4], ebx
lea edx, [esp + 0x4c]
push 0
push edx
call fcn.00402960
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a97
mov ecx, dword [esp + 0x18]
cmp ecx, 1
jl 0x405732
mov eax, dword [esp + 0x48]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x54]
mov dword [edx], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x54]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x68]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x50]
push edx
mov eax, edx
push eax
call fcn.00404720
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a97
push eax
lea ecx, [esp + 0x80]
push ecx
call fcn.00402960
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a97
cmp ebp, 2
jl 0x405791
mov edx, dword [esp + 0x30]
mov eax, dword [edx + ebp*4 - 8]
cmp ebp, 1
mov ecx, dword [esp + 0x84]
mov dword [ecx], eax
jge 0x4057a3
xor eax, eax
jmp 0x4057ab
mov edx, dword [esp + 0x30]
mov eax, dword [edx + ebp*4 - 4]
mov ecx, dword [esp + 0x84]
mov dword [ecx + 4], eax
add word [0x424cc8], bx
mov dx, word [0x424cc8]
mov eax, dword [esp + 0x30]
mov word [0x424bc8], dx
mov ecx, dword [eax + ebp*4]
mov edx, dword [esp + 0x84]
lea eax, [esp + 0x7c]
mov dword [edx + 8], ecx
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.004012c0
add esp, 8
test eax, eax
jg 0x405700
mov edx, dword [esp + 0x68]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00404720
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a97
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.004025e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a97
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, eax
push ecx
call fcn.00404af0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a97
fldz
xor edx, edx
mov word [esp + 0x10], dx
fstp dword [esp + 0x78]
mov eax, 1
lea ecx, [esp + 0xa0]
mov dword [esp + 0x78], edx
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
push ecx
lea edx, [esp + 0x2c]
lea eax, [esp + 0x7c]
push edx
mov dword [esp + 0xb0], eax
call fcn.004012c0
add esp, 8
test eax, eax
jge 0x405918
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.00402ba0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a97
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x50]
push eax
call fcn.004025e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a97
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x2c]
push edx
mov eax, edx
push eax
call fcn.00404850
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a97
mov ecx, dword [0x424cd8]
mov edx, dword [esp + 0x3c]
sub ecx, edx
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fmul qword [esp + 0x58]
mov eax, dword [esp + 0x68]
add dword [edi + eax - 4], ebx
fstp qword [esp + 0x58]
sub dword [esp + 0x14], 0x20
dec ebp
sub edi, 4
cmp ebp, dword [esp + 0x18]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], edi
jg 0x4055e0
mov edi, dword [esp + 0xc4]
test edi, edi
je 0x4059f4
lea eax, [esp + 0x60]
push eax
push edi
call fcn.00402ba0
fld qword [esp + 0x3c]
fld1
mov ecx, dword [esp + 0xd4]
mov eax, dword [esp + 0xd8]
fadd st(1), st(0)
fxch st(1)
add esp, 8
fstp qword [esp + 0x34]
fld qword [esp + 0x8c]
fsub qword [esp + 0x34]
mov edx, dword [ecx]
imul edx, dword [eax]
fstp qword [esp + 0x8c]
fld qword [esp + 0x34]
fadd qword [0x41e620]
mov dword [edi], edx
fld qword [0x424e00]
fadd qword [0x41e618]
fucompp
fnstsw ax
fld qword [esp + 0x34]
fadd st(1)
fstp qword [esp + 0x34]
test ah, 0x44
jp 0x4059c4
fstp st(0)
fld qword [0x424bb0]
fmul qword [0x41e610]
fstp qword [0x424bb0]
jmp 0x4059f4
fsubr qword [0x424e38]
fstp qword [0x424e38]
mov cx, word [0x4245e4]
movsx edx, cx
add edx, 0x4a1cd7d
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fadd qword [0x424e38]
fstp dword [0x424db8]
mov edi, dword [esp + 0xc8]
test edi, edi
je 0x405a97
mov eax, dword [esp + 0x6c]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00401130
add dword [esp + 0x44], 0x8bc52c6f
lea edx, [esp + 0x30]
push edx
push edi
call fcn.00402ba0
fld qword [esp + 0x44]
fsub qword [0x41e348]
mov eax, dword [esp + 0xdc]
mov ecx, dword [eax]
mov dword [edi], ecx
fstp qword [esp + 0x44]
xor edx, edx
fld qword [esp + 0x44]
lea ecx, [esp + 0xbc]
fstp dword [0x423078]
push ecx
fldz
mov word [esp + 0x24], dx
mov ebx, 1
fstp dword [esp + 0x88]
lea eax, [esp + 0x88]
push edi
mov dword [esp + 0x8c], edx
mov dword [esp + 0xc4], ebx
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xcc], eax
call fcn.004012c0
add esp, 0x18
test eax, eax
jne 0x405a97
mov dword [edi], ebx
xor ebx, ebx
push ebx
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004010c0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xb0
ret