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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, ecx
mov dword [ebp - 0xc], edx
mov ecx, 0xfeff
mov dword [ebp - 0x14], eax
push ebx
mov word [ebp - 4], cx
mov ecx, dword [ebp + 0xc]
push esi
xor esi, esi
push edi
mov dword [ecx], esi
mov ebx, esi
mov ecx, dword [ebp + 0x10]
mov edi, esi
test ecx, ecx
je 0x415c93
mov dword [ecx], esi
test eax, eax
je 0x415cca
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
test ebx, ebx
jne 0x415cca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x415ec3
movzx esi, si
or esi, 0x80070000
jmp 0x415ec3
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPath2A]
test eax, eax
je 0x415cac
inc eax
push eax
mov dword [ebp - 8], eax
call fcn.0040b7e3
mov dword [ebp - 0x10], eax
pop ecx
test eax, eax
jne 0x415cf2
mov esi, 0x8007000e
jmp 0x415ec3
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetTempPath2A]
test eax, eax
jne 0x415d1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x415eaf
movzx esi, si
or esi, 0x80070000
jmp 0x415eaf
add eax, 0xf
add eax, ebx
push eax
mov dword [ebp - 0x18], eax
call fcn.0040b7e3
mov ebx, eax
mov dword [ebp - 8], ebx
pop ecx
test ebx, ebx
jne 0x415d40
mov esi, 0x8007000e
jmp 0x415eaf
push ebx
push esi
push 0x402900
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x415d72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x415ea6
movzx esi, si
or esi, 0x80070000
jmp 0x415ea6
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x415da6
mov ecx, ebx
lea eax, [ecx + 1]
mov dword [ebp - 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x415d81
sub ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push esi
push esi
sub eax, ecx
push eax
lea eax, [ecx + ebx]
push eax
push 0xffffffffffffffff
push edx
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x415d54
push esi
push 0x4002100
push 2
push esi
push esi
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x415dc7
mov edi, esi
jmp 0x415d54
test edi, edi
je 0x415d54
cmp dword [ebp + 8], esi
jle 0x415e22
mov eax, dword [ebp - 0xc]
mov ax, word [eax]
cmp ax, word [ebp - 4]
je 0x415df6
push esi
lea eax, [ebp - 0x1c]
push eax
push 2
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415d54
push esi
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
add eax, eax
push eax
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415d54
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x415d54
cmp dword [ebp + 0x10], esi
je 0x415e9f
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x415e2a
push esi
push esi
sub ebx, ecx
push ebx
push dword [ebp - 8]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x415d54
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x415e62
mov esi, 0x8007000e
jmp 0x415ea6
push dword [ebp - 0x18]
push eax
push ebx
push dword [ebp - 8]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x415e97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x415e8b
movzx esi, si
or esi, 0x80070000
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x415ea6
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov edi, esi
push dword [ebp - 8]
call fcn.0040b812
pop ecx
push dword [ebp - 0x10]
call fcn.0040b812
pop ecx
test edi, edi
je 0x415ec3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc