Function at 0x10039b90
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x101a49d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x101abc2c
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 0x1017fe54
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x10039e6b
mov edx, dword [ebp - 0x38]
mov ecx, edx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 7
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039be6
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x1c]
call fcn.10051fd0
push 0x25
push str.MicrosoftWindowsLogs___SystemLogs
lea ecx, [ebp - 0x1c]
call fcn.100520e0
mov esi, eax
mov dword [ebp - 0x34], 0
push 0x18
lea eax, [ebp - 0x34]
mov dword [ebp - 0x24], 0
push esi
push eax
mov dword [ebp - 0x20], 0
call fcn.1011b630
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
add esp, 0xc
mov word [esi], ax
mov edx, dword [ebp - 8]
cmp edx, 8
jb 0x10039c81
mov ecx, dword [ebp - 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10039c77
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039e7c
push edx
push ecx
call fcn.1011a823
add esp, 8
push dword [ebp - 0x38]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor esi, esi
nop dword [eax]
mov ebx, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
mov edi, dword [ebp - 0x24]
inc esi
cmp ebx, 8
cmovae edx, dword [ebp - 0x34]
cmp esi, edi
jae 0x10039cdb
mov ecx, edi
lea eax, [edx + esi*2]
sub ecx, esi
mov esi, 0
je 0x10039cd1
cmp word [eax], 0x5c
je 0x10039ccf
nop dword [eax]
cmp ecx, 1
je 0x10039cd1
add eax, 2
dec ecx
cmp word [eax], 0x5c
jne 0x10039cc0
mov esi, eax
test esi, esi
je 0x10039cdb
sub esi, edx
sar esi, 1
jmp 0x10039cde
or esi, 0xffffffff
cmp edi, esi
mov dword [ebp - 0x1c], 0
mov ecx, esi
mov dword [ebp - 0xc], 0
cmovb ecx, edi
mov dword [ebp - 8], 7
cmp ebx, 8
lea eax, [ebp - 0x34]
push ecx
cmovae eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x1c]
push eax
call fcn.10051fd0
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
push 0
cmovae eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10039d33
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10039d78
mov edx, dword [ebp - 8]
cmp edx, 8
jb 0x10039d6d
mov ecx, dword [ebp - 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10039d63
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039e7c
push edx
push ecx
call fcn.1011a823
add esp, 8
cmp esi, 0xffffffff
jne 0x10039c90
jmp 0x10039db2
mov edx, dword [ebp - 8]
cmp edx, 8
jb 0x10039db2
mov ecx, dword [ebp - 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10039da8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039e7c
push edx
push ecx
call fcn.1011a823
add esp, 8
movzx eax, word [0x101abc38]
movzx ebx, word [0x101abc36]
movzx edi, word [0x101abc34]
movzx esi, word [0x101abc32]
movzx edx, word [0x101abc2e]
cmp dword [ebp - 0x20], 8
movzx ecx, word [0x101abc2c]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x34]
push dword [ebp - 0x3c]
cmovae eax, dword [ebp - 0x34]
push ebx
push edi
push esi
push edx
push ecx
push eax
push str._s_04d_02d_02d__02d_02d_02d.log
push 0x103
push 0x101aba08
call fcn.10020ee0
add esp, 0x28
push 0
push 0x80
push 2
push 0
push 1
push 4
push 0x101aba08
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x101a6320], eax
cmp eax, 0xffffffff
je 0x10039e35
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x10039e6b
mov ecx, dword [ebp - 0x34]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10039e61
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039e81
push edx
push ecx
call fcn.1011a823
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1011a2e1
mov esp, ebp
pop ebp
ret
call fcn.10125fc5
call fcn.10125fc5
int3