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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421d58
mov eax, dword fs:[0]
push eax
sub esp, 0x6dc
mov eax, dword [0x42e1f4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c4], eax
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
jne 0x40712c
sub esp, 0xc
mov dword [ebp - 0x6c4], esp
mov esi, esp
mov dword [ebp - 0x6c0], esi
mov dword [esi + 4], ebx
push 0x24
call fcn.0040e6ab
add esp, 4
cmp eax, ebx
je 0x4070ef
mov dword [esi], eax
mov dword [eax], eax
mov esi, dword [esi]
mov dword [esi + 4], esi
mov dword [ebp - 4], 2
mov dword [ebp - 4], 0xffffffff
call fcn.00408ac0
mov dword [ebp - 0x6bc], ebx
lea ecx, [ebp - 0x6bc]
push ecx
lea ecx, [ebp - 0x6e8]
call fcn.0040ee8e
mov dword [ebp - 4], ebx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
mov dword [ebp - 4], 0xffffffff
push 0x429ab4
lea edx, [ebp - 0x6e8]
push edx
call fcn.0040e65f
mov dword [ebp - 0x244], 0xf
mov dword [ebp - 0x248], ebx
mov byte [ebp - 0x258], bl
mov dword [ebp - 4], 3
lea esp, [esp]
mov dword [ebp - 0x6bc], ebx
mov byte [ebp - 4], 4
mov byte [ebp - 4], 5
mov dword [ebp - 0x6dc], ebx
mov dword [ebp - 0x6d8], ebx
mov dword [ebp - 0x6d4], ebx
mov byte [ebp - 4], 6
push 2
mov esi, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x6dc]
push eax
call fcn.00405cb0
inc esi
mov dword [ebp + 0xc], esi
xor ecx, ecx
mov word [ebp - 0x4bc], cx
push 0x20a
push ebx
lea edx, [ebp - 0x4ba]
push edx
call fcn.0040f2f0
add esp, 0x18
lea eax, [ebp - 0x4bc]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x407255
xor ecx, ecx
mov word [ebp - 0x220], cx
push 0x208
push ebx
lea edx, [ebp - 0x21e]
push edx
call fcn.0040f2f0
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push 0x15
push 0x423314
lea ecx, [ebp - 0x4bc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x407255
push ebx
push 0x100
push 2
push ebx
push 1
push 0x10000000
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x407255
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov dword [ebp - 0x6c8], ebx
push ebx
lea ecx, [ebp - 0x6c8]
push ecx
push 0x10
lea edx, [ebp - 0x2b0]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
call fcn.0040e6ab
add esp, 4
mov dword [ebp - 0x6c0], eax
mov byte [ebp - 4], 7
cmp eax, ebx
je 0x40727f
lea ecx, [ebp - 0x6dc]
push ecx
mov ecx, eax
call fcn.004041f0
mov esi, eax
jmp 0x407281
xor esi, esi
mov byte [ebp - 4], 6
mov dword [ebp - 0x6bc], esi
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x6dc]
call fcn.004036c0
mov dword [ebp - 4], 4
xor edi, edi
mov eax, dword [esi + 4]
sub eax, dword [esi]
mov dword [ebp - 0x6c0], eax
je 0x407311
mov edx, dword [esi]
mov al, byte [edi + edx]
mov byte [ebp - 0x6cc], al
mov ecx, dword [ebp - 0x244]
cmp ecx, 0x10
mov eax, dword [ebp - 0x258]
jae 0x4072d2
lea eax, [ebp - 0x258]
add eax, dword [ebp - 0x248]
cmp ecx, 0x10
mov ecx, dword [ebp - 0x258]
jae 0x4072e9
lea ecx, [ebp - 0x258]
cmp eax, ebx
jne 0x4072f1
xor eax, eax
jmp 0x4072f3
sub eax, ecx
mov ecx, dword [ebp - 0x6cc]
push ecx
push 1
push eax
lea ecx, [ebp - 0x258]
call fcn.004035c0
inc edi
cmp edi, dword [ebp - 0x6c0]
jb 0x4072b0
mov byte [ebp - 4], 3
mov eax, dword [esi]
cmp eax, ebx
je 0x407324
push eax
call fcn.0040e51a
add esp, 4
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
push esi
call fcn.0040e51a
add esp, 4
mov dword [ebp - 0x6bc], ebx
jmp 0x407150