Function at 0x4019c6
Capabilities:
Create directory
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x544
push ebx
mov ebx, dword [esp + 0x558]
push ebp
push esi
push edi
mov edi, ecx
cmp ebx, 3
je 0x4019f5
cmp ebx, 2
je 0x4019ec
cmp ebx, 1
jne 0x401ac8
cmp ebx, 3
jne 0x401aa7
mov esi, dword [esp + 0x558]
or ebp, 0xffffffff
cmp esi, dword [edi + 4]
je 0x401a4b
cmp dword [edi + 4], ebp
je 0x401a11
push dword [edi]
call fcn.00404314
pop ecx
mov eax, dword [edi]
mov dword [edi + 4], ebp
cmp esi, dword [eax + 4]
jge 0x401ac8
cmp esi, dword [eax + 0x10]
jge 0x401a33
push eax
call fcn.00404372
jmp 0x401a32
push eax
call fcn.004043ae
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x401a2c
push dword [edi + 0x138]
push eax
call fcn.0040440a
pop ecx
pop ecx
mov dword [edi + 4], esi
lea eax, [esp + 0x13]
push eax
push dword [esp + 0x564]
push dword [esp + 0x564]
push dword [edi]
call fcn.004046b5
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x401a79
push dword [edi]
call fcn.00404314
pop ecx
mov dword [edi + 4], ebp
cmp byte [esp + 0x13], 0
jne 0x401b4e
test esi, esi
jle 0x401a92
mov eax, 0x600
jmp 0x401d97
cmp esi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x401d97
or ebp, 0xffffffff
cmp dword [edi + 4], ebp
je 0x401ab7
push dword [edi]
call fcn.00404314
pop ecx
mov eax, dword [edi]
mov esi, dword [esp + 0x558]
mov dword [edi + 4], ebp
cmp esi, dword [eax + 4]
jl 0x401ad2
mov eax, 0x10000
jmp 0x401d97
cmp esi, dword [eax + 0x10]
jge 0x401ae6
push eax
call fcn.00404372
jmp 0x401ae5
push eax
call fcn.004043ae
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x401adf
lea eax, [esp + 0x11c]
mov ecx, edi
push eax
push esi
call fcn.0040130b
xor edx, edx
inc edx
test byte [esp + 0x224], 0x10
je 0x401b55
cmp ebx, edx
je 0x401b4e
mov ecx, dword [esp + 0x55c]
mov al, byte [ecx]
cmp al, 0x2f
je 0x401b32
cmp al, 0x5c
je 0x401b32
test al, al
je 0x401b29
cmp byte [ecx + 1], 0x3a
je 0x401b32
mov byte [esp + 0x14], 0
mov edx, dword [esp + 0x14]
push ecx
xor ecx, ecx
lea eax, [edi + 0x140]
test dl, dl
cmove ecx, eax
push ecx
call fcn.00401246
pop ecx
xor eax, eax
jmp 0x401d96
xor eax, eax
jmp 0x401d97
mov esi, dword [esp + 0x55c]
xor ebx, ebx
cmp dword [esp + 0x564], edx
je 0x401cc9
mov al, byte [esi]
mov ecx, esi
mov dword [esp + 0x14], esi
jmp 0x401b8b
cmp al, 0x2f
je 0x401b80
cmp al, 0x5c
je 0x401b80
inc ecx
jmp 0x401b89
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov ecx, eax
mov al, byte [ecx]
test al, al
jne 0x401b75
lea eax, [esp + 0x18]
push esi
push eax
call fcn.0041cf50
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
cmp ecx, esi
jne 0x401baa
mov byte [esp + 0x18], bl
jmp 0x401bc9
mov eax, ecx
sub eax, esi
mov byte [esp + eax + 0x18], bl
mov al, byte [esp + 0x18]
cmp al, 0x2f
je 0x401bfc
cmp al, 0x5c
je 0x401bfc
test al, al
je 0x401bc9
cmp byte [esp + 0x19], 0x3a
je 0x401bfc
push ecx
lea eax, [esp + 0x1c]
push eax
lea esi, [edi + 0x140]
push esi
lea eax, [esp + 0x45c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00401246
add esp, 0x1c
jmp 0x401ca8
push ecx
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x458]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov al, byte [esp + 0x28]
add esp, 0x10
test al, al
je 0x401ca8
lea esi, [esp + 0x18]
mov ecx, esi
cmp al, 0x2f
je 0x401c32
cmp al, 0x5c
jne 0x401c34
mov esi, ecx
inc ecx
mov al, byte [ecx]
test al, al
jne 0x401c2a
lea eax, [esp + 0x18]
cmp esi, eax
je 0x401c6c
sub esi, eax
push esi
push eax
lea eax, [esp + 0x354]
push eax
call fcn.004191b0
lea eax, [esp + 0x358]
mov byte [esp + esi + 0x358], bl
push eax
push ebx
call fcn.00401246
add esp, 0x14
lea eax, [esp + 0x18]
mov byte [esp + 0x248], bl
push eax
lea eax, [esp + 0x24c]
push eax
call fcn.0041cf60
pop ecx
pop ecx
lea eax, [esp + 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, ebp
jne 0x401ca8
push ebx
lea eax, [esp + 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push ebx
push dword [esp + 0x228]
lea eax, [esp + 0x458]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, ebp
jne 0x401cd7
mov eax, 0x200
jmp 0x401d97
push dword [edi + 0x138]
push dword [edi]
call fcn.0040440a
pop ecx
pop ecx
cmp dword [edi + 0x13c], ebx
jne 0x401cff
push 0x4000
call fcn.0041713b
pop ecx
mov dword [edi + 0x13c], eax
lea eax, [esp + 0x13]
push eax
push 0x4000
push dword [edi + 0x13c]
push dword [edi]
call fcn.004046b5
mov ebp, eax
add esp, 0x10
cmp ebp, 0xffffff96
je 0x401d77
test ebp, ebp
js 0x401d48
jle 0x401d3e
push ebx
lea eax, [esp + 0x18]
push eax
push ebp
push dword [edi + 0x13c]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401d4f
cmp byte [esp + 0x13], bl
jne 0x401d56
test ebp, ebp
jne 0x401cff
mov ebx, 0x5000000
jmp 0x401d7c
mov ebx, 0x400
jmp 0x401d7c
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x401d7c
mov ebx, 0x1000
cmp dword [esp + 0x564], 1
je 0x401d8d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.00404314
mov eax, ebx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x544
ret 0x10