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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aea08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
cmp dword [ebp + 8], 0
je 0x4660c4
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x4660c4
cmp dword [ebp + 0xc], 0
jne 0x4660cc
or eax, 0xffffffff
jmp 0x466352
cmp dword [ebp + 0x10], 0
jne 0x4660d9
xor eax, eax
jmp 0x466352
lea edx, [ebp - 0x80]
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
call fcn.00402120
lea ecx, [ebp - 0x80]
call fcn.00458270
mov dword [ebp - 4], 0
push 0
push 0
push 0
lea eax, [ebp - 0x80]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x84], esp
mov edx, dword [ebp + 8]
push edx
call fcn.00425fd0
call fcn.0045a990
add esp, 0x28
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x466131
mov dword [ebp - 0x20], 1
jmp 0x466138
mov dword [ebp - 0x20], 0
mov cl, byte [ebp - 0x20]
mov byte [ebp - 0xd], cl
movzx edx, byte [ebp - 0xd]
test edx, edx
jne 0x466200
lea eax, [ebp - 0x80]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x18]
cmp dword [edx + 0x14], 8
jb 0x466168
mov dword [ebp - 0x24], 1
jmp 0x46616f
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x24]
mov byte [ebp - 0xe], al
movzx ecx, byte [ebp - 0xe]
test ecx, ecx
je 0x46618b
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x466200
lea edx, [ebp - 0x80]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0x14], 8
jb 0x4661c3
mov dword [ebp - 0x2c], 1
jmp 0x4661ca
mov dword [ebp - 0x2c], 0
mov dl, byte [ebp - 0x2c]
mov byte [ebp - 0xf], dl
movzx eax, byte [ebp - 0xf]
test eax, eax
je 0x4661e6
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x54], edx
push 0
mov eax, dword [ebp - 0x54]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
cmp dword [ebp + 8], 0
je 0x466251
mov ecx, dword [ebp + 8]
movzx edx, word [ecx]
test edx, edx
je 0x466251
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x466251
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xb4]
call fcn.00425fd0
mov byte [ebp - 4], 1
push 1
lea edx, [ebp - 0xb4]
push edx
call fcn.004656a0
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00401880
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
call fcn.00402120
lea ecx, [ebp - 0x9c]
call fcn.00459790
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4662d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.00401a00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00401880
mov eax, dword [ebp - 0x60]
jmp 0x466352
mov dword [ebp - 0x34], 0xffffffff
push 0
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x466324
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x64], ecx
lea ecx, [ebp - 0x9c]
call fcn.00401a00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00401880
mov eax, dword [ebp - 0x64]
jmp 0x466352
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x68], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.00401a00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00401880
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret