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

Disassembly:
push ebp
mov ebp, edx
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x9c
mov eax, dword [esp + 0xb0]
mov edx, dword [esp + 0xb4]
mov word [esp + 0x34], ax
fild word [esp + 0x34]
mov dword [esp + 0x64], eax
fdiv dword [0x5a703c]
mov dword [esp + 0x48], edx
fstp dword [esp + 0x3c]
cmp ax, 1
jle 0x41f4cf
mov dword [edi + 0x5058], 0
mov esi, ecx
mov ecx, dword [esp + 0x48]
mov edx, eax
mov eax, 0x14
cmp cx, ax
cmovle eax, ecx
mov ecx, esi
shl ecx, 0xf
mov word [esp + 0x50], ax
add eax, 2
mov word [esp + 0x52], ax
cwde
mov dword [esp + 0x4c], eax
lea eax, [esi - 1]
sub eax, ecx
mov ecx, eax
shr ecx, 0xa
xor eax, ecx
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 6
xor eax, ecx
mov ecx, eax
sub eax, 1
shl ecx, 0xb
sub eax, ecx
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
movzx eax, al
lea eax, [ebp + eax*4]
mov ebx, dword [eax + 0xe4]
mov dword [esp + 0x68], eax
cmp ebx, 0xffffffff
je 0x41eff8
mov eax, dword [ebp + 0xd8]
jmp 0x41efb8
mov ebx, dword [ebx + 8]
cmp ebx, 0xffffffff
je 0x41eff8
shl ebx, 5
add ebx, eax
cmp dword [ebx], esi
jne 0x41efb0
cmp word [ebx + 0xc], dx
jne 0x41efb0
movzx ecx, word [esp + 0x50]
cmp word [ebx + 0xe], cx
jne 0x41efb0
cmp dword [esp + 0xb8], 1
je 0x41f2c2
cmp word [ebx + 0x10], 0
js 0x41effa
cmp word [ebx + 0x12], 0
js 0x41effa
jmp 0x41f2c2
xor ebx, ebx
mov dword [esp + 4], esi
mov dword [esp], ebp
mov dword [esp + 0x40], ebp
call fcn.0041c220
mov ecx, ebp
mov dword [esp + 0x34], eax
test eax, eax
je 0x41f2d0
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 4]
lea edx, [edx + eax + 0x12]
movzx eax, byte [edx]
movzx edx, byte [edx + 1]
shl eax, 8
add eax, edx
mov edx, dword [esp + 0x40]
movzx eax, ax
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
lea eax, [esp + 0x74]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x70]
fdivr dword [esp + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp], edx
mov dword [esp + 4], eax
fstp dword [esp + 0x44]
call fcn.0041d3d0
lea eax, [esp + 0x84]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x80]
fldz
mov dword [esp + 0x20], eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x78]
fst dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
fstp dword [esp + 0x10]
fld dword [esp + 0x44]
mov dword [esp + 4], eax
mov dword [esp], edx
fst dword [esp + 0xc]
fstp dword [esp + 8]
call fcn.0041e130
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x80]
mov ecx, dword [esp + 0x7c]
sub edx, eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x5c], edx
add eax, eax
mov dword [esp + 0x58], ecx
add edx, eax
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x84]
sub edx, ecx
add eax, edx
cmp dword [esp + 0xb8], 2
mov dword [esp + 0x60], edx
mov dword [esp + 0x3c], eax
je 0x41f450
mov dword [esp + 0x88], 0xffffffff
mov dword [esp + 0x8c], 0xffffffff
test ebx, ebx
je 0x41f4de
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x88]
movzx ecx, word [esp + 0x38]
mov esi, dword [esp + 0x3c]
movzx ebp, word [esp + 0x52]
fild dword [esp + 0x70]
mov dword [ebx + 4], eax
add ecx, edx
mov eax, dword [esp + 0x8c]
mov word [ebx + 0x10], dx
mov word [ebx + 0x14], cx
mov ecx, esi
fld dword [esp + 0x44]
add ecx, eax
mov word [ebx + 0x12], ax
mov word [ebx + 0x16], cx
fnstcw word [esp + 0x6e]
fmul st(1), st(0)
fxch st(1)
fmul dword [0x5a703c]
movzx ecx, word [esp + 0x6e]
or ch, 0xc
mov word [esp + 0x6c], cx
movzx ecx, word [esp + 0x54]
fldcw word [esp + 0x6c]
fistp word [ebx + 0x18]
fldcw word [esp + 0x6e]
sub ecx, ebp
mov word [ebx + 0x1a], cx
movzx ecx, word [esp + 0x58]
sub ecx, ebp
cmp dword [esp + 0xb8], 1
mov word [ebx + 0x1c], cx
je 0x41f2c0
mov ebp, dword [esp + 0x34]
mov ecx, dword [edi]
cwde
fldz
fst dword [esp + 0x20]
movsx edx, dx
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x60]
fstp dword [esp + 0x1c]
mov dword [esp + 0xc], ebp
mov ebp, dword [esp + 0x5c]
fst dword [esp + 0x18]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x10], ecx
add eax, ebp
add edx, ebp
fstp dword [esp + 0x14]
mov ebp, esi
imul eax, ecx
add eax, edx
add eax, dword [edi + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.0041ed50
mov ecx, dword [edi]
movsx edx, word [ebx + 0x12]
movsx eax, word [ebx + 0x10]
imul edx, ecx
add edx, eax
add edx, dword [edi + 0x2c]
test esi, esi
jle 0x41f239
mov esi, dword [esp + 0x38]
xor eax, eax
lea esi, [edx + esi - 1]
jmp 0x41f222
mov ecx, dword [edi]
imul ecx, eax
mov byte [edx + ecx], 0
mov ecx, dword [edi]
imul ecx, eax
add eax, 1
mov byte [esi + ecx], 0
cmp ebp, eax
jne 0x41f220
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea ebp, [eax - 1]
xor eax, eax
test ecx, ecx
jle 0x41f273
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x38]
lea esi, [esi]
mov byte [edx + eax], 0
mov ecx, dword [edi]
lea esi, [edx + eax]
add eax, 1
imul ecx, ebp
mov byte [esi + ecx], 0
cmp ebx, eax
jne 0x41f258
mov ebx, dword [esp + 0x34]
cmp word [esp + 0x48], 0
movsx edx, word [ebx + 0x10]
movsx eax, word [ebx + 0x12]
jg 0x41f348
mov ecx, dword [edi + 0x30]
cmp ecx, edx
cmovg ecx, edx
mov edx, dword [edi + 0x34]
cmp edx, eax
mov dword [edi + 0x30], ecx
cmovg edx, eax
movsx eax, word [ebx + 0x14]
mov dword [edi + 0x34], edx
mov edx, dword [edi + 0x38]
cmp eax, edx
cmovl eax, edx
mov edx, dword [edi + 0x3c]
mov dword [edi + 0x38], eax
movsx eax, word [ebx + 0x16]
cmp eax, edx
cmovl eax, edx
mov dword [edi + 0x3c], eax
jmp 0x41f2c2
fstp st(0)
add esp, 0x9c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x534]
mov dword [esp + 0x38], eax
test eax, eax
jle 0x41f018
mov eax, dword [edi + 0x40]
xor edx, edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x54], edi
mov ebx, edx
mov dword [esp + 0x34], eax
jmp 0x41f30d
add ebx, 1
cmp dword [esp + 0x38], ebx
je 0x41f438
mov eax, dword [ebp + ebx*4 + 0x4e4]
mov edi, dword [esp + 0x34]
mov edi, dword [edi + eax*4]
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0041c220
test eax, eax
je 0x41f300
mov ecx, edi
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
jmp 0x41f018
fild word [esp + 0x50]
mov esi, dword [edi]
mov dword [edi + 0x5058], 0
fld xword [0x5a7090]
imul eax, esi
fmulp st(1)
add eax, edx
add eax, dword [edi + 0x2c]
mov dword [esp + 0x40], eax
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fld1
faddp st(1)
fld xword [str.3333333]
fdivrp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp qword [esp]
call fcn.004aa250
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov dword [esp], esi
fnstcw word [esp + 0x6e]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
movzx edx, word [esp + 0x6e]
fld1
or dh, 0xc
fsubrp st(1)
mov word [esp + 0x6c], dx
fmul dword [0x5a70ac]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x34]
fldcw word [esp + 0x6e]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x34], eax
mov dword [esp + 4], ebp
call fcn.00415120
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov dword [esp], esi
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x34]
call fcn.00415060
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov dword [esp], esi
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x34]
call fcn.00415120
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov dword [esp], esi
mov dword [esp + 4], ebp
mov ecx, dword [esp + 0x3c]
call fcn.00415060
movsx edx, word [ebx + 0x10]
movsx eax, word [ebx + 0x12]
jmp 0x41f287
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x34], eax
mov ecx, ebp
jmp 0x41f018
lea edx, [esp + 0x8c]
mov eax, dword [edi + 0x44]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], edx
lea edx, [esp + 0x88]
mov dword [esp], edx
mov edx, dword [esp + 0x38]
call fcn.00417360
test eax, eax
jne 0x41f115
mov eax, dword [edi + 0x5240]
test eax, eax
je 0x41f4cf
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov edx, dword [edi + 0x5244]
mov dword [esp], edx
call eax
lea edx, [esp + 0x8c]
mov eax, dword [edi + 0x44]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], edx
lea edx, [esp + 0x88]
mov dword [esp], edx
mov edx, dword [esp + 0x38]
call fcn.00417360
test eax, eax
jne 0x41f115
add esp, 0x9c
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 0xe0]
mov eax, dword [ebp + 0xdc]
mov ecx, dword [ebp + 0xd8]
cmp edx, eax
jl 0x41f52a
test eax, eax
jne 0x41f566
mov eax, 0x100
mov edx, 8
mov dword [ebp + 0xdc], edx
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
mov dword [ebp + 0xd8], eax
mov ecx, eax
test eax, eax
je 0x571f4c
mov edx, dword [ebp + 0xe0]
lea eax, [edx + 1]
mov ebx, edx
mov dword [ebp + 0xe0], eax
shl ebx, 5
movzx eax, word [esp + 0x64]
add ebx, ecx
mov dword [ebx], esi
mov esi, dword [esp + 0x68]
mov word [ebx + 0xc], ax
movzx eax, word [esp + 0x50]
mov word [ebx + 0xe], ax
mov eax, dword [esi + 0xe4]
mov dword [ebx + 8], eax
mov dword [esi + 0xe4], edx
jmp 0x41f11d
lea edx, [eax + eax]
shl eax, 6
jmp 0x41f502