Function at 0x40c1f0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [esp + 8]
test ebx, ebx
push edi
mov edi, eax
je 0x40c473
cmp byte [ebx + 0x5c], 0x72
jne 0x40c473
mov ecx, dword [ebx + 0x38]
cmp ecx, 0xfffffffd
je 0x40c46b
or edx, 0xffffffff
cmp ecx, edx
je 0x40c46b
cmp ecx, 1
jne 0x40c231
pop edi
xor eax, eax
pop ebx
ret 0xc
push ebp
push esi
mov esi, dword [esp + 0x1c]
test esi, esi
mov ebp, eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], esi
je 0x40c27d
mov ecx, dword [ebx + 0x6c]
cmp ecx, edx
je 0x40c27d
mov byte [eax], cl
mov ecx, dword [ebx + 0xc]
lea ebp, [eax + 1]
mov eax, dword [ebx + 0x10]
inc ecx
dec eax
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x68]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x70]
inc ecx
test eax, eax
mov dword [ebx + 0x6c], edx
mov dword [ebx + 0x68], ecx
je 0x40c27d
pop esi
pop ebp
mov eax, 1
pop edi
mov dword [ebx + 0x38], eax
pop ebx
ret 0xc
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40c44a
jmp 0x40c290
mov eax, dword [ebx + 0x58]
test eax, eax
jne 0x40c3b2
mov eax, dword [ebx + 4]
test eax, eax
jne 0x40c2f5
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40c2f5
call fcn.00417e70
mov dword [eax], 0
mov edx, dword [ebx + 0x40]
mov eax, dword [ebx + 0x44]
push edx
push 0x4000
push 1
push eax
call fcn.00417e11
add esp, 0x10
test eax, eax
mov dword [ebx + 4], eax
jne 0x40c2f0
mov edx, dword [ebx + 0x40]
mov ecx, 1
mov dword [ebx + 0x3c], ecx
mov eax, dword [edx + 0xc]
test al, 0x20
jne 0x40c43e
test al, 0x10
jne 0x40c447
mov eax, dword [ebx + 0x44]
mov dword [ebx], eax
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 4]
mov eax, dword [ebx + 0x68]
add edx, ecx
mov dword [ebx + 0x64], edx
mov edx, dword [ebx + 0x10]
push 0
add eax, edx
push ebx
mov dword [ebx + 0x68], eax
call fcn.0040e6f0
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x64]
sub edx, ecx
mov ecx, dword [ebx + 0x68]
mov dword [ebx + 0x64], edx
mov edx, dword [ebx + 0x10]
sub ecx, edx
cmp eax, 1
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x68], ecx
jne 0x40c380
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x4c]
sub eax, edi
push eax
push edi
push ecx
call fcn.00410530
mov edi, dword [ebx + 0xc]
mov dword [ebx + 0x4c], eax
mov eax, ebx
call fcn.0040bd70
cmp eax, dword [ebx + 0x4c]
jne 0x40c3a6
mov eax, ebx
call fcn.0040bd70
mov eax, ebx
call fcn.0040b770
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40c44a
push ebx
call fcn.0040e460
push 0
push 0
push 0
call fcn.00410530
mov dword [ebx + 0x4c], eax
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40c44a
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40c44a
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40c290
jmp 0x40c44a
mov dword [ebx + 0x38], 0xfffffffd
jmp 0x40c44a
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x10]
cmp eax, ecx
jbe 0x40c3be
mov eax, ecx
test eax, eax
jbe 0x40c3f6
mov esi, dword [ebx]
mov edi, dword [ebx + 0xc]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebx]
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 4]
add esi, eax
add ebp, eax
sub edx, eax
sub ecx, eax
mov dword [ebx], esi
mov esi, dword [esp + 0x1c]
mov dword [ebx + 0xc], ebp
mov dword [ebx + 0x10], edx
mov dword [ebx + 4], ecx
mov eax, dword [ebx + 0x10]
test eax, eax
jbe 0x40c415
mov ecx, dword [ebx + 0x40]
push ecx
push eax
push 1
push ebp
call fcn.00417e11
mov ecx, dword [ebx + 0x10]
add esp, 0x10
sub ecx, eax
mov dword [ebx + 0x10], ecx
mov edi, dword [ebx + 0x10]
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x68]
sub esi, edi
add edx, esi
add ecx, esi
test esi, esi
mov dword [ebx + 0x64], edx
mov dword [ebx + 0x68], ecx
jne 0x40c435
mov dword [ebx + 0x3c], 1
mov eax, esi
pop esi
pop ebp
pop edi
pop ebx
ret 0xc
mov dword [ebx + 0x38], 0xffffffff
jmp 0x40c44a
mov dword [ebx + 0x38], ecx
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x4c]
sub edx, edi
push edx
push edi
push eax
call fcn.00410530
mov ecx, dword [ebx + 0x10]
mov dword [ebx + 0x4c], eax
mov eax, esi
pop esi
pop ebp
pop edi
sub eax, ecx
pop ebx
ret 0xc
pop edi
or eax, 0xffffffff
pop ebx
ret 0xc
pop edi
mov eax, 0xfffffffe
pop ebx
ret 0xc