Function at 0x470d70
Capabilities:
Check if file exists
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ba315
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
cmp dword [ebp + 8], 0
je 0x470da1
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x470da1
cmp dword [ebp + 0xc], 0
jne 0x470da9
or eax, 0xffffffff
jmp 0x470f97
cmp dword [ebp + 0x10], 0
jne 0x470db6
xor eax, eax
jmp 0x470f97
mov dword [ebp - 4], 0
lea edx, [ebp - 0x50]
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp - 0x20]
call fcn.00402280
nop
lea ecx, [ebp - 0x50]
call fcn.00401cd0
nop
mov dword [ebp - 4], 1
push 0
push 0
push 0
lea eax, [ebp - 0x50]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x38], esp
mov edx, dword [ebp + 8]
push edx
call fcn.00422780
call fcn.00462cc0
add esp, 0x28
cmp dword [ebp - 0x40], 0
jne 0x470e0e
mov dword [ebp - 0x18], 1
jmp 0x470e15
mov dword [ebp - 0x18], 0
mov al, byte [ebp - 0x18]
mov byte [ebp - 0xd], al
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
jne 0x470e4a
lea ecx, [ebp - 0x50]
call fcn.00401910
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x470e4a
push 0
lea ecx, [ebp - 0x50]
call fcn.00401910
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
nop
cmp dword [ebp + 8], 0
je 0x470e93
mov edx, dword [ebp + 8]
movzx eax, word [edx]
test eax, eax
je 0x470e93
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x470e93
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x80]
call fcn.00422780
mov byte [ebp - 4], 2
push 1
lea eax, [ebp - 0x80]
push eax
call fcn.00461c20
add esp, 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x80]
call fcn.00401940
nop
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x24]
call fcn.00402280
nop
lea ecx, [ebp - 0x68]
call fcn.00404e40
nop
mov byte [ebp - 4], 1
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x470f17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0xffffffff
lea ecx, [ebp - 0x68]
call fcn.00401ac0
nop
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00401940
nop
mov eax, dword [ebp - 0x2c]
jmp 0x470f97
mov dword [ebp - 0x1c], 0xffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470f69
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], edx
lea ecx, [ebp - 0x68]
call fcn.00401ac0
nop
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00401940
nop
mov eax, dword [ebp - 0x30]
jmp 0x470f97
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov dword [ebp - 0x34], 0xffffffff
lea ecx, [ebp - 0x68]
call fcn.00401ac0
nop
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00401940
nop
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret