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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4258
call fcn.00416cb0
mov eax, dword [0x420204]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x41fc], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x41f0], ebx
lea edi, [ebp - 0x41ec]
stosd dword es:[edi], eax
push 0x4018
stosd dword es:[edi], eax
lea eax, [ebp - 0x41b8]
push ebx
push eax
mov esi, ecx
mov dword [ebp - 0x41bc], ebx
call fcn.00410fc0
add esp, 0xc
push 0x4c
lea eax, [ebp - 0x4250]
push ebx
push eax
mov dword [ebp - 0x4254], ebx
call fcn.00410fc0
or dword [ebp - 0x4204], 0xffffffff
xor eax, eax
lea edi, [ebp - 0x41d0]
stosd dword es:[edi], eax
add esp, 0xc
lea edi, [ebp - 0x41f4]
stosd dword es:[edi], eax
lea eax, [ebp - 0x41e8]
push esi
push eax
mov dword [ebp - 0x41cc], ebx
mov dword [ebp - 0x41e4], ebx
mov dword [ebp - 0x41d8], ebx
mov dword [ebp - 0x4200], ebx
mov dword [ebp - 0x41d4], fcn.00405d02
mov dword [ebp - 0x41d0], 0x405d1a
mov dword [ebp - 0x41f8], fcn.00405d02
mov dword [ebp - 0x41f4], 0x405d1a
call fcn.00405bdf
pop ecx
pop ecx
mov dword [ebp - 0x41c0], eax
cmp eax, ebx
jne 0x405a74
lea eax, [ebp - 0x41f0]
mov dword [ebp - 0x41f0], 0x405c67
mov dword [ebp - 0x41ec], 0x405c89
mov dword [ebp - 0x41bc], 0x407a40
mov dword [ebp - 0x41b8], 0x407a90
mov dword [ebp - 0x41b4], 0x407aa0
mov dword [ebp - 0x41b0], 0x407aec
mov dword [ebp - 0x41ac], eax
mov dword [ebp - 0x41a4], ebx
mov dword [ebp - 0x41a8], ebx
call fcn.00407b26
lea eax, [ebp - 0x4254]
call fcn.00405e78
lea eax, [ebp - 0x41f8]
push eax
lea eax, [ebp - 0x41d4]
push eax
lea edx, [ebp - 0x41bc]
lea ecx, [ebp - 0x4254]
call fcn.00407537
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x4057e8
lea esi, [ebp - 0x41d4]
lea eax, [ebp - 0x4254]
call fcn.00405ea7
mov dword [ebp - 0x41c0], edi
cmp edi, ebx
jne 0x405a74
mov dword [ebp - 0x41c4], ebx
cmp dword [ebp - 0x4238], ebx
jbe 0x405a5f
mov dword [ebp - 0x41e0], ebx
push 0x103
lea eax, [ebp - 0x113]
push ebx
push eax
mov byte [ebp - 0x114], bl
call fcn.00410fc0
add esp, 0xc
push dword [ebp - 0x41fc]
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0040bf0d
mov eax, dword [ebp - 0x4214]
mov ecx, dword [ebp - 0x41c4]
mov edi, dword [ebp - 0x41e0]
add edi, dword [ebp - 0x4244]
lea eax, [eax + ecx*4]
mov esi, dword [eax + 4]
sub esi, dword [eax]
add esp, 0xc
mov dword [ebp - 0x41c8], ebx
mov dword [ebp - 0x41dc], ebx
cmp esi, dword [ebp - 0x41e4]
jbe 0x4058a3
push dword [ebp - 0x41cc]
call fcn.0040b3e1
pop ecx
lea eax, [esi + esi]
push eax
push ebx
mov dword [ebp - 0x41e4], esi
call fcn.00405d02
pop ecx
pop ecx
mov dword [ebp - 0x41cc], eax
cmp eax, ebx
je 0x405a55
push dword [ebp - 0x41cc]
mov ecx, dword [ebp - 0x41c4]
lea edx, [ebp - 0x4254]
call fcn.00406e7a
pop ecx
push 3
push dword [ebp - 0x41cc]
lea eax, [ebp - 0x198]
mov dword [ebp - 0x19c], eax
lea eax, [ebp - 0x19c]
push eax
call fcn.00405ac5
push dword [ebp - 0x19c]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x198]
cmp dword [ebp - 0x19c], eax
je 0x405908
push dword [ebp - 0x19c]
call fcn.0040b3e1
pop ecx
cmp byte [edi + 0x19], bl
jne 0x405967
lea eax, [ebp - 0x41f8]
push eax
lea eax, [ebp - 0x41d4]
push eax
lea eax, [ebp - 0x41dc]
push eax
lea eax, [ebp - 0x41c8]
push eax
lea eax, [ebp - 0x4200]
push eax
lea eax, [ebp - 0x41d8]
push eax
lea eax, [ebp - 0x4204]
push eax
push dword [ebp - 0x41c4]
lea eax, [ebp - 0x41bc]
push eax
lea eax, [ebp - 0x4254]
call fcn.0040782b
add esp, 0x24
mov dword [ebp - 0x41c0], eax
cmp eax, ebx
jne 0x405a5f
cmp byte [ebp - 0x114], bl
je 0x40599d
lea esi, [ebp - 0x114]
mov al, byte [esi]
cmp al, 0x2f
je 0x405985
movsx eax, al
cmp eax, 0x2f2f
jne 0x405998
push ebx
lea eax, [ebp - 0x114]
push eax
mov byte [esi], bl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], 0x5c
inc esi
cmp byte [esi], bl
jne 0x405975
push ebx
lea eax, [ebp - 0x114]
cmp byte [edi + 0x19], bl
je 0x4059b2
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x405a2c
mov esi, dword [ebp - 0x41c8]
add esi, dword [ebp - 0x41d8]
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
mov dword [ebp - 0x41c0], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4059e5
xor eax, eax
inc eax
jmp 0x405a26
push ebx
lea eax, [ebp - 0x41c8]
push eax
push dword [ebp - 0x41dc]
mov dword [ebp - 0x41c8], ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x41dc]
cmp dword [ebp - 0x41c8], eax
je 0x405a19
mov dword [ebp - 0x41c0], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x41c0]
mov dword [ebp - 0x41c0], eax
cmp dword [ebp - 0x41c0], ebx
jne 0x405a5f
inc dword [ebp - 0x41c4]
mov eax, dword [ebp - 0x41c4]
add dword [ebp - 0x41e0], 0x20
cmp eax, dword [ebp - 0x4238]
jb 0x40580e
jmp 0x405a5f
mov dword [ebp - 0x41c0], 1
push dword [ebp - 0x41d8]
lea eax, [ebp - 0x41d4]
push eax
call dword [ebp - 0x41d0]
pop ecx
pop ecx
lea esi, [ebp - 0x41d4]
lea eax, [ebp - 0x4254]
call fcn.00405ea7
push dword [ebp - 0x41cc]
call fcn.0040b3e1
cmp dword [ebp - 0x41e8], 0xffffffff
pop ecx
je 0x405ab0
push dword [ebp - 0x41e8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x405ab0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x41c0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040aedb
leave
ret