Function at 0x40c320
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx]
cmp eax, 1
jg 0x474783
mov eax, dword [ebx]
mov dword [ebx + 4], 0
mov byte [eax], 0
xor al, al
mov byte [ebp - 1], al
lea ecx, [ecx]
cmp dword [edi + 8], 0
je 0x4747a5
xor esi, esi
lea esp, [esp]
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 8]
je 0x40c485
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 4]
inc esi
mov al, byte [ecx + eax]
mov byte [ebp + esi + 0xa], al
lea eax, [ecx + 1]
mov dword [edi + 0xc], eax
cmp esi, 1
jb 0x40c360
add dword [edi + 0x10], esi
adc dword [edi + 0x14], 0
test esi, esi
je 0x40c4b3
mov al, byte [ebp + 0xb]
mov byte [ebp - 1], 1
cmp al, 0xd
je 0x40c42c
cmp al, 0xa
je 0x40c47a
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx]
cmp eax, 1
jg 0x4747ce
mov eax, dword [ebx + 4]
add eax, 2
cmp dword [ebx + 8], eax
jb 0x40c3e0
mov edx, dword [ebx + 4]
mov ecx, dword [ebx]
mov al, byte [ebp + 0xb]
mov byte [edx + ecx], al
inc dword [ebx + 4]
mov ecx, dword [ebx + 4]
mov eax, dword [ebx]
mov byte [ecx + eax], 0
jmp 0x40c350
cmp eax, 0x41c2
jae 0x474801
add eax, eax
mov dword [ebx + 8], eax
test eax, eax
je 0x40c4c3
add eax, 0xf
and eax, 0xfffffff0
push eax
mov dword [ebx + 8], eax
call fcn.0042010a
mov esi, eax
mov eax, dword [ebx]
add esp, 4
test eax, eax
je 0x40c428
mov ecx, dword [ebx + 4]
inc ecx
push ecx
push eax
push esi
call fcn.0041faa0
push dword [ebx]
call fcn.0042017e
add esp, 0x10
mov dword [ebx], esi
jmp 0x40c3c4
cmp dword [edi + 8], 0
je 0x4748c3
xor esi, esi
jmp 0x40c440
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 8]
je 0x4748dd
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 4]
inc esi
mov al, byte [ecx + eax]
mov byte [ebp + esi + 0xa], al
lea eax, [ecx + 1]
mov dword [edi + 0xc], eax
cmp esi, 1
jb 0x40c440
add dword [edi + 0x10], esi
adc dword [edi + 0x14], 0
test esi, esi
je 0x40c47a
cmp byte [ebp + 0xb], 0xa
jne 0x474915
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 8]
push eax
push 0x10000
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x40c385
mov eax, dword [ebp - 8]
test eax, eax
je 0x40c385
jmp 0x4747bf
mov al, byte [ebp - 1]
test al, al
jne 0x40c47a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x10
jmp 0x40c3fe
dec eax
mov dword [ecx], eax
mov ecx, ebx
call fcn.0040a6f8
push 0x10
mov dword [ebx + 8], 0x10
call fcn.0042010a
add esp, 4
mov dword [ebx], eax
jmp 0x40c33c
mov ecx, edi
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call fcn.00404dc1
jmp 0x40c35a
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x40c36c
dec eax
mov dword [ecx], eax
mov ecx, ebx
call fcn.0040a6f8
mov eax, dword [ebx + 4]
add eax, 2
push eax
call fcn.00403d82
push eax
mov dword [ebx + 8], eax
call fcn.0042010a
mov ecx, dword [ebx + 4]
inc ecx
push ecx
push dword [ebx]
mov esi, eax
push esi
call fcn.0041faa0
jmp 0x40c425
cmp eax, 0x2000000
jae 0x474844
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
test eax, eax
jns 0x474818
fadd qword [0x4b6568]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fmul qword [0x4b2750]
fnstcw word [ebp - 4]
movzx eax, word [ebp - 4]
or eax, 0xc00
mov dword [ebp - 0xc], eax
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40c3ed
cmp eax, 0x8000000
jae 0x474887
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
test eax, eax
jns 0x47485b
fadd qword [0x4b6568]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fmul qword [0x4b2748]
fnstcw word [ebp - 4]
movzx eax, word [ebp - 4]
or eax, 0xc00
mov dword [ebp - 0xc], eax
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40c3ed
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
test eax, eax
jns 0x474897
fadd qword [0x4b6568]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fmul qword [0x4b2740]
fnstcw word [ebp - 4]
movzx eax, word [ebp - 4]
or eax, 0xc00
mov dword [ebp - 0xc], eax
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40c3ed
mov ecx, edi
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call fcn.00404dc1
jmp 0x40c436
push 0
lea eax, [ebp - 0x14]
push eax
push 0x10000
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x40c465
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40c465
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x40c44c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov ecx, edi
call fcn.00404ee9
jmp 0x40c47a