Function at 0x41d010
Capabilities:
Check if file exists
Create directory
Enumerate files on windows
Get common file path
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x519be3
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x587978]
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
lea eax, [ebp - 0x270]
mov ebx, ecx
push eax
mov dword [ebp - 0x274], ebx
call fcn.00412770
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x268]
push ecx
call fcn.0041c970
add esp, 4
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x268]
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x41d2d5
mov eax, dword [0x587944]
mov edx, dword [eax + 0xc]
mov ecx, 0x587944
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x26c], esi
mov byte [ebp - 4], 4
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
mov edi, 0x105
sub eax, edi
or eax, ecx
jge 0x41d0c1
push edi
lea ecx, [ebp - 0x26c]
call fcn.00406e00
mov esi, dword [ebp - 0x26c]
cmp dword [esi - 8], edi
jge 0x41d0d0
push 0x80070057
call fcn.00406170
push 1
push 0x1a
xor eax, eax
push esi
mov dword [esi - 0xc], edi
push eax
mov word [esi + 0x20a], ax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004eb8eb
add esp, 8
test eax, eax
js 0x41d0c6
cmp eax, dword [esi - 8]
jg 0x41d0c6
lea edx, [ebp - 0x264]
xor ecx, ecx
mov dword [esi - 0xc], eax
push edx
mov word [esi + eax*2], cx
call fcn.0041bf00
add esp, 4
mov byte [ebp - 4], 5
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x26c]
call fcn.004113a0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d14e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x26c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41d1d2
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push eax
push esi
call edi
lea ecx, [ebp - 0x264]
push ecx
call fcn.0041b910
add esp, 4
mov byte [ebp - 4], 7
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x26c]
call fcn.004113a0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d1b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x26c]
push 0
push esi
call edi
lea ecx, [ebp - 0x26c]
push ecx
lea ecx, [ebp - 0x268]
call fcn.00411920
jmp 0x41d2b5
lea eax, [esi - 0x10]
push eax
call fcn.00406e60
add eax, 0x10
add esp, 4
mov dword [ebp - 0x264], eax
mov byte [ebp - 4], 0xb
push 0x532ec4
lea ecx, [ebp - 0x264]
call fcn.004113a0
mov ebx, dword [ebp - 0x264]
lea edx, [ebp - 0x260]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
test byte [ebp - 0x260], 0x10
je 0x41d24a
lea eax, [ebp - 0x234]
push 0x532ebc
push eax
call fcn.004ebb0d
add esp, 8
test eax, eax
je 0x41d24a
lea ecx, [ebp - 0x234]
push 0x532eb8
push ecx
call fcn.004ebb0d
add esp, 8
test eax, eax
jne 0x41d25e
lea edx, [ebp - 0x260]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x41d211
jmp 0x41d276
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x26c]
call fcn.004113a0
mov esi, dword [ebp - 0x26c]
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x26c]
push ecx
lea ecx, [ebp - 0x268]
call fcn.00411920
mov byte [ebp - 4], 4
lea eax, [ebx - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d2af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x274]
mov byte [ebp - 4], 1
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d2d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x264]
push ecx
call fcn.0041b710
add esp, 4
mov byte [ebp - 4], 0x10
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x268]
call fcn.004113a0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d31c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x268]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push ecx
call esi
lea ecx, [ebp - 0x270]
call fcn.004114b0
mov ecx, eax
call fcn.00411530
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x268]
call fcn.004113a0
mov edx, dword [ebp - 0x268]
push 0
push edx
call esi
lea eax, [ebp - 0x264]
push eax
mov ecx, ebx
call fcn.004164b0
mov byte [ebp - 4], 0x12
mov ecx, dword [ebp - 0x268]
mov eax, dword [eax]
push ecx
push eax
call fcn.004d78f0
mov esi, eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d3a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x41d452
lea ecx, [ebp - 0x264]
push ecx
call fcn.0041bac0
add esp, 4
mov byte [ebp - 4], 0x14
mov ecx, dword [ebx + 8]
mov edx, dword [ebp - 0x270]
mov eax, dword [eax]
push ecx
mov ecx, dword [0x589070]
push esi
push edx
push eax
call fcn.0047cfd0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d3fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x268]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d422
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x270]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d44b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x41d6e5
xor edi, edi
xor esi, esi
mov dword [ebp - 0x280], edi
mov dword [ebp - 0x27c], esi
mov dword [ebp - 0x278], esi
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x26c]
push ecx
call fcn.0041c200
add esp, 4
mov byte [ebp - 4], 0x1a
mov eax, dword [eax]
lea edx, [ebp - 0x284]
push edx
lea ecx, [ebp - 0x264]
push ecx
push esi
push 0x2001f
push esi
push esi
push esi
push eax
push SysReAllocStringLen
mov dword [ebp - 0x264], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x41d4cc
mov edi, dword [ebp - 0x264]
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x280], edi
xor esi, esi
mov dword [ebp - 0x27c], eax
mov byte [ebp - 4], 0x19
mov eax, dword [ebp - 0x26c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d4f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x41d595
lea ecx, [ebp - 0x264]
push ecx
call fcn.0041bd10
add esp, 4
mov byte [ebp - 4], 0x1c
mov ecx, dword [ebx + 8]
mov edx, dword [ebp - 0x270]
mov eax, dword [eax]
push ecx
mov ecx, dword [0x589070]
push esi
push edx
push eax
call fcn.0047cfd0
mov byte [ebp - 4], 0x19
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d54d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
xor esi, esi
cmp edi, esi
je 0x41d564
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x27c], esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x268]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d590
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41d422
mov eax, dword [ebp - 0x268]
mov ebx, dword [ebp - 0x270]
xor ecx, ecx
test eax, eax
setne cl
mov esi, eax
test ecx, ecx
jne 0x41d5b3
lea esi, [ecx + 0xd]
jmp 0x41d5d6
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
push ecx
push esi
push 1
push 0
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
je 0x41d677
lea edx, [ebp - 0x264]
push edx
call fcn.0041bd10
add esp, 4
mov byte [ebp - 4], 0x21
mov ecx, dword [ebp - 0x274]
mov ecx, dword [ecx + 8]
mov edx, dword [ebp - 0x270]
mov eax, dword [eax]
push ecx
mov ecx, dword [0x589070]
push esi
push edx
push eax
call fcn.0047cfd0
mov byte [ebp - 4], 0x19
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d62f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
xor esi, esi
cmp edi, esi
je 0x41d646
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x27c], esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x268]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d672
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41d422
mov byte [ebp - 4], 1
xor esi, esi
cmp edi, esi
je 0x41d68e
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x27c], esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x268]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d6ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x270]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d6e3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
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.004eaf3b
mov esp, ebp
pop ebp
ret