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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
push ebx
mov ebx, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push esi
push edi
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0x1a
push 0
call ebx
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x10056ef4
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1000cb86
lea edi, [esp + 0x28]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000cb96
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1000cbb2
mov edx, dword [ebp + 8]
sub eax, ecx
push eax
push edx
lea eax, [esp + 0x30]
call fcn.10006ff0
call fcn.10020190
test eax, eax
je 0x1000cc35
push 0
lea eax, [esp + 0x1c]
push eax
push 1
push str.S:_ML__NRNWNX___LW_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x1000cc35
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x1000cc2a
mov edx, dword [esp + 0x10]
push edx
push 0
push 0
push 0
push 0x10
push 1
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea edx, [esp + 0x28]
push edx
push 0
push 0
push 0x1a
push 0
call ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x10056df0
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1000cc56
lea edi, [esp + 0x28]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000cc66
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 edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0xc0000000
lea ecx, [esp + 0x40]
push ecx
call edi
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x1000cd3e
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea edx, [esp + 0x40]
push edx
call edi
mov esi, eax
mov dword [esp + 0x10], esi
call fcn.10020190
test eax, eax
je 0x1000cd35
push 0
lea eax, [esp + 0x18]
push eax
push 1
push str.S:_ML__NRNWNX___LW_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x1000cd35
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x1000cd2a
mov edx, dword [esp + 0x18]
push edx
push 0
push 0
push 0
push 0x10
push 1
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp esi, 0xffffffff
je 0x1000cff0
push 2
xor ecx, ecx
push ecx
push ecx
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000cd54
sub eax, edx
add eax, 0x208
je 0x1000cfbd
mov edx, dword [0x10054278]
lea esi, [eax + 0x13]
and esi, 0xfffffff0
push esi
push 8
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x1000cfbd
push esi
push 0
push ebx
call sub.ntdll.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
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000cdb0
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000cdc0
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 0x1000cde0
mov cx, word [0x10047f90]
mov word [eax], cx
mov dl, byte [0x10047f92]
push 0x104
mov byte [eax + 2], dl
lea eax, [esp + 0x134]
push eax
push str.HH:mm:ss
push 0
push 0
push 0x409
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
lea eax, [esp + 0x130]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000ce25
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000ce31
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 0x1000ce50
mov cx, word [0x10047f94]
push 0x104
lea edx, [esp + 0x134]
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 + 0x130]
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000ce90
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000cea0
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 0x1000cec0
mov ecx, dword [str.___]
mov dword [eax], ecx
mov dl, byte [0x10047f9c]
mov byte [eax + 4], dl
push 0x104
lea eax, [esp + 0x134]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x130]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000cef7
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1000cf03
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 0x1000cf20
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 0x1000cf40
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000cf40
mov esi, dword [esp + 0x10]
sub eax, edx
mov edi, eax
mov dword [esp + 0x1c], 0
je 0x1000cf98
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push edi
push 0
push eax
push esi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea ecx, [esp + 0x20]
push ecx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x10]
push 0
push edi
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov eax, dword [0x10054278]
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x1000cfc1
mov ecx, dword [0x10054278]
push ebx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1000cfc1
mov esi, dword [esp + 0x10]
cmp esi, 0xffffffff
je 0x1000cff0
mov dword [esp + 0x14], 0
test esi, esi
je 0x1000cff0
lea edx, [esp + 0x14]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1000cff0
test byte [esp + 0x14], 2
jne 0x1000cff0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4