Function at 0x40c030
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], edi
test eax, eax
jg 0x40c062
jl 0x40c055
test ecx, ecx
jne 0x40c062
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40c122
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov ecx, ebx
call fcn.0040e1c0
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x40c0ce
jg 0x40c08d
test esi, esi
je 0x40c0ce
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jg 0x40c0a5
mov eax, dword [esp + 0xc]
jl 0x40c09f
cmp eax, esi
jae 0x40c0a5
mov esi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.0055be30
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
sub ecx, esi
sbb edx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x40c0ef
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x40c10b
mov ecx, dword [esp + 0xc]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
test edx, edx
jg 0x40c074
jl 0x40c10b
test ecx, ecx
jne 0x40c074
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0x10]
sbb ecx, edx
mov edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov esi, ecx
mov edx, dword [eax]
test edx, edx
je 0x40c16d
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0xc], esi
mov eax, dword [eax]
test eax, eax
je 0x40c171
mov edi, dword [esp + 0x10]
cmp eax, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.0055be30
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x1c], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, edi
mov dword [esp + 0xc], esi
jmp 0x40c171
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x4c], 0
je 0x40c21b
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40c19c
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov edx, esi
cmp esi, 0xfff
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
jbe 0x40c1d8
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.00566351
sub edi, eax
add esp, 0x10
add esi, eax
mov dword [esp + 0x14], edi
mov edx, edi
cmp eax, 0xfff
jne 0x40c207
cmp edi, eax
ja 0x40c1b0
mov ecx, edx
test edx, edx
je 0x40c21f
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.00566351
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [ebp + 0x10]
sub ecx, eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc