Function at 0x10008240
Capabilities:
Clear file content
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, 0x10020894
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10008274
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008284
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]
mov esi, dword [ebp + 8]
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100082a2
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
sub eax, ecx
mov edi, eax
test esi, esi
je 0x10008308
test edi, edi
je 0x10008308
push 0
push 0x80
push 2
push 0
push 7
push 0xc0000000
lea edx, [esp + 0x30]
push edx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x10008308
mov ecx, dword [ebp + 8]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10008301
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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, 0x10020790
mov ecx, eax
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10008330
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008340
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]
push 0xc0000000
lea ecx, [esp + 0x30]
push ecx
call ebx
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
jne 0x100083a1
push 0
push 0x80
push 2
push 0
push 7
push 0xc0000000
lea edx, [esp + 0x30]
push edx
call ebx
mov dword [esp + 0x10], eax
cmp eax, edi
je 0x100085f7
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, dword [ebp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100083b7
sub eax, edx
add eax, 0x208
je 0x100085eb
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 0x100085eb
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 0x10008410
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008420
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 0x10008440
mov cx, word [0x1001c104]
mov word [eax], cx
mov dl, byte [0x1001c106]
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 0x10008485
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008491
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 0x100084b0
mov cx, word [0x1001c108]
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 0x100084f0
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008500
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 0x10008520
mov ecx, dword [str.___]
mov dword [eax], ecx
mov dl, byte [0x1001c110]
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 0x10008557
sub eax, esi
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10008563
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 0x10008580
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 0x100085a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100085a0
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 0x100085e7
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x10]
cmp edi, 0xffffffff
je 0x100085f7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4