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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x483038
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
cmp dword [ebp + 8], 0
je 0x422a34
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x422a34
cmp dword [ebp + 0xc], 0
jne 0x422a3c
or eax, 0xffffffff
jmp 0x422cc2
cmp dword [ebp + 0x10], 0
jne 0x422a49
xor eax, eax
jmp 0x422cc2
lea edx, [ebp - 0x80]
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
call fcn.0041f700
lea ecx, [ebp - 0x80]
call fcn.00421bb0
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.0040d4a0
call fcn.0042e950
add esp, 0x28
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x422aa1
mov dword [ebp - 0x20], 1
jmp 0x422aa8
mov dword [ebp - 0x20], 0
mov cl, byte [ebp - 0x20]
mov byte [ebp - 0xd], cl
movzx edx, byte [ebp - 0xd]
test edx, edx
jne 0x422b70
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 0x422ad8
mov dword [ebp - 0x24], 1
jmp 0x422adf
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x24]
mov byte [ebp - 0xe], al
movzx ecx, byte [ebp - 0xe]
test ecx, ecx
je 0x422afb
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 0x422b70
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 0x422b33
mov dword [ebp - 0x2c], 1
jmp 0x422b3a
mov dword [ebp - 0x2c], 0
mov dl, byte [ebp - 0x2c]
mov byte [ebp - 0xf], dl
movzx eax, byte [ebp - 0xf]
test eax, eax
je 0x422b56
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 0x422bc1
mov ecx, dword [ebp + 8]
movzx edx, word [ecx]
test edx, edx
je 0x422bc1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x422bc1
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xb4]
call fcn.0040d4a0
mov byte [ebp - 4], 1
push 1
lea edx, [ebp - 0xb4]
push edx
call fcn.004372c0
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00421ac0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
call fcn.0041f700
lea ecx, [ebp - 0x9c]
call fcn.00422ea0
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 0x422c42
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.004219d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00421ac0
mov eax, dword [ebp - 0x60]
jmp 0x422cc2
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 0x422c94
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.004219d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00421ac0
mov eax, dword [ebp - 0x64]
jmp 0x422cc2
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.004219d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00421ac0
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret