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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
push ebx
mov ebx, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push esi
push edi
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0x1a
push 0
call ebx
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x1005baec
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10010916
lea edi, [esp + 0x20]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010926
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 0x10010942
mov edx, dword [ebp + 8]
sub eax, ecx
push eax
push edx
lea eax, [esp + 0x28]
call fcn.10005550
call fcn.10024cd0
test eax, eax
je 0x100109c5
push 0
lea eax, [esp + 0x14]
push eax
push 1
push str.S:_ML__NRNWNX___LW_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x100109c5
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x100109ba
mov edx, dword [esp + 0x14]
push edx
push 0
push 0
push 0
push 0x10
push 1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea edx, [esp + 0x20]
push edx
push 0
push 0
push 0x1a
push 0
call ebx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, 0x1005b9e8
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100109e6
lea edi, [esp + 0x20]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100109f6
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 + 0x38]
push ecx
call edi
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10010ace
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea edx, [esp + 0x38]
push edx
call edi
mov esi, eax
mov dword [esp + 0x14], esi
call fcn.10024cd0
test eax, eax
je 0x10010ac5
push 0
lea eax, [esp + 0x10]
push eax
push 1
push str.S:_ML__NRNWNX___LW_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x10010ac5
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x10010aba
mov edx, dword [esp + 0x10]
push edx
push 0
push 0
push 0
push 0x10
push 1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp esi, 0xffffffff
je 0x10010d7f
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 0x10010ae4
sub eax, edx
add eax, 0x208
je 0x10010d4c
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 0x10010d4c
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
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10010b40
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010b50
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 0x10010b70
mov dx, word [0x10049ad8]
push 0x104
mov word [eax], dx
mov cl, byte [0x10049ada]
lea edx, [esp + 0x12c]
push edx
push str.HH:mm:ss
push 0
push 0
push 0x409
mov byte [eax + 2], cl
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
lea eax, [esp + 0x128]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10010bb5
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010bc1
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 0x10010be0
mov ax, word [0x10049adc]
push 0x104
lea ecx, [esp + 0x12c]
push ecx
push str.dd:MMM:yyyy
push 0
push 0
push 0x409
mov word [edi], ax
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
lea eax, [esp + 0x128]
mov esi, eax
jmp 0x10010c20
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10010c20
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010c30
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 0x10010c50
mov edx, dword [str.___]
mov dword [eax], edx
mov cl, byte [0x10049ae4]
push 0x104
lea edx, [esp + 0x12c]
push edx
push 0
mov byte [eax + 4], cl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x128]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10010c87
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10010c93
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 0x10010cb0
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 0x10010cd0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10010cd0
mov edi, dword [esp + 0x14]
sub eax, edx
mov esi, eax
mov dword [esp + 0xc], 0
je 0x10010d28
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
push 0
push eax
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea eax, [esp + 0x10]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x10]
push 0
push esi
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
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 0x10010d50
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10010d50
mov edi, dword [esp + 0x14]
cmp edi, 0xffffffff
je 0x10010d7f
mov dword [esp + 0xc], 0
test edi, edi
je 0x10010d7f
lea edx, [esp + 0xc]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10010d7f
test byte [esp + 0xc], 2
jne 0x10010d7f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4