Function at 0x402bc0
Capabilities:
Create directory
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x520
mov eax, dword [0x42b054]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push dword [eax]
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x518]
push dword [0x42c188]
mov dword [ebp - 0x520], edi
push str._s_s
push eax
call fcn.00407150
mov eax, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
add esp, 0x10
or ebx, 0xffffffff
cmp byte [ebp + 8], 0
je 0x402d17
lea ecx, [ebp - 0x310]
push ecx
push 0
push 0
push 0x10
push 0
call eax
mov eax, dword [0x42b014]
mov esi, dword [edi]
push 0x42139c
mov dword [ebp - 0x51c], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [edi]
lea ecx, [ebp - 0x51c]
push dword [esi - 8]
push 0x42139c
push eax
call fcn.00402700
mov eax, dword [ebp - 0x51c]
mov edx, eax
mov esi, eax
nop dword [eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402c60
lea edi, [ebp - 0x310]
sub edx, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402c76
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x42b010]
je 0x402cb2
lea ecx, [eax - 0xc]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402cb2
push ecx
call fcn.0040be90
add esp, 4
push 0
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.00402f00
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push 0
push 0x103
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x310]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
lea ecx, [ebp - 0x51c]
push ecx
push eax
mov byte [ebp + eax - 0x109], 0xa
lea eax, [ebp - 0x108]
push eax
push dword [0x42c16c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x310]
push ecx
push 0
push 0
push 0x17
push 0
call eax
mov eax, dword [0x42b014]
mov esi, dword [0x42c180]
push 0x42139c
mov dword [ebp - 0x51c], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [0x42c180]
lea ecx, [ebp - 0x51c]
push dword [esi - 8]
push 0x42139c
push eax
call fcn.00402700
mov eax, dword [ebp - 0x51c]
mov edx, eax
mov esi, eax
nop dword [eax + eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402d70
lea edi, [ebp - 0x310]
sub edx, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402d86
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x42b010]
je 0x402dc2
lea ecx, [eax - 0xc]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402dc2
push ecx
call fcn.0040be90
add esp, 4
push 0
lea eax, [ebp - 0x310]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov edi, dword [ebp - 0x520]
mov eax, dword [0x42b014]
push 0x42139c
mov dword [ebp - 0x51c], eax
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [edi]
lea ecx, [ebp - 0x51c]
push dword [esi - 8]
push 0x42139c
push eax
call fcn.00402700
mov eax, dword [ebp - 0x51c]
mov edx, eax
mov esi, eax
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402e11
lea edi, [ebp - 0x310]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402e30
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x42b010]
je 0x402e6a
add eax, 0xfffffff4
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x402e6a
push eax
call fcn.0040be90
add esp, 4
push 0
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.00402f00
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push 0
push 0x103
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x310]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
lea ecx, [ebp - 0x520]
push ecx
push eax
mov byte [ebp + eax - 0x109], 0xa
lea eax, [ebp - 0x108]
push eax
push dword [0x42c16c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x42c168]
add eax, 0x80e8
push 0
push eax
mov dword [0x42c168], eax
mov eax, dword [0x42c164]
push 0x402
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c175
mov esp, ebp
pop ebp
ret