Function at 0x40c2b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
mov esi, ecx
je 0x40c555
cmp byte [edi], 0
je 0x40c555
mov eax, dword [esi]
call dword [eax + 8]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c2d6
sub eax, edx
push eax
push edi
lea ecx, [esi + 4]
call fcn.00402720
mov al, byte [esp + 0x18]
mov byte [esi + 0x20], al
neg al
push 0
push 0x8000005
push 3
push 0
push 3
sbb eax, eax
and eax, 0xc0000000
add eax, 0xc0000000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x24], eax
jne 0x40c33c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 3
call fcn.00408d90
add esp, 0x10
pop edi
xor al, al
pop esi
add esp, 8
ret 8
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x28
lea edx, [esi + 0x28]
push edx
push eax
call ebp
test eax, eax
je 0x40c534
cmp dword [esp + 0x18], 0x28
jne 0x40c534
mov al, byte [esi + 0x20]
test al, al
je 0x40c38e
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40c38e
push 0x41e67c
push 7
call fcn.00408d90
add esp, 8
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x40c3c8
mov edx, dword [esi + 0x34]
push edx
push edi
push str.file:__s__point_d
push 6
call fcn.00408d90
add esp, 0x10
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 0x20]
push eax
push 0x60000
lea ecx, [esi + 0x50]
push ecx
push edx
call ebp
test eax, eax
je 0x40c512
cmp dword [esp + 0x1c], 0x60000
jne 0x40c512
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x24]
push 0
push 0
push eax
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x40c40c
mov edx, dword [esi + 0x38]
jmp 0x40c3ab
mov eax, dword [esi + 0x3c]
lea ebx, [esi + 0x60050]
push eax
mov ecx, ebx
call fcn.0040c0c0
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x60054]
push 0
lea edx, [esp + 0x20]
push edx
lea eax, [eax + eax*2]
shl eax, 2
push eax
push ecx
mov ecx, dword [esi + 0x24]
push ecx
call ebp
test eax, eax
je 0x40c512
mov eax, dword [esi + 0x3c]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x1c]
shl edx, 2
cmp eax, edx
jne 0x40c512
mov ecx, ebx
xor edi, edi
call fcn.0040a240
test eax, eax
jbe 0x40c4c5
xor ebp, ebp
jmp 0x40c470
mov eax, dword [esi + 0x60054]
mov ecx, dword [eax + ebp]
mov edx, dword [esi + 0x44]
add eax, ebp
cmp ecx, edx
jb 0x40c4f7
mov edx, dword [eax + 8]
shr edx, 0x1f
test dl, 1
jne 0x40c4b6
mov eax, dword [eax + 4]
push eax
call fcn.00409ce0
add esp, 4
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esi + 0x60060]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
call fcn.0040bd70
mov ecx, ebx
inc edi
add ebp, 0xc
call fcn.0040a240
cmp edi, eax
jb 0x40c470
mov al, byte [esi + 0x20]
test al, al
jne 0x40c4eb
mov ecx, esi
mov dword [esi + 0x30], 1
mov dword [esi + 0x2c], 0x10001
call fcn.00409d00
mov eax, dword [esi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
pop ebx
pop ebp
pop edi
mov al, 1
pop esi
add esp, 8
ret 8
push 0x41e67c
push 2
call fcn.00408d90
add esp, 8
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.00408d90
add esp, 0xc
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.00408d90
add esp, 0xc
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
push 0x41e67c
push 0xa
call fcn.00408d90
add esp, 8
pop edi
xor al, al
pop esi
add esp, 8
ret 8