Function at 0x438b70
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x44d1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x244], ecx
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x438b9e
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 4], 0
lea edx, [ebp - 0x218]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x438bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x438ed1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x438bd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x438ed1
mov byte [ebp - 0x219], 1
movzx ecx, byte [ebp - 0x219]
test ecx, ecx
je 0x438eb6
mov edx, dword [ebp - 0x244]
mov eax, dword [ebp - 0x244]
mov ecx, dword [edx + 4]
cmp ecx, dword [eax + 8]
jae 0x438eb6
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 4]
mov eax, dword [eax + edx]
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 4]
add edx, 4
mov eax, dword [ebp - 0x244]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
mov edx, dword [edx + ecx]
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
add ecx, 4
mov edx, dword [ebp - 0x244]
mov dword [edx + 4], ecx
cmp dword [ebp - 0x228], 2
jne 0x438c7b
mov byte [ebp - 0x219], 0
jmp 0x438eb1
cmp dword [ebp - 0x228], 0
jne 0x438cc9
mov eax, dword [ebp - 0x244]
cmp dword [eax + 0x10], 1
jbe 0x438cc9
push 8
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x244]
add edx, dword [eax + 4]
push edx
lea ecx, [ebp - 0x230]
push ecx
call fcn.0041da80
add esp, 0xc
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 4]
add eax, 8
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 4]
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 4]
add edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x244]
mov dword [eax + 4], edx
push 0
mov ecx, dword [ebp - 0x244]
add ecx, 4
push ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x244]
call fcn.00438aa0
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x244]
add edx, dword [eax + 4]
mov dword [ebp - 0x234], edx
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0041c1c3
add esp, 4
mov edx, dword [ebp - 0x244]
mov ecx, dword [edx + 4]
lea edx, [ecx + eax*2 + 2]
mov eax, dword [ebp - 0x244]
mov dword [eax + 4], edx
push 0
mov ecx, dword [ebp - 0x244]
add ecx, 4
push ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x244]
call fcn.00438aa0
cmp dword [ebp - 0x228], 1
jne 0x438de1
push 0
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x438dae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xb7
je 0x438dae
mov eax, dword [ebp - 0x224]
jmp 0x438ed1
push 0
mov edx, dword [ebp - 0x234]
push edx
mov ecx, dword [ebp - 0x244]
call fcn.00438b70
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
je 0x438ddc
mov eax, dword [ebp - 0x23c]
jmp 0x438ed1
jmp 0x438eb1
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x438e12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 2
je 0x438e12
mov eax, dword [ebp - 0x224]
jmp 0x438ed1
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0xffffffff
je 0x438eaa
push 0
lea edx, [ebp - 0x220]
push edx
mov eax, dword [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x238]
push edx
mov eax, dword [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x244]
cmp dword [ecx + 0x10], 1
jbe 0x438e9b
lea edx, [ebp - 0x230]
push edx
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x230]
push ecx
mov edx, dword [ebp - 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x438eb1
mov eax, 9
jmp 0x438ed1
jmp 0x438bdf
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x438ecf
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x438ed1
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041be5c
mov esp, ebp
pop ebp
ret 8