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

Disassembly:
sub esp, 0x320
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x31c], eax
push ebp
mov ebp, dword [esp + 0x328]
push esi
push edi
push 0x103
lea eax, [esp + 0x21]
push 0
push eax
mov byte [esp + 0x28], 0
call fcn.005dfd60
push 0x103
lea ecx, [esp + 0x131]
push 0
push ecx
mov byte [esp + 0x138], 0
call fcn.005dfd60
push 0x103
lea edx, [esp + 0x241]
push 0
push edx
mov byte [esp + 0x248], 0
call fcn.005dfd60
add esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x74ada0], 0
mov dword [esp + 0x18], eax
jne 0x4f0a7b
cmp byte [0x74b6c8], 0
jne 0x4f0a7b
lea eax, [esp + 0x224]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
jne 0x4f0a37
push 0x61021c
lea ecx, [esp + 0x228]
push ecx
call edi
push 0x74b6c8
push 0
push 0x640740
lea edx, [esp + 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x2e
push 0x74b6c8
call fcn.005e0a00
mov esi, eax
add esp, 8
test esi, esi
je 0x4f0a7b
push 0x74b6c8
call fcn.004e0670
add esp, 4
push 0x63e658
push esi
call edi
cmp dword [esp + 0x334], 0
je 0x4f0a92
cmp dword [0x74ad94], 4
jle 0x4f0c86
cmp byte [ebp], 0
je 0x4f0c86
cmp byte [0x74ada0], 0
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
je 0x4f0abe
push 0x74ada0
jmp 0x4f0ac3
push 0x74b6c8
call fcn.004e0400
mov esi, eax
add esp, 0x1c
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
je 0x4f0c86
push ebx
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp byte [ebp], 0xa
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], eax
jne 0x4f0b2b
inc ebp
mov eax, 0x63f820
lea esp, [esp]
inc eax
cmp byte [eax], 0
jne 0x4f0b10
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, 0x63f820
push eax
push 0x63f820
push esi
call edi
cmp byte [ebp], 0
je 0x4f0c7b
mov edx, dword [esp + 0x340]
push 0
push edx
lea eax, [esp + 0x12c]
push eax
call fcn.004eff90
add esp, 0xc
cmp dword [esp + 0x33c], 0
je 0x4f0bb6
cmp byte [0x74aea8], 0
mov ecx, dword [esp + 0x14]
push ebx
lea edx, [esp + 0x128]
push ecx
lea eax, [esp + 0x28]
push edx
je 0x4f0ba6
push 0x74aea8
push 0x649000
push eax
call fcn.005dfb23
add esp, 0x18
push 0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004dd6c0
add esp, 4
push eax
lea eax, [esp + 0x2c]
push eax
jmp 0x4f0c2e
push str._s__04x__04x__
push eax
call fcn.005dfb23
add esp, 0x14
jmp 0x4f0b87
cmp byte [0x74aea8], 0
je 0x4f0bfa
lea ecx, [esp + 0x124]
push ecx
push 0x74aea8
lea edx, [esp + 0x28]
push str.__s___s__
push edx
call fcn.005dfb23
add esp, 0x10
push 0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004dd6c0
add esp, 4
push eax
lea edx, [esp + 0x2c]
push edx
jmp 0x4f0c2e
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x24]
push 0x648fdc
push ecx
call fcn.005dfb23
add esp, 0xc
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.004dd6c0
add esp, 4
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
call edi
cmp byte [ebp], 0
mov eax, ebp
je 0x4f0c46
lea esp, [esp]
inc eax
cmp byte [eax], 0
jne 0x4f0c40
push 0
lea edx, [esp + 0x14]
push edx
sub eax, ebp
push eax
push ebp
push esi
call edi
mov eax, 0x63f820
lea esp, [esp]
inc eax
cmp byte [eax], 0
jne 0x4f0c60
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, 0x63f820
push eax
push 0x63f820
push esi
call edi
lea edx, [esp + 0x18]
push edx
call fcn.004dca10
pop ebx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x328]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.005dfbbe
add esp, 0x320
ret