Function at 0x40110c
Capabilities:
Get common file path
Get file size
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x401167
push ebx
push ebx
push ebx
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x401167
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x401167
mov dword [ebp - 4], ebx
jmp 0x401170
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov al, byte [0x401080]
push esi
push edi
push 0x40
mov byte [ebp - 0x21c], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x21b]
rep stosd dword es:[edi], eax
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x21c]
push eax
call esi
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x21d]
mov cl, byte [eax]
cmp cl, bl
je 0x4011c1
cmp cl, 0x5c
je 0x4011c1
dec eax
jmp 0x4011b3
cmp byte [eax], 0x5c
jne 0x4011c9
mov byte [eax + 1], bl
mov al, byte [0x401080]
push 0x40
mov byte [ebp - 0x118], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x117]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x118]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp byte [ebp - 0x118], bl
jne 0x40120c
lea eax, [ebp - 0x118]
push 0x40107c
push eax
call esi
lea eax, [ebp - 0x118]
push eax
call fcn.004010ee
cmp dword [ebp - 4], ebx
pop ecx
jne 0x4012f3
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 0x10]
call esi
push dword [ebp + 0xc]
push ebx
push 0x401078
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
mov edi, 0x40000000
je 0x401261
push ebx
push ebx
push 2
push ebx
push ebx
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4012a6
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 0x10]
call esi
push dword [ebp + 0xc]
push ebx
push 0x401078
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40129b
push ebx
push ebx
push 2
push ebx
push ebx
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4012a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4012f3
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 0x14]
cmp ecx, eax
jne 0x4012c0
mov dword [ebp - 4], 2
jmp 0x4012e4
lea edx, [ebp - 0x14]
push ebx
sub eax, ecx
push edx
push eax
mov eax, dword [ebp - 8]
add eax, ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4012e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0xffffffff
je 0x4012f3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], ebx
pop edi
pop esi
je 0x401303
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0xc], ebx
pop ebx
je 0x401312
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0xffffffff
je 0x401321
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
leave
ret