Function at 0x40c22b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x40c247
push 0xffffffffffffff9a
pop eax
jmp 0x40c508
mov eax, dword [esi + 0x14]
push ebx
add eax, dword [esi + 0xc]
push edi
push eax
push dword [esi]
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
je 0x40c267
or ebx, 0xffffffff
mov dword [ebp - 4], ebx
jmp 0x40c291
lea eax, [ebp - 8]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c27e
or dword [ebp - 4], 0xffffffff
jmp 0x40c28e
cmp dword [ebp - 8], 0x2014b50
je 0x40c28e
mov dword [ebp - 4], 0xffffff99
or ebx, 0xffffffff
lea eax, [ebp - 0x5c]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c2a5
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x58]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c2b9
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x54]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c2cd
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x50]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c2e1
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x4c]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c2f5
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x4c]
call fcn.0040c50c
lea eax, [ebp - 0x48]
push eax
push dword [esi]
call fcn.0040c041
add esp, 0x10
test eax, eax
je 0x40c316
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x44]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c32a
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x40]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c33e
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x3c]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c352
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x38]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c366
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c37a
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x30]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c38e
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x2c]
push eax
push dword [esi]
call fcn.0040bfc6
pop ecx
test eax, eax
pop ecx
je 0x40c3a2
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x28]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c3b6
mov dword [ebp - 4], ebx
lea eax, [ebp - 0xc]
push eax
push dword [esi]
call fcn.0040c041
pop ecx
test eax, eax
pop ecx
je 0x40c3ca
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 4], edi
mov edx, eax
mov dword [ebp + 8], edx
jne 0x40c484
mov ecx, dword [ebp + 0x14]
cmp ecx, edi
je 0x40c424
cmp eax, dword [ebp + 0x18]
jae 0x40c3f2
and byte [eax + ecx], 0
mov eax, dword [ebp - 0x3c]
mov edi, eax
jmp 0x40c3f5
mov edi, dword [ebp + 0x18]
test eax, eax
jbe 0x40c416
cmp dword [ebp + 0x18], 0
jbe 0x40c416
push dword [esi]
push 1
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x40c416
mov dword [ebp - 4], ebx
mov edx, dword [ebp + 8]
sub edx, edi
cmp dword [ebp - 4], 0
mov dword [ebp + 8], edx
jne 0x40c484
cmp dword [ebp + 0x1c], 0
je 0x40c484
mov edi, dword [ebp - 0x38]
cmp edi, dword [ebp + 0x20]
jb 0x40c435
mov edi, dword [ebp + 0x20]
test edx, edx
je 0x40c453
push 1
push edx
push dword [esi]
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x40c450
and dword [ebp + 8], eax
jmp 0x40c453
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x38], 0
jbe 0x40c478
cmp dword [ebp + 0x20], 0
jbe 0x40c478
push dword [esi]
push 1
push edi
push dword [ebp + 0x1c]
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x40c478
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp + 8]
sub eax, edi
add edx, eax
jmp 0x40c487
add edx, dword [ebp - 0x38]
cmp dword [ebp - 4], 0
jne 0x40c504
mov edi, dword [ebp + 0x24]
test edi, edi
je 0x40c4e9
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp + 0x28]
cmp eax, ebx
jae 0x40c4a5
and byte [eax + edi], 0
mov ebx, dword [ebp - 0x34]
test edx, edx
je 0x40c4bf
push 1
push edx
push dword [esi]
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
je 0x40c4bf
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x34], 0
jbe 0x40c4e3
cmp dword [ebp + 0x28], 0
jbe 0x40c4e3
push dword [esi]
push 1
push ebx
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x40c4e3
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0
jne 0x40c504
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40c4f8
push 0x14
lea esi, [ebp - 0x5c]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40c504
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
pop ebx
pop edi
pop esi
leave
ret