Function at 0x40c566
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov dword [eax], ecx
mov edx, dword [ebp + 0x18]
mov dword [edx], 0xffffffff
mov eax, 1
test eax, eax
je 0x40c76b
mov ecx, 1
test ecx, ecx
je 0x40c64e
mov dword [ebp - 0x28], 0
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
sub eax, 0x20
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp + 0xc]
jge 0x40c5be
mov dword [ebp - 0x28], 1
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
sub ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004767a5
add esp, 0xc
mov dword [ebp - 0x30], 0
jmp 0x40c5ed
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
cmp edx, dword [ebp - 0x3c]
jge 0x40c639
push 1
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004754a4
add esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jle 0x40c635
movsx edx, byte [ebp - 0x34]
cmp edx, 0xa
jne 0x40c633
mov dword [ebp - 0x28], 2
push 1
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.004767a5
add esp, 0xc
mov dword [ebp - 0x2c], eax
jmp 0x40c637
jmp 0x40c639
jmp 0x40c5e4
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x2c]
mov dword [ecx], edx
cmp dword [ebp - 0x28], 0
je 0x40c649
jmp 0x40c64e
jmp 0x40c58a
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x38], 0
mov eax, dword [ebp + 0x28]
mov dword [eax], 0xffffffff
push 0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004767a5
add esp, 0xc
push 1
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004754a4
add esp, 0xc
mov dword [ebp - 0x40], eax
jmp 0x40c6a2
push 1
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004754a4
add esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jle 0x40c766
movsx edx, byte [ebp - 0x34]
cmp edx, 9
jne 0x40c6e8
movsx eax, byte [ebp - 0x38]
test eax, eax
jne 0x40c6e6
mov ecx, dword [ebp - 0x24]
mov byte [ebp + ecx - 0x20], 0
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp + 0x24]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
call fcn.0040c1ed
add esp, 0x10
mov ecx, dword [ebp + 0x28]
mov dword [ecx], eax
mov byte [ebp - 0x38], 1
jmp 0x40c761
movsx edx, byte [ebp - 0x34]
cmp edx, 0xa
jne 0x40c740
push 1
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.004767a5
add esp, 0xc
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x2c]
cmp edx, dword [ecx]
jle 0x40c716
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
cmp dword [ebp - 0x28], 1
jne 0x40c732
mov edx, dword [ebp + 0x28]
cmp dword [edx], 0
jne 0x40c72b
mov eax, 1
jmp 0x40c76d
mov eax, 2
jmp 0x40c76d
mov eax, dword [ebp + 0x28]
cmp dword [eax], 0xffffffff
je 0x40c73e
xor eax, eax
jmp 0x40c76d
jmp 0x40c766
movsx ecx, byte [ebp - 0x38]
test ecx, ecx
jne 0x40c761
cmp dword [ebp - 0x24], 0x1f
jge 0x40c761
mov edx, dword [ebp - 0x24]
mov al, byte [ebp - 0x34]
mov byte [ebp + edx - 0x20], al
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
jmp 0x40c68d
jmp 0x40c57d
xor eax, eax
mov esp, ebp
pop ebp
ret