Function at 0x408bf0
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x477c41
mov eax, dword fs:[0]
push eax
sub esp, 0x8e0
mov eax, dword [0x49b3d4]
xor eax, esp
mov dword [esp + 0x8d8], eax
push ebx
push esi
push edi
mov eax, dword [0x49b3d4]
xor eax, esp
push eax
lea eax, [esp + 0x8f0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], 0xffffffff
mov dword [esp + 0x58], ebx
mov dword [esp + 0x4c], vtable.zlib::CGZip.0
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
lea eax, [esp + 0x68]
mov dword [esp + 0x8f8], ebx
call fcn.004025a9
lea eax, [esp + 0x8c]
call fcn.004025a9
mov byte [esp + 0x8f8], 2
push 0x484020
lea edi, [esp + 0x90]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x88], ebx
call fcn.0040262a
mov dword [esp + 0xa8], ebx
mov edx, esi
lea ecx, [esp + 0x4c]
mov dword [esp + 0x8f8], 3
call fcn.00416f50
test eax, eax
je 0x408f9d
lea ebx, [esp + 0x4c]
lea ecx, [esp + 0xc8]
mov dword [esp + 0x14], 1
call fcn.00408a40
xor edi, edi
mov ecx, ebx
mov byte [esp + 0x8f8], 4
xor esi, esi
mov dword [esp + 0x1c], edi
call fcn.004171a0
test eax, eax
jle 0x408f8f
jmp 0x408d00
lea eax, [esp + 0x30]
call fcn.004025a9
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push edx
push edi
lea eax, [esp + 0x58]
push eax
lea edx, [esp + 0x40]
lea ecx, [esp + 0x34]
mov byte [esp + 0x908], 5
call fcn.004173b0
lea eax, [esp + 0x30]
call fcn.00404dd1
test eax, eax
je 0x408dac
lea eax, [esp + 0xc8]
call fcn.00404dd1
test eax, eax
je 0x408dac
lea eax, [esp + 0xc8]
call fcn.0040263b
mov edi, eax
call fcn.0040107f
push eax
push edi
lea ecx, [esp + 0x38]
push ecx
xor eax, eax
call fcn.00409f80
mov ebx, eax
cmp ebx, 0xffffffff
je 0x408dac
mov eax, edi
lea edx, [eax + 2]
jmp 0x408d80
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x408d80
sub eax, edx
sar eax, 1
mov edi, eax
mov eax, 0x484020
call fcn.0040107f
push eax
push 0x484020
push edi
push ebx
lea eax, [esp + 0x40]
call fcn.00409e60
lea eax, [esp + 0xac]
cmp dword [esp + 0x24], esi
jne 0x408e04
mov edx, dword [esp + 0x18]
push edx
call fcn.004025d0
push 0x484564
push eax
mov byte [esp + 0x900], 6
call fcn.0040260f
mov edi, eax
push esi
lea eax, [esp + 0x34]
push eax
or eax, 0xffffffff
call fcn.00403074
push esi
call fcn.0040263b
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [esp + 0xac]
call fcn.00402601
jmp 0x408f64
mov ebx, dword [esp + 0x18]
push ebx
call fcn.004025d0
push 0x484564
push eax
mov byte [esp + 0x900], 7
call fcn.0040260f
push esi
lea ecx, [esp + 0x34]
mov edi, eax
push ecx
or eax, 0xffffffff
call fcn.00403074
call fcn.0040263b
push eax
lea edx, [esp + 0xe8]
push 0x400
push edx
call fcn.004593e1
lea eax, [esp + 0xf0]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x408e56
sub eax, edx
sar eax, 1
lea eax, [esp + eax*2 + 0xe4]
lea ecx, [esp + 0xe4]
cmp eax, ecx
je 0x408e99
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x408e94
cmp ecx, 0x2f
je 0x408e94
sub eax, 2
lea edx, [esp + 0xe4]
cmp eax, edx
jne 0x408e77
jmp 0x408e99
xor ecx, ecx
mov word [eax], cx
lea ecx, [esp + 0xac]
mov byte [esp + 0x8f8], 5
call fcn.00402601
lea edx, [esp + 0xe4]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408ec4
test al, 0x10
jne 0x408ed3
push esi
lea eax, [esp + 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ebx
lea eax, [esp + 0xb0]
call fcn.004025d0
push 0x484564
push eax
mov byte [esp + 0x900], 8
call fcn.0040260f
push esi
lea ecx, [esp + 0x34]
mov edi, eax
push ecx
or eax, 0xffffffff
call fcn.00403074
call fcn.0040263b
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push eax
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x408f4b
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
push esi
lea edx, [esp + 0x2c]
push edx
push eax
push ecx
push edi
mov dword [esp + 0x3c], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408f44
mov bl, 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
lea ecx, [esp + 0xac]
sete bl
call fcn.00402601
test bl, bl
je 0x408f64
mov dword [esp + 0x14], esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x8f8], 4
call fcn.00402601
mov edi, dword [esp + 0x1c]
inc edi
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1c], edi
call fcn.004171a0
cmp edi, eax
jl 0x408d00
lea ecx, [esp + 0xc8]
call fcn.00402601
xor ebx, ebx
cmp dword [esp + 0x14], ebx
setne byte [esp + 0x13]
lea eax, [esp + 0x4c]
mov dword [esp + 0x8f8], 0xb
call fcn.00417120
lea ecx, [esp + 0x8c]
call fcn.00402601
lea ecx, [esp + 0x68]
call fcn.00402601
mov dword [esp + 0x4c], vtable.zlib::CGZip.0
mov dword [esp + 0x8f8], 0xc
cmp dword [esp + 0x5c], ebx
je 0x408ff1
lea ecx, [esp + 0x4c]
call fcn.0041d090
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x8f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8d8]
xor ecx, esp
call fcn.00458db6
mov esp, ebp
pop ebp
ret