Function at 0x4010d4
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
and dword [ebp - 0xc], 0
and dword [ebp - 0x12c], 0
and dword [ebp - 0x10], 0
or dword [ebp - 0x18], 0xffffffff
and dword [ebp - 8], 0
and dword [ebp - 4], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
jne 0x401142
push 0x104
push 0
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x128]
push eax
push dword [0x416990]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x128]
mov dword [ebp - 0x12c], eax
jmp 0x40114b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x12c], eax
push dword [ebp - 0x12c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401165
jmp 0x40129f
and dword [ebp - 0x130], 0
jmp 0x40117b
mov eax, dword [ebp - 0x130]
inc eax
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0x32
jge 0x4011b4
push 0
push 0
push 3
push 0
push 1
push connect
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x4011aa
jmp 0x4011b4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40116e
push 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4011ce
cmp dword [ebp - 8], 0xffffffff
jne 0x4011d8
jmp 0x40129f
push 4
push 0x3000
push dword [ebp - 8]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4011fd
jmp 0x40129f
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 8]
jae 0x40123c
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401228
jmp 0x40129f
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
jmp 0x401203
mov dword [ebp - 0xc], 1
cmp dword [ebp + 0x14], 2
jae 0x40129f
and dword [ebp - 0x134], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x134], ecx
cmp dword [ebp + 0x14], 0
jne 0x401280
mov eax, dword [ebp - 0x134]
movzx eax, word [eax + 0x16]
or eax, 0x2000
mov ecx, dword [ebp - 0x134]
mov word [ecx + 0x16], ax
jmp 0x40129f
cmp dword [ebp + 0x14], 1
jne 0x40129f
mov eax, dword [ebp - 0x134]
movzx eax, word [eax + 0x16]
and eax, 0xdfff
mov ecx, dword [ebp - 0x134]
mov word [ecx + 0x16], ax
cmp dword [ebp - 0x18], 0xffffffff
je 0x4012ae
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0
jne 0x4012d8
cmp dword [ebp - 0x10], 0
je 0x4012ca
push 0x8000
push 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0x10]
and dword [eax], 0
jmp 0x4012e8
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
leave
ret 0x10