Function at 0x40cc90
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 0x40cf13
cmp byte [ebx + 0x5c], 0x72
jne 0x40cf13
mov ecx, dword [ebx + 0x38]
cmp ecx, 0xfffffffd
je 0x40cf0b
or edx, 0xffffffff
cmp ecx, edx
je 0x40cf0b
cmp ecx, 1
jne 0x40ccd1
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 0x40cd1d
mov ecx, dword [ebx + 0x6c]
cmp ecx, edx
je 0x40cd1d
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 0x40cd1d
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 0x40ceea
jmp 0x40cd30
mov eax, dword [ebx + 0x58]
test eax, eax
jne 0x40ce52
mov eax, dword [ebx + 4]
test eax, eax
jne 0x40cd95
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40cd95
call fcn.00418e0c
mov dword [eax], 0
mov edx, dword [ebx + 0x40]
mov eax, dword [ebx + 0x44]
push edx
push 0x4000
push 1
push eax
call fcn.00418dad
add esp, 0x10
test eax, eax
mov dword [ebx + 4], eax
jne 0x40cd90
mov edx, dword [ebx + 0x40]
mov ecx, 1
mov dword [ebx + 0x3c], ecx
mov eax, dword [edx + 0xc]
test al, 0x20
jne 0x40cede
test al, 0x10
jne 0x40cee7
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.0040f190
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 0x40ce20
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x4c]
sub eax, edi
push eax
push edi
push ecx
call fcn.00410fd0
mov edi, dword [ebx + 0xc]
mov dword [ebx + 0x4c], eax
mov eax, ebx
call fcn.0040c810
cmp eax, dword [ebx + 0x4c]
jne 0x40ce46
mov eax, ebx
call fcn.0040c810
mov eax, ebx
call fcn.0040c210
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40ceea
push ebx
call fcn.0040ef00
push 0
push 0
push 0
call fcn.00410fd0
mov dword [ebx + 0x4c], eax
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40ceea
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40ceea
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40cd30
jmp 0x40ceea
mov dword [ebx + 0x38], 0xfffffffd
jmp 0x40ceea
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x10]
cmp eax, ecx
jbe 0x40ce5e
mov eax, ecx
test eax, eax
jbe 0x40ce96
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 0x40ceb5
mov ecx, dword [ebx + 0x40]
push ecx
push eax
push 1
push ebp
call fcn.00418dad
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 0x40ced5
mov dword [ebx + 0x3c], 1
mov eax, esi
pop esi
pop ebp
pop edi
pop ebx
ret 0xc
mov dword [ebx + 0x38], 0xffffffff
jmp 0x40ceea
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.00410fd0
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