Function at 0x4011a6
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 0x401214
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 [0x4130b8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x128]
mov dword [ebp - 0x12c], eax
jmp 0x40121d
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 0x401237
jmp 0x401371
and dword [ebp - 0x130], 0
jmp 0x40124d
mov eax, dword [ebp - 0x130]
inc eax
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0x32
jge 0x401286
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 0x40127c
jmp 0x401286
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401240
push 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4012a0
cmp dword [ebp - 8], 0xffffffff
jne 0x4012aa
jmp 0x401371
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 0x4012cf
jmp 0x401371
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 8]
jae 0x40130e
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 0x4012fa
jmp 0x401371
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 0x4012d5
mov dword [ebp - 0xc], 1
cmp dword [ebp + 0x14], 2
jae 0x401371
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 0x401352
mov eax, dword [ebp - 0x134]
movzx eax, word [eax + 0x16]
or eax, 0x2000
mov ecx, dword [ebp - 0x134]
mov word [ecx + 0x16], ax
jmp 0x401371
cmp dword [ebp + 0x14], 1
jne 0x401371
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 0x401380
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0
jne 0x4013aa
cmp dword [ebp - 0x10], 0
je 0x40139c
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 0x4013ba
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