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

Disassembly:
push ebp
mov ebp, eax
push edi
mov edi, edx
push esi
push ebx
sub esp, 0x9c
mov eax, dword [esp + 0xb0]
mov edx, dword [esp + 0xb4]
mov word [esp + 0x3c], ax
fild word [esp + 0x3c]
mov dword [esp + 0x64], eax
fdiv dword [0x5a4e4c]
mov dword [esp + 0x50], edx
fstp dword [esp + 0x44]
cmp ax, 1
jle 0x41cb4b
mov dword [ebp + 0x5058], 0
mov esi, ecx
mov ecx, dword [esp + 0x50]
mov edx, eax
mov eax, 0x14
cmp cx, 0x14
cmovle eax, ecx
mov ecx, esi
shl ecx, 0xf
mov word [esp + 0x58], ax
add eax, 2
mov word [esp + 0x5a], ax
cwde
mov dword [esp + 0x54], eax
lea eax, [esi - 1]
sub eax, ecx
mov ecx, eax
shr ecx, 0xa
xor eax, ecx
lea eax, [eax + eax*8]
mov ecx, eax
shr ecx, 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, [edi + eax*4]
mov ebx, dword [eax + 0x94]
mov dword [esp + 0x68], eax
cmp ebx, 0xffffffff
je 0x41c668
mov eax, dword [edi + 0x88]
jmp 0x41c628
mov ebx, dword [ebx + 8]
cmp ebx, 0xffffffff
je 0x41c668
shl ebx, 5
add ebx, eax
cmp dword [ebx], esi
jne 0x41c620
cmp word [ebx + 0xc], dx
jne 0x41c620
movzx ecx, word [esp + 0x58]
cmp word [ebx + 0xe], cx
jne 0x41c620
cmp dword [esp + 0xb8], 1
je 0x41c942
cmp word [ebx + 0x10], 0
js 0x41c66a
cmp word [ebx + 0x12], 0
js 0x41c66a
jmp 0x41c942
xor ebx, ebx
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 0x48], edi
call fcn.0041a170
mov ecx, edi
mov dword [esp + 0x3c], eax
test eax, eax
je 0x41c950
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 0x1c]
lea edx, [eax + ecx + 4]
lea ecx, [eax + ecx + 6]
movzx eax, byte [edx]
movzx edx, byte [edx + 1]
shl eax, 8
add eax, edx
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
cwde
shl edx, 8
add edx, ecx
movsx edx, dx
sub eax, edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
lea eax, [esp + 0x74]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x70]
fdivr dword [esp + 0x44]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], edx
mov dword [esp + 4], eax
fstp dword [esp + 0x4c]
call fcn.0041b150
lea eax, [esp + 0x84]
mov edx, dword [esp + 0x48]
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 + 0x3c]
fstp dword [esp + 0x10]
fld dword [esp + 0x4c]
mov dword [esp + 4], eax
mov dword [esp], edx
fst dword [esp + 0xc]
fstp dword [esp + 8]
call fcn.0041b740
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x80]
sub eax, dword [esp + 0x78]
lea ecx, [edx + edx]
mov dword [esp + 0x5c], eax
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x84]
sub eax, dword [esp + 0x7c]
add ecx, eax
cmp dword [esp + 0xb8], 2
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], ecx
je 0x41cad0
mov dword [esp + 0x88], 0xffffffff
mov dword [esp + 0x8c], 0xffffffff
test ebx, ebx
je 0x41cb5a
mov edx, dword [esp + 0x88]
movzx edi, word [esp + 0x40]
mov eax, dword [esp + 0x3c]
movzx esi, word [esp + 0x5a]
lea ecx, [edx + edi]
mov edi, dword [esp + 0x44]
fild dword [esp + 0x70]
mov word [ebx + 0x10], dx
fld dword [esp + 0x4c]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x8c]
mov word [ebx + 0x14], cx
mov ecx, edi
add ecx, eax
mov word [ebx + 0x12], ax
fmul st(1), st(0)
fxch st(1)
mov word [ebx + 0x16], cx
fmul dword [0x5a4e4c]
fnstcw word [esp + 0x6e]
movzx ecx, word [esp + 0x6e]
or ch, 0xc
mov word [esp + 0x6c], cx
movzx ecx, word [esp + 0x78]
fldcw word [esp + 0x6c]
fistp word [ebx + 0x18]
fldcw word [esp + 0x6e]
sub ecx, esi
mov word [ebx + 0x1a], cx
movzx ecx, word [esp + 0x7c]
sub ecx, esi
cmp dword [esp + 0xb8], 1
mov word [ebx + 0x1c], cx
je 0x41c940
mov esi, dword [esp + 0x3c]
mov ecx, dword [ebp]
cwde
fldz
fst dword [esp + 0x20]
movsx edx, dx
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x60]
fstp dword [esp + 0x1c]
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x5c]
fst dword [esp + 0x18]
mov dword [esp + 8], esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x10], ecx
add eax, esi
add edx, esi
fstp dword [esp + 0x14]
imul eax, ecx
add eax, edx
add eax, dword [ebp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.0041c3a0
mov ecx, dword [ebp]
movsx edx, word [ebx + 0x12]
movsx eax, word [ebx + 0x10]
imul edx, ecx
add edx, eax
add edx, dword [ebp + 0x2c]
test edi, edi
jle 0x41c8bb
mov esi, dword [esp + 0x40]
xor eax, eax
lea esi, [edx + esi - 1]
jmp 0x41c8a3
mov ecx, dword [ebp]
imul ecx, eax
mov byte [edx + ecx], 0
mov ecx, dword [ebp]
imul ecx, eax
add eax, 1
mov byte [esi + ecx], 0
cmp edi, eax
jne 0x41c8a0
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
lea edi, [eax - 1]
xor eax, eax
test ecx, ecx
jle 0x41c8f4
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x40]
lea esi, [esi]
mov byte [edx + eax], 0
mov ecx, dword [ebp]
lea esi, [edx + eax]
add eax, 1
imul ecx, edi
mov byte [esi + ecx], 0
cmp ebx, eax
jne 0x41c8d8
mov ebx, dword [esp + 0x3c]
cmp word [esp + 0x50], 0
movsx edx, word [ebx + 0x10]
movsx eax, word [ebx + 0x12]
jg 0x41c9c8
cmp dword [ebp + 0x30], edx
cmovle edx, dword [ebp + 0x30]
cmp dword [ebp + 0x34], eax
cmovle eax, dword [ebp + 0x34]
mov dword [ebp + 0x30], edx
mov edx, dword [ebp + 0x38]
mov dword [ebp + 0x34], eax
movsx eax, word [ebx + 0x14]
cmp eax, edx
cmovl eax, edx
mov edx, dword [ebp + 0x3c]
mov dword [ebp + 0x38], eax
movsx eax, word [ebx + 0x16]
cmp eax, edx
cmovl eax, edx
mov dword [ebp + 0x3c], eax
jmp 0x41c942
fstp st(0)
add esp, 0x9c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 0x4e4]
mov dword [esp + 0x40], eax
test eax, eax
jle 0x41c688
mov eax, dword [ebp + 0x40]
xor edx, edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x5c], ebp
mov ebx, edx
mov dword [esp + 0x3c], eax
jmp 0x41c98d
add ebx, 1
cmp dword [esp + 0x40], ebx
je 0x41cab8
mov eax, dword [edi + ebx*4 + 0x494]
mov edx, dword [esp + 0x3c]
mov ebp, dword [edx + eax*4]
mov dword [esp + 4], esi
mov dword [esp], ebp
call fcn.0041a170
test eax, eax
je 0x41c980
mov ecx, ebp
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], ecx
jmp 0x41c688
fild word [esp + 0x58]
mov esi, dword [ebp]
mov dword [ebp + 0x5058], 0
fld xword [0x5a4ea0]
imul eax, esi
fmulp st(1)
add eax, edx
add eax, dword [ebp + 0x2c]
mov edi, eax
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fld1
faddp st(1)
fld xword [str.3333333]
fdivrp st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fstp qword [esp]
call fcn.004a6360
mov dword [esp], esi
mov ecx, dword [esp + 0x44]
fnstcw word [esp + 0x6e]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
movzx edx, word [esp + 0x6e]
fld1
or dh, 0xc
fsubrp st(1)
mov word [esp + 0x6c], dx
fmul dword [0x5a4ebc]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x3c]
fldcw word [esp + 0x6e]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, edi
call fcn.00415480
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov dword [esp], esi
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, edi
call fcn.004153c0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov dword [esp], esi
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, edi
call fcn.00415480
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [esp], esi
mov ecx, dword [esp + 0x44]
mov dword [esp + 4], eax
mov eax, edi
call fcn.004153c0
movsx edx, word [ebx + 0x10]
movsx eax, word [ebx + 0x12]
jmp 0x41c908
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x3c], eax
mov ecx, edi
jmp 0x41c688
lea edx, [esp + 0x8c]
mov eax, dword [ebp + 0x44]
mov dword [esp + 4], edx
lea edx, [esp + 0x88]
mov dword [esp], edx
mov edx, dword [esp + 0x40]
call fcn.00416c90
test eax, eax
jne 0x41c78d
mov eax, dword [ebp + 0x5240]
test eax, eax
je 0x41cb4b
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov edx, dword [ebp + 0x5244]
mov dword [esp], edx
call eax
lea edx, [esp + 0x8c]
mov eax, dword [ebp + 0x44]
mov ecx, dword [esp + 0x44]
mov dword [esp + 4], edx
lea edx, [esp + 0x88]
mov dword [esp], edx
mov edx, dword [esp + 0x40]
call fcn.00416c90
test eax, eax
jne 0x41c78d
add esp, 0x9c
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [edi + 0x90]
mov eax, dword [edi + 0x8c]
mov ecx, dword [edi + 0x88]
cmp edx, eax
jl 0x41cba6
test eax, eax
jne 0x41cbe2
mov eax, 0x100
mov edx, 8
mov dword [edi + 0x8c], edx
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
mov dword [edi + 0x88], eax
mov ecx, eax
test eax, eax
je 0x56f49c
mov edx, dword [edi + 0x90]
lea eax, [edx + 1]
mov ebx, edx
mov dword [edi + 0x90], eax
shl ebx, 5
movzx eax, word [esp + 0x64]
add ebx, ecx
mov edi, dword [esp + 0x68]
mov word [ebx + 0xc], ax
movzx eax, word [esp + 0x58]
mov dword [ebx], esi
mov word [ebx + 0xe], ax
mov eax, dword [edi + 0x94]
mov dword [ebx + 8], eax
mov dword [edi + 0x94], edx
jmp 0x41c795
lea edx, [eax + eax]
shl eax, 6
jmp 0x41cb7e