Function at 0x10011410
Capabilities:
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
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x1005871c
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10011444
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011454
mov ebx, dword [ebp + 8]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10011472
sub eax, ecx
push eax
push ebx
lea eax, [esp + 0x20]
call fcn.100064d0
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x10058618
mov ecx, eax
jmp 0x100114b0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100114b0
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100114c0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0
push 0x80
push 3
push 0
mov ecx, eax
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0xc0000000
lea ecx, [esp + 0x30]
push ecx
call esi
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
jne 0x10011527
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea edx, [esp + 0x30]
push edx
call esi
mov dword [esp + 0x10], eax
cmp eax, edi
je 0x1001179a
mov edi, eax
push 2
xor ecx, ecx
push ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011540
sub eax, edx
add eax, 0x208
je 0x1001176b
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 0x1001176b
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 8]
mov ecx, 7
mov esi, str._n_n
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
add esp, 0xc
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011595
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100115a1
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]
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100115c0
mov cx, word [0x10047690]
mov word [eax], cx
mov dl, byte [0x10047692]
push 0x104
mov byte [eax + 2], dl
lea eax, [esp + 0x124]
push eax
push str.HH:mm:ss
push 0
push 0
push 0x409
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
lea eax, [esp + 0x120]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011605
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011611
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 edi, [ebx - 1]
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10011630
mov cx, word [0x10047694]
push 0x104
lea edx, [esp + 0x124]
push edx
push str.dd:MMM:yyyy
push 0
push 0
push 0x409
mov word [edi], cx
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
lea eax, [esp + 0x120]
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011670
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10011680
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]
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100116a0
mov ecx, dword [str.___]
mov dword [eax], ecx
mov dl, byte [0x1004769c]
mov byte [eax + 4], dl
push 0x104
lea eax, [esp + 0x124]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x120]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100116d7
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100116e3
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 edi, [ebx - 1]
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10011700
mov ecx, 7
mov esi, str.__n
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
lea edx, [eax + 1]
jmp 0x10011720
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10011720
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
mov edx, dword [esp + 0x18]
push eax
push ebx
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
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 0x10011767
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x10]
cmp edi, 0xffffffff
je 0x1001179a
mov dword [esp + 0x10], 0
test edi, edi
je 0x1001179a
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1001179a
test byte [esp + 0x10], 2
jne 0x1001179a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4