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

Disassembly:
sub esp, 0x31c
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x318], eax
push ebx
push esi
push edi
push 0x103
lea eax, [esp + 0x1d]
push 0
push eax
mov esi, ecx
mov byte [esp + 0x24], 0
call fcn.10116880
push 0x103
lea ecx, [esp + 0x231]
push 0
push ecx
mov byte [esp + 0x238], 0
call fcn.10116880
push 0x103
lea edx, [esp + 0x139]
push 0
push edx
mov byte [esp + 0x140], 0
call fcn.10116880
add esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x10193808], 0
mov dword [esp + 0x14], eax
jne 0x100579e0
cmp byte [0x1019f188], 0
jne 0x100579e0
lea eax, [esp + 0x11c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
jne 0x100579a2
push 0x10148094
lea ecx, [esp + 0x120]
push ecx
call ebx
lea edx, [esp + 0x11c]
push 0x1019f188
push edx
mov ecx, 0x1014a3c8
call fcn.10035ef0
push 0x2e
push 0x1019f188
call fcn.1010e930
mov edi, eax
add esp, 0x10
test edi, edi
je 0x100579e0
mov eax, 0x1019f188
call fcn.10033960
push str..LOG
push edi
call ebx
cmp dword [0x101936fc], 4
jle 0x10057b86
cmp byte [esi], 0
je 0x10057b86
cmp byte [0x10193808], 0
push 0x80
push 4
push 3
push 0xc0000000
mov edi, 0x10193808
jne 0x10057a17
mov edi, 0x1019f188
call fcn.10033690
mov edi, eax
add esp, 0x10
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
je 0x10057b86
push ebp
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp byte [esi], 0xa
mov ebx, eax
jne 0x10057a76
inc esi
mov eax, 0x10148098
inc eax
cmp byte [eax], 0
jne 0x10057a57
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, 0x10148098
push eax
push 0x10148098
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [esi], 0
je 0x10057b7b
xor ecx, ecx
lea edx, [esp + 0x224]
call fcn.100675a0
cmp byte [0x10193910], 0
push ebp
push ebx
je 0x10057ae4
lea edx, [esp + 0x22c]
push edx
push 0x10193910
lea eax, [esp + 0x2c]
push str.__s___s__04x__04x__
push eax
call fcn.1010d6a8
add esp, 0x18
cmp byte [esp + 0x1c], 0
lea eax, [esp + 0x1c]
je 0x10057ac8
inc eax
cmp byte [eax], 0
jne 0x10057ac2
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
push eax
mov eax, edx
push eax
push edi
call ebx
jmp 0x10057b34
lea ecx, [esp + 0x22c]
push ecx
lea edx, [esp + 0x28]
push str._s__04x__04x__
push edx
call fcn.1010d6a8
add esp, 0x14
cmp byte [esp + 0x1c], 0
lea eax, [esp + 0x1c]
je 0x10057b16
lea esp, [esp]
inc eax
cmp byte [eax], 0
jne 0x10057b10
push 0
lea edx, [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
push eax
mov eax, edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [esi], 0
mov eax, esi
je 0x10057b46
jmp 0x10057b40
inc eax
cmp byte [eax], 0
jne 0x10057b40
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, esi
push eax
push esi
push edi
call ebx
mov eax, 0x10148098
lea esp, [esp]
inc eax
cmp byte [eax], 0
jne 0x10057b60
push 0
lea edx, [esp + 0x14]
push edx
sub eax, 0x10148098
push eax
push 0x10148098
push edi
call ebx
lea eax, [esp + 0x14]
push eax
call fcn.100673f0
pop ebp
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x324]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1010d699
add esp, 0x31c
ret