Function at 0x402067
Capabilities:
Create directory
Write file on windows

Disassembly:
push 0x5f0
mov eax, 0x40d913
call fcn.004097ac
lea ecx, [ebp - 0x41c]
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 1
call fcn.0040244e
mov eax, dword [eax]
mov esi, 0x40fca0
mov ecx, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4020ba
test dx, dx
je 0x4020b6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4020ba
add eax, 4
add ecx, 4
test dx, dx
jne 0x402094
xor eax, eax
jmp 0x4020bf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [ebp - 0x41c]
setne bl
add eax, 0xfffffff0
call fcn.00402037
test bl, bl
je 0x4020e0
push esi
lea eax, [ebp + 0xc]
push eax
call fcn.004018c2
push 0xfde9
push dword [ebp + 8]
lea eax, [ebp - 0x4a4]
mov dword [ebp - 0x4a8], eax
lea eax, [ebp - 0x4a8]
push eax
call fcn.00401a8f
push dword [ebp - 0x4a8]
call sub.zlib1.dll_Ordinal_61
mov esi, eax
lea eax, [ebp - 0x4a4]
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x4a8], eax
je 0x40212d
push dword [ebp - 0x4a8]
call fcn.00402db0
pop ecx
test esi, esi
jne 0x402151
xor bl, bl
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
call fcn.00402037
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00402037
mov al, bl
call fcn.004097f6
ret
push esi
call sub.zlib1.dll_Ordinal_65
jmp 0x4022dd
xor eax, eax
push eax
push eax
push eax
push eax
push 0x400
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x5fc]
push eax
push esi
call sub.zlib1.dll_Ordinal_64
test eax, eax
jne 0x4022d7
lea eax, [ebp - 0x420]
push eax
lea edi, [ebp - 0x414]
call fcn.004017ff
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x5e0]
push edi
call fcn.00402f48
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4022c5
cmp byte [ebp + 0x10], 0
je 0x4021c3
push str.cdf283818fda91abb904873e7125055e
push esi
call sub.zlib1.dll_Ordinal_79
jmp 0x4021c9
push esi
call sub.zlib1.dll_Ordinal_67
test eax, eax
jne 0x4022be
push edi
push ebx
push esi
call sub.zlib1.dll_Ordinal_68
mov esi, eax
test esi, esi
jl 0x4022ad
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00401bc6
add eax, 0x10
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x5a8]
mov byte [ebp - 4], 3
mov dword [ebp - 0x5ac], eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x5ac]
push eax
call fcn.004024f1
mov byte [ebp - 4], 4
push dword [ebp - 0x5ac]
lea eax, [ebp - 0x418]
push eax
call fcn.004018c2
lea eax, [ebp - 0x5a8]
mov byte [ebp - 4], 3
cmp dword [ebp - 0x5ac], eax
je 0x40224e
push dword [ebp - 0x5ac]
call fcn.00402db0
pop ecx
lea eax, [ebp - 0x418]
push eax
call fcn.004022f2
test esi, esi
jne 0x40226d
push esi
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x40229f
mov esi, dword [ebp - 0x418]
call fcn.00401081
mov esi, eax
cmp esi, 0xffffffff
je 0x40229f
and dword [ebp - 0x424], 0
push 0
lea eax, [ebp - 0x424]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x418]
add eax, 0xfffffff0
call fcn.00402037
push dword [ebp - 0x41c]
call sub.zlib1.dll_Ordinal_72
mov esi, dword [ebp - 0x41c]
push ebx
call fcn.00402db0
pop ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x420]
add eax, 0xfffffff0
call fcn.00402037
push esi
call sub.zlib1.dll_Ordinal_66
test eax, eax
je 0x40215c
push esi
call sub.zlib1.dll_Ordinal_62
mov bl, 1
jmp 0x402133