Function at 0x1011d64
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], 0xfeff
je 0x1011d8c
mov dword [eax], ebx
cmp dword [ebp + 8], ebx
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
je 0x1011dc8
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp + 8]
push ebx
push ebx
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x1011dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jg 0x1011dbc
mov esi, eax
jmp 0x1011fda
and eax, 0xffff
or eax, 0x80070000
jmp 0x1011db5
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathA]
push ebx
push ebx
call esi
cmp eax, ebx
je 0x1011dab
inc eax
push eax
mov dword [ebp - 0x14], eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jne 0x1011df2
mov esi, 0x8007000e
jmp 0x1011fbe
push eax
push dword [ebp - 0x14]
call esi
cmp eax, ebx
jne 0x1011e19
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jg 0x1011e0d
mov esi, eax
jmp 0x1011fbe
and eax, 0xffff
or eax, 0x80070000
jmp 0x1011e06
mov ecx, dword [ebp - 8]
lea esi, [eax + ecx + 0xf]
push esi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
jne 0x1011e38
mov esi, 0x8007000e
jmp 0x1011fb0
push eax
push ebx
push 0x1011fe4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x1011e69
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jg 0x1011e5d
mov esi, eax
jmp 0x1011fb0
and eax, 0xffff
or eax, 0x80070000
jmp 0x1011e56
cmp dword [ebp + 8], ebx
je 0x1011e98
mov ecx, dword [ebp - 8]
mov eax, ecx
lea edx, [eax + 1]
mov dword [ebp - 0x14], edx
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x1011e79
sub eax, dword [ebp - 0x14]
push ebx
push ebx
sub esi, eax
push esi
add eax, ecx
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push ebx
push ebx
call edi
test eax, eax
je 0x1011e4c
push ebx
push 0x4002100
push 2
push ebx
push ebx
push 0xc0000000
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x1011ebb
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
je 0x1011e4c
mov edi, dword [ebp + 0x10]
cmp edi, ebx
jle 0x1011f1b
mov eax, dword [ebp + 0xc]
mov ax, word [eax]
cmp ax, word [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x1011ef1
push ebx
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
call esi
test eax, eax
je 0x1011e4c
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [edi + edi]
push eax
push dword [ebp + 0xc]
push dword [ebp - 4]
call esi
test eax, eax
je 0x1011e4c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x1011e4c
cmp dword [ebp + 0x18], ebx
je 0x1011f92
mov eax, dword [ebp - 8]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1011f26
push ebx
push ebx
sub eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push dword [ebp - 8]
mov dword [ebp + 0xc], eax
push ebx
push ebx
call esi
mov edi, eax
cmp edi, ebx
je 0x1011e4c
push edi
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x1011f62
mov esi, 0x8007000e
jmp 0x1011fa2
push edi
push eax
push dword [ebp + 0xc]
push dword [ebp - 8]
push ebx
push ebx
call esi
test eax, eax
jne 0x1011f8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1011f86
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x1011fa2
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], ebx
mov dword [eax], ecx
mov dword [ebp - 4], ebx
xor esi, esi
cmp dword [ebp + 8], ebx
je 0x1011fb0
push dword [ebp + 8]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 8], ebx
je 0x1011fbe
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0xc], ebx
je 0x1011fcc
push dword [ebp - 0xc]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 4], ebx
je 0x1011fda
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x14