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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
xor ebx, ebx
push ebx
mov edi, 0x80
push edi
push 3
push ebx
push 1
push closesocket
push 0x40a2c0
mov dword [ebp - 0x28], 0x21726152
mov dword [ebp - 0x24], 0xcf00071a
mov dword [ebp - 0x20], 0x7390
mov dword [ebp - 0x1c], 0xd
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0x7b3dc4
mov word [ebp - 0x10], 0x740
mov byte [ebp - 0xe], bl
call esi
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x401205
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x401220
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4011fe
push ebx
push edi
push 3
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
push ebx
cmp eax, 0xffffffff
jne 0x40126c
push edi
push 1
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x401215
push ebx
lea ecx, [ebp - 4]
push ecx
push 0x14
lea ecx, [ebp - 0x28]
push ecx
push eax
call esi
jmp 0x40129c
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x40128d
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 8]
call esi
jmp 0x4011fe
push ebx
push ebx
add eax, 0xfffffff9
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push 2
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x54], eax
cmp eax, ebx
je 0x401278
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2c], eax
cmp eax, ebx
jne 0x4012e1
push dword [ebp - 0x54]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc]
call esi
push dword [ebp - 8]
call esi
mov eax, ebx
jmp 0x401200
push 0x20
lea eax, [ebp - 0x50]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memset]
push dword [ebp - 0x30]
mov byte [ebp - 0x4e], 0x74
push dword [ebp - 0x2c]
call fcn.004010fd
mov dword [ebp - 0x40], eax
mov eax, 0x8000
add esp, 0x14
push dword [ebp + 0xc]
mov word [ebp - 0x4d], ax
mov eax, dword [ebp - 0x30]
mov word [ebp - 0x38], 0x3014
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x45], eax
mov dword [ebp - 0x49], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov word [ebp - 0x36], ax
mov eax, dword [ebp - 0x36]
add eax, 0x20
push edi
mov word [ebp - 0x4b], ax
lea eax, [ebp - 0xd8]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memset]
mov edi, dword [sym.imp.MSVCRT.dll_memcpy]
push 0x20
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xd8]
push eax
call edi
movzx eax, word [ebp - 0x36]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0xb8]
push eax
call edi
movzx eax, word [ebp - 0x36]
add eax, 0x1e
push eax
lea eax, [ebp - 0xd6]
push eax
call fcn.004010fd
add esp, 0x2c
mov word [ebp - 0x50], ax
mov edi, dword [ebp - 8]
push ebx
lea eax, [ebp - 4]
push eax
push 0x20
lea eax, [ebp - 0x50]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 4]
push eax
movzx eax, word [ebp - 0x36]
push eax
push dword [ebp + 0xc]
push edi
call esi
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x2c]
push edi
call esi
push ebx
lea eax, [ebp - 4]
push eax
push 7
lea eax, [ebp - 0x14]
push eax
push edi
call esi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor ebx, ebx
inc ebx
jmp 0x4012c5