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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b2fd5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
cmp dword [ebp + 8], 0
je 0x46a6a1
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x46a6a1
cmp dword [ebp + 0xc], 0
jne 0x46a6a9
or eax, 0xffffffff
jmp 0x46a897
cmp dword [ebp + 0x10], 0
jne 0x46a6b6
xor eax, eax
jmp 0x46a897
mov dword [ebp - 4], 0
lea edx, [ebp - 0x50]
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp - 0x20]
call fcn.00402240
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.004258a0
call fcn.0045d5c0
add esp, 0x28
cmp dword [ebp - 0x40], 0
jne 0x46a70e
mov dword [ebp - 0x18], 1
jmp 0x46a715
mov dword [ebp - 0x18], 0
mov al, byte [ebp - 0x18]
mov byte [ebp - 0xd], al
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
jne 0x46a74a
lea ecx, [ebp - 0x50]
call fcn.00401910
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46a74a
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 0x46a793
mov edx, dword [ebp + 8]
movzx eax, word [edx]
test eax, eax
je 0x46a793
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46a793
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x80]
call fcn.004258a0
mov byte [ebp - 4], 2
push 1
lea eax, [ebp - 0x80]
push eax
call fcn.0046af80
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.00402240
nop
lea ecx, [ebp - 0x68]
call fcn.00404e00
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 0x46a817
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 0x46a897
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 0x46a869
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 0x46a897
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