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

Disassembly:
sub esp, 0x50
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x10], ebp
mov eax, dword [ebp + 0x30]
test eax, eax
jle 0x41f71a
mov al, byte [0x596f08]
test al, 1
jne 0x41f049
mov dl, al
push 0x41f750
or dl, 1
mov byte [0x596f08], dl
call fcn.00476928
add esp, 4
mov al, byte [0x596f08]
test al, 2
jne 0x41f06a
mov dl, al
push 0x41f740
or dl, 2
mov byte [0x596f08], dl
call fcn.00476928
add esp, 4
mov al, byte [0x596f08]
test al, 4
jne 0x41f08b
mov dl, al
push 0x41f730
or dl, 4
mov byte [0x596f08], dl
call fcn.00476928
add esp, 4
mov ebx, dword [esp + 0x64]
push ebx
push 0
push 0x596f50
call fcn.004440b3
mov al, byte [0x59a47c]
mov ecx, 0x10
mov esi, 0x596f50
mov edi, 0x597060
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x10
mov esi, ebx
mov edi, 0x596fc0
mov dword [0x597090], 0
mov dword [0x597094], 0
mov dword [0x597098], 0
rep movsd dword es:[edi], dword [esi]
test al, 1
mov dword [0x596ff0], 0
mov dword [0x596ff4], 0
mov dword [0x596ff8], 0
jne 0x41f118
mov dl, al
push fcn.0041a480
or dl, 1
mov byte [0x59a47c], dl
call fcn.00476928
add esp, 4
mov eax, dword [esp + 0x68]
fld dword [0x596f70]
fmul dword [eax + 8]
fld dword [0x596f60]
fmul dword [eax + 4]
faddp st(1)
fld dword [0x596f50]
fmul dword [eax]
faddp st(1)
fadd dword [0x596f80]
fstp dword [0x59a480]
fld dword [0x596f74]
fmul dword [eax + 8]
fld dword [0x596f64]
fmul dword [eax + 4]
faddp st(1)
fld dword [0x596f54]
fmul dword [eax]
faddp st(1)
fadd dword [0x596f84]
fstp dword [0x59a484]
fld dword [0x596f58]
fmul dword [eax]
fld dword [0x596f78]
fmul dword [eax + 8]
mov ecx, dword [0x59a484]
mov dword [esp + 0x34], ecx
faddp st(1)
fld dword [0x596f68]
fmul dword [eax + 4]
mov eax, dword [0x59a480]
mov dword [esp + 0x30], eax
mov al, byte [0x59a47c]
faddp st(1)
test al, 1
fadd dword [0x596f88]
fstp dword [0x59a488]
mov edx, dword [0x59a488]
mov dword [esp + 0x38], edx
jne 0x41f1d8
mov dl, al
push fcn.0041a480
or dl, 1
mov byte [0x59a47c], dl
call fcn.00476928
add esp, 4
mov eax, dword [esp + 0x6c]
xor esi, esi
fld dword [0x597080]
fmul dword [eax + 8]
fld dword [0x597070]
fmul dword [eax + 4]
faddp st(1)
fld dword [0x597060]
fmul dword [eax]
faddp st(1)
fadd dword [0x597090]
fstp dword [0x59a480]
fld dword [0x597084]
fmul dword [eax + 8]
fld dword [0x597074]
fmul dword [eax + 4]
faddp st(1)
fld dword [0x597064]
fmul dword [eax]
faddp st(1)
fadd dword [0x597094]
fstp dword [0x59a484]
fld dword [0x597088]
fmul dword [eax + 8]
fld dword [0x597078]
fmul dword [eax + 4]
mov ecx, dword [0x59a484]
mov dword [esp + 0x28], ecx
faddp st(1)
fld dword [0x597068]
fmul dword [eax]
mov eax, dword [0x59a480]
mov dword [esp + 0x24], eax
faddp st(1)
fadd dword [0x597098]
fstp dword [0x59a488]
mov ecx, dword [ebp + 0x38]
mov edx, dword [0x59a488]
cmp ecx, esi
mov dword [esp + 0x2c], edx
jle 0x41f290
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
jmp 0x41f2a1
mov ecx, dword [ebp + 0x30]
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov eax, edx
mov dword [esp + 0x6c], edx
cmp eax, esi
mov dword [esp + 0x18], esi
jle 0x41f71a
mov edi, 2
mov dword [esp + 0x68], esi
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x38]
test eax, eax
jle 0x41f2e3
mov edx, dword [ebp + 0x34]
mov eax, dword [esp + 0x68]
add eax, edx
xor ebx, ebx
xor esi, esi
xor edi, edi
mov bx, word [eax]
mov si, word [eax + 2]
mov di, word [eax + 4]
jmp 0x41f2e9
lea ebx, [edi - 2]
lea esi, [edi - 1]
mov eax, dword [ebp + 0x2c]
lea ecx, [edi + edi*2]
lea edx, [eax + ecx*4]
lea ecx, [esi + esi*2]
mov dword [esp + 0x20], edx
lea edx, [eax + ecx*4]
lea ecx, [ebx + ebx*2]
mov dword [esp + 0x1c], edx
lea ebp, [eax + ecx*4]
mov al, byte [0x59a3b0]
test al, 1
jne 0x41f327
mov dl, al
push fcn.0041a480
or dl, 1
mov byte [0x59a3b0], dl
call fcn.00476928
add esp, 4
mov al, byte [0x59a3b0]
test al, 2
jne 0x41f348
mov dl, al
push fcn.0041a480
or dl, 2
mov byte [0x59a3b0], dl
call fcn.00476928
add esp, 4
mov al, byte [0x59a3b0]
test al, 4
jne 0x41f369
mov dl, al
push fcn.0041a480
or dl, 4
mov byte [0x59a3b0], dl
call fcn.00476928
add esp, 4
mov al, byte [0x59a3b0]
test al, 8
jne 0x41f38a
mov dl, al
push fcn.0041a480
or dl, 8
mov byte [0x59a3b0], dl
call fcn.00476928
add esp, 4
mov al, byte [0x59a3b0]
test al, 0x10
jne 0x41f3ab
mov dl, al
push fcn.0041a480
or dl, 0x10
mov byte [0x59a3b0], dl
call fcn.00476928
add esp, 4
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x3c]
push ebp
push edx
call fcn.00412140
push eax
mov ecx, 0x59a3c0
call fcn.00411f70
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x48]
push ebp
push eax
call fcn.00412140
push eax
mov ecx, 0x59a3d0
call fcn.00411f70
push 0x59a3d0
push 0x59a3c0
mov ecx, 0x59a3e0
call fcn.00419cc0
lea ecx, [esp + 0x24]
push ecx
mov ecx, 0x59a3e0
call fcn.0041b270
fst dword [0x59a3ec]
fcomp dword [0x4a7ac4]
fnstsw ax
test ah, 0x41
je 0x41f523
lea edx, [esp + 0x24]
push 0x59a3d0
push edx
mov ecx, 0x59a3e0
call fcn.00419cc0
push 0x59a3e0
mov ecx, 0x59a3c0
call fcn.0041b270
fst dword [0x59a3ec]
fcomp dword [0x4a7a44]
fnstsw ax
test ah, 1
jne 0x41f523
lea eax, [esp + 0x54]
push ebp
push eax
lea ecx, [esp + 0x38]
call fcn.00412140
push eax
mov ecx, 0x59a3f0
call fcn.00411f70
push 0x59a3e0
mov ecx, 0x59a3f0
call fcn.0041b270
fst dword [0x59a3fc]
fcomp dword [0x4a7898]
fnstsw ax
test ah, 1
jne 0x41f523
fld dword [0x59a3fc]
fcomp dword [0x59a3ec]
fnstsw ax
test ah, 0x41
je 0x41f523
push 0x59a3c0
push 0x59a3f0
mov ecx, 0x59a400
call fcn.00419cc0
lea ecx, [esp + 0x24]
push 0x59a400
push ecx
call fcn.0041b250
fst dword [0x59a40c]
fcomp dword [0x4a7898]
add esp, 8
fnstsw ax
test ah, 1
jne 0x41f523
fld dword [0x59a40c]
fadd dword [0x59a3fc]
fcomp dword [0x59a3ec]
fnstsw ax
test ah, 0x41
je 0x41f523
push 0x59a400
push 0x59a3d0
call fcn.0041b250
fdiv dword [0x59a3ec]
add esp, 8
fst dword [0x59a410]
fcomp dword [0x4a7898]
fnstsw ax
test ah, 1
je 0x41f559
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
inc eax
add esi, 6
add edx, 3
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x68], esi
mov dword [esp + 0x14], edx
jge 0x41f71a
mov ebp, dword [esp + 0x10]
mov edi, edx
jmp 0x41f2c0
mov ebp, dword [esp + 0x70]
test ebp, ebp
je 0x41f64c
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x68]
push ebp
push ecx
mov eax, dword [edx + 0x2c]
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x7c]
lea edx, [edi + edi*2]
push ecx
lea ecx, [eax + edx*4]
lea edx, [esi + esi*2]
push ecx
lea ecx, [eax + edx*4]
lea edx, [ebx + ebx*2]
push ecx
lea ecx, [esp + 0x3c]
lea eax, [eax + edx*4]
lea edx, [esp + 0x48]
push eax
push ecx
push edx
call fcn.0041b290
mov al, byte [0x59a540]
add esp, 0x24
test al, 1
jne 0x41f5c4
mov dl, al
push fcn.0041a480
or dl, 1
mov byte [0x59a540], dl
call fcn.00476928
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push eax
push ecx
push edx
mov ecx, 0x59a550
call fcn.00411f50
mov eax, dword [esp + 0x64]
fld dword [0x59a558]
fmul dword [eax + 0x20]
fld dword [0x59a554]
fmul dword [eax + 0x10]
faddp st(1)
fld dword [0x59a550]
fmul dword [eax]
faddp st(1)
fadd dword [eax + 0x30]
fstp dword [ebp]
fld dword [0x59a558]
fmul dword [eax + 0x24]
fld dword [0x59a554]
fmul dword [eax + 0x14]
faddp st(1)
fld dword [0x59a550]
fmul dword [eax + 4]
faddp st(1)
fadd dword [eax + 0x34]
fstp dword [ebp + 4]
fld dword [0x59a558]
fmul dword [eax + 0x28]
fld dword [0x59a554]
fmul dword [eax + 0x18]
faddp st(1)
fld dword [0x59a550]
fmul dword [eax + 8]
faddp st(1)
fadd dword [eax + 0x38]
fstp dword [ebp + 8]
mov eax, dword [esp + 0x74]
test eax, eax
je 0x41f70e
mov eax, dword [esp + 0x10]
lea esi, [esi + esi*2]
lea ecx, [edi + edi*2]
mov ebp, dword [eax + 0x2c]
mov al, byte [0x59a57c]
shl esi, 2
test al, 1
lea edi, [ebp + ecx*4]
jne 0x41f68d
mov dl, al
push fcn.0041a480
or dl, 1
mov byte [0x59a57c], dl
call fcn.00476928
add esp, 4
fld dword [edi]
fsub dword [esi + ebp]
fstp dword [0x59a580]
fld dword [edi + 4]
fsub dword [esi + ebp + 4]
mov edx, dword [0x59a580]
fstp dword [0x59a584]
fld dword [edi + 8]
fsub dword [esi + ebp + 8]
mov eax, dword [0x59a584]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x40], eax
fstp dword [0x59a588]
mov ecx, dword [0x59a588]
mov eax, dword [edx + 0x2c]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x3c]
lea edx, [ebx + ebx*2]
push ecx
lea ecx, [eax + edx*4]
lea edx, [esp + 0x58]
push ecx
push edx
lea ecx, [esi + eax]
call fcn.00412140
mov esi, dword [esp + 0x78]
push eax
mov ecx, esi
call fcn.00419cc0
push 0x596fc0
mov ecx, esi
call fcn.00411f90
mov ecx, esi
call fcn.00419c70
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x50
ret 0x14
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x50
ret 0x14