Function at 0x10011f1
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
push 0x3c
push 0x1001378
call fcn.01001bfe
mov eax, dword [ebp + 8]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x40], ebx
xor eax, eax
mov dword [0x100704c], eax
xor edi, edi
inc edi
mov dword [0x1007048], edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], eax
mov esi, dword [0x10073f4]
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
xor ecx, ecx
cmp ebx, eax
sete cl
mov eax, ecx
mov dword [0x1007058], eax
test eax, eax
jne 0x10012d1
lea eax, [ebp - 0x44]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x100703c], eax
cmp eax, 0xffffffff
je 0x10044ff
xor eax, eax
mov ecx, dword [0x100703c]
cmp ecx, eax
je 0x1002e70
cmp dword [ebp - 0x44], eax
jne 0x1002e8b
test ecx, ecx
js 0x1002e8b
push eax
push eax
push eax
push 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x34], eax
xor ecx, ecx
cmp eax, ecx
je 0x100450a
push ecx
push ecx
push ecx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x1007054], eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1007054]
test eax, eax
je 0x1002e8b
mov dword [0x10073f4], eax
mov esi, eax
mov dword [0x1007038], edi
xor eax, eax
cmp dword [0x1007058], eax
jne 0x100284c
cmp dword [0x100fe48], eax
jne 0x100284c
test dword [0x1007040], 0x100
jne 0x1004528
call fcn.01001961
mov edx, eax
mov eax, dword [ebp - 0x30]
lea ecx, [edx + eax]
test ecx, ecx
jle 0x1001394
cmp dword [0x1007058], 0
jne 0x10028a5
cmp dword [0x100fe48], 0
jne 0x10028a5
sub edx, eax
add edx, esi
mov ebx, edx
and dword [0x100703c], 0
mov dword [0x1007038], edi
and dword [ebp - 4], 0
mov edi, dword [ebp - 0x3c]
lea edi, [edi*4 + 0x10073f4]
push dword [ebp - 0x38]
push ebx
push dword [edi]
call dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 0xfffffffe
test eax, eax
jne 0x10045c9
sub ebx, dword [edi]
add dword [0x100704c], ebx
xor dword [ebp - 0x3c], 1
xor edi, edi
inc edi
jmp 0x10012fb
cmp dword [0x1007058], 0
jne 0x10013b6
cmp dword [0x100fe48], 0
jne 0x10013b6
mov eax, dword [0x1007054]
test eax, eax
je 0x10013b6
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call fcn.010013be
ret 0xc
mov esi, 0x100be14
mov dword [0x10073f4], esi
push eax
push 0x100703c
push 0x2000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [0x1007038], eax
jmp 0x10012eb
cmp edx, 0xffffffff
je 0x1004561
lea eax, [edx + esi - 1]
push eax
call fcn.01002664
mov dword [ebp - 0x30], eax
sub edx, eax
add edx, esi
mov ebx, edx
mov ecx, dword [ebp - 0x3c]
xor ecx, edi
lea edi, [ecx*4 + 0x10073f4]
mov esi, dword [edi]
push eax
push ebx
push esi
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov ecx, dword [ebp - 0x30]
add esi, ecx
mov eax, 0x2000
cmp ecx, 0x1000
jg 0x1004574
sub eax, ecx
and eax, 0xfffffc00
push eax
push esi
push dword [ebp - 0x40]
call fcn.0100290c
jmp 0x100133d
cmp dword [ebp - 0x44], eax
je 0x10013b6
jmp 0x1001272
test eax, eax
je 0x1001262
jmp 0x10013b6
mov dword [0x100fe48], edi
jmp 0x10012d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1002e7e
push dword [0x1007044]
push 0xd
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.0100508a
add esp, 0xc
jmp 0x10013b6
mov dword [ebp - 0x34], esi
mov ebx, dword [0x100703c]
jmp 0x1004558
mov eax, dword [ebp - 0x34]
mov al, byte [eax]
cmp al, 0x20
jae 0x1004555
movzx eax, al
push eax
push 0x1004658
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x1001394
inc dword [ebp - 0x34]
dec ebx
je 0x10012fb
jmp 0x1004533
mov byte [esi], 0xd
inc esi
mov byte [esi], 0xa
inc esi
mov ebx, esi
and dword [ebp - 0x30], 0
jmp 0x100133d
cmp ecx, eax
jl 0x10045c2
add dword [0x100704c], ecx
and dword [ebp - 0x30], 0
mov esi, dword [edi]
push eax
push esi
push dword [ebp - 0x40]
call fcn.0100290c
push 0xa
lea eax, [ebp - 0x2c]
push eax
push dword [0x1007048]
call dword [sym.imp.msvcrt.dll__ultoa]
lea eax, [ebp - 0x2c]
push eax
push dword [0x1007044]
push 0x12
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.0100508a
add esp, 0x1c
jmp 0x100133d
sub eax, ecx
jmp 0x10028f8
mov eax, dword [ebp - 0x38]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10045cf
sub eax, edx
push 0
push eax
push dword [ebp - 0x38]
call dword [0x1007024]
xor esi, esi
push esi
push 2
push 0x1004788
call dword [0x1007024]
cmp dword [0x1007058], esi
jne 0x10013b6
cmp dword [0x100fe48], esi
jne 0x10013b6
mov eax, dword [0x1007054]
cmp eax, esi
jmp 0x10013ad