Function at 0x100117b0
Capabilities:
Check if file exists
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
push ebx
push esi
push edi
push 0x1004d870
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0x1a
push 0
call ebx
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x10058618
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10011800
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011810
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x18]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x100118ab
lea eax, [esp + 0x120]
push eax
push 0
push 0
push 0x1a
push 0
call ebx
lea ecx, [esp + 0x120]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x1005871c
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10011860
lea edi, [esp + 0x120]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011873
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 1
and ecx, 3
push 0
lea eax, [esp + 0x128]
rep movsb byte es:[edi], byte [esi]
call fcn.10006570
mov dword [esp + 0x10], eax
test eax, eax
je 0x10011a76
push eax
call fcn.10011410
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0x40000000
lea edx, [esp + 0x30]
push edx
call esi
mov edi, eax
mov dword [esp + 0xc], edi
cmp edi, 0xffffffff
jne 0x100118fd
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x30]
push eax
call esi
mov dword [esp + 0xc], eax
mov edi, eax
cmp eax, 0xffffffff
je 0x10011a1d
push 2
xor ecx, ecx
push ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp dword [ebp + 0xc], 0
je 0x10011a8a
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011920
sub eax, edx
add eax, 0xc
je 0x10011a1d
lea esi, [eax + 0x13]
and esi, 0xfffffff0
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10011a1d
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
mov ecx, dword [str._pst_]
mov eax, dword [ebp + 8]
mov dword [ebx], ecx
mov dx, word [0x100476c4]
add esp, 0xc
mov word [ebx + 4], dx
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011976
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011982
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx - 1]
jmp 0x100119a0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100119a0
mov ecx, dword [str.__pst_]
mov dword [eax], ecx
mov dx, word [0x100476cc]
mov word [eax + 4], dx
mov cl, byte [0x100476ce]
mov byte [eax + 6], cl
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100119d0
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [esp + 0x18]
push ebx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10011a19
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x10011a47
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10011a47
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
je 0x10011a76
mov dword [esp + 0x10], 0
test edi, edi
je 0x10011a76
lea edx, [esp + 0x10]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10011a76
test byte [esp + 0x10], 2
jne 0x10011a76
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1004d870
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 8]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011a92
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, esi
push eax
push edx
push edi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10011a1d