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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a8981
mov eax, dword fs:[0]
push eax
sub esp, 0x484
mov eax, dword [0x60f520]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x438], ebx
test esi, esi
jne 0x522b53
xor eax, eax
jmp 0x522f5e
push 0x105
lea eax, [ebp - 0x31f]
mov byte [ebp - 0x320], 0
push 0
push eax
call fcn.00559380
push ecx
push 0x104
lea eax, [ebp - 0x320]
mov ecx, ebx
push eax
push 0
lea edx, [ebp - 0x490]
call fcn.0052a940
add esp, 0x1c
test eax, eax
jne 0x522b4c
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00559380
lea ecx, [ebp - 0x218]
add esp, 0xc
mov eax, ecx
mov edx, 0x104
sub esi, eax
jmp 0x522bc0
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x522bde
movzx eax, word [esi + ecx]
test ax, ax
je 0x522bde
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x522bc0
jmp 0x522be2
test edx, edx
jne 0x522be5
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
call fcn.0040bce0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x522c13
push 0x80004005
call fcn.0040c390
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x424]
mov dword [ebp - 4], 0
mov dword [ebp - 0x428], eax
lea ecx, [ebp - 0x428]
push 3
lea eax, [ebp - 0x320]
push eax
call fcn.00428e70
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x428]
test edx, edx
jne 0x522c5c
xor ecx, ecx
jmp 0x522c70
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x522c61
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x42c]
call fcn.0040c1c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x424]
mov eax, dword [ebp - 0x428]
cmp eax, ecx
je 0x522c9a
push eax
call fcn.00551f79
add esp, 4
push 0x5f
push 0x3a
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x2a
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x3f
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x22
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x3c
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x3e
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5f
push 0x7c
lea ecx, [ebp - 0x42c]
call fcn.00514530
push 0x5c
push 0x2f
lea ecx, [ebp - 0x42c]
call fcn.00514530
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x218]
call fcn.004445e0
mov esi, dword [ebp - 0x42c]
test eax, eax
js 0x522d4c
mov eax, dword [ebp - 0x434]
mov edx, 0x104
push ecx
push esi
push ecx
lea ecx, [ebp - 0x218]
sub edx, eax
lea ecx, [ecx + eax*2]
call fcn.00444640
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x522d8a
movzx eax, word [ebp + eax*2 - 0x21a]
cmp eax, 0x5c
je 0x522d6f
cmp eax, 0x2f
jne 0x522d8a
push 0
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov edi, 1
jmp 0x522f3b
mov eax, dword [ebp - 0x474]
test eax, eax
jns 0x522d9b
xor edi, edi
jmp 0x522f3b
push 0
push 0x80
push 2
push 0
push 1
lea eax, [ebp - 0x218]
push 0x40000000
push eax
jne 0x522dcd
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 1
jmp 0x522f3b
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x522e9f
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x430]
call fcn.0040c2d0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x430]
cmp dword [eax - 4], 1
jle 0x522e16
push dword [eax - 0xc]
lea ecx, [ebp - 0x430]
call fcn.0040c050
mov eax, dword [ebp - 0x430]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x430]
call fcn.0040b920
mov eax, dword [ebp - 0x430]
cmp dword [eax - 4], 1
jle 0x522e4a
push dword [eax - 0xc]
lea ecx, [ebp - 0x430]
call fcn.0040c050
mov eax, dword [ebp - 0x430]
push 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x430]
call fcn.0040b920
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call edi
mov ebx, eax
lea ecx, [ebp - 0x430]
cmp ebx, 0xffffffff
jne 0x522e96
call fcn.0040c450
xor edi, edi
jmp 0x522f3b
mov byte [ebp - 4], 0
call fcn.0040c450
mov ecx, dword [ebp - 0x438]
sub esp, 0xc
xor edi, edi
call fcn.0052ae90
add esp, 0xc
test eax, eax
jne 0x522f29
push 0x8000
call fcn.00551ee7
mov ecx, dword [ebp - 0x438]
mov edx, eax
mov dword [ebp - 0x434], eax
call fcn.0052b010
add esp, 4
test eax, eax
jle 0x522f11
mov esi, dword [ebp - 0x434]
mov edi, dword [ebp - 0x438]
push 0
lea ecx, [ebp - 0x43c]
push ecx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ecx
mov edx, esi
mov ecx, edi
call fcn.0052b010
add esp, 4
test eax, eax
jg 0x522ee6
mov esi, dword [ebp - 0x42c]
xor edi, edi
push dword [ebp - 0x434]
test eax, eax
mov ecx, 1
cmove edi, ecx
call fcn.00551f79
add esp, 4
mov ecx, dword [ebp - 0x438]
call fcn.0052b270
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x522f5c
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055199a
mov esp, ebp
pop ebp
ret