Function at 0x421720
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 0x4d0e13
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x52de08]
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.004147c0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x268]
push ecx
call fcn.00421080
add esp, 4
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x268]
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x4219e5
mov eax, dword [0x52ddd4]
mov edx, dword [eax + 0xc]
mov ecx, 0x52ddd4
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 0x4217d1
push edi
lea ecx, [ebp - 0x26c]
call fcn.00406e80
mov esi, dword [ebp - 0x26c]
cmp dword [esi - 8], edi
jge 0x4217e0
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.004ab44b
add esp, 8
test eax, eax
js 0x4217d6
cmp eax, dword [esi - 8]
jg 0x4217d6
lea edx, [ebp - 0x264]
xor ecx, ecx
mov dword [esi - 0xc], eax
push edx
mov word [esi + eax*2], cx
call fcn.00420610
add esp, 4
mov byte [ebp - 4], 5
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x26c]
call fcn.00412570
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 0x42185e
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 0x4218e2
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push eax
push esi
call edi
lea ecx, [ebp - 0x264]
push ecx
call fcn.00420020
add esp, 4
mov byte [ebp - 4], 7
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x26c]
call fcn.00412570
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 0x4218c0
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.00412bf0
jmp 0x4219c5
lea eax, [esi - 0x10]
push eax
call fcn.00406ee0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x264], eax
mov byte [ebp - 4], 0xb
push 0x4e91a0
lea ecx, [ebp - 0x264]
call fcn.00412570
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 0x42195a
lea eax, [ebp - 0x234]
push 0x4e9198
push eax
call fcn.004ab66d
add esp, 8
test eax, eax
je 0x42195a
lea ecx, [ebp - 0x234]
push 0x4e9194
push ecx
call fcn.004ab66d
add esp, 8
test eax, eax
jne 0x42196e
lea edx, [ebp - 0x260]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x421921
jmp 0x421986
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x26c]
call fcn.00412570
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.00412bf0
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 0x4219bf
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 0x4219e5
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.0041fe20
add esp, 4
mov byte [ebp - 4], 0x10
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x268]
call fcn.00412570
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 0x421a2c
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.004126b0
mov ecx, eax
call fcn.00412730
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x268]
call fcn.00412570
mov edx, dword [ebp - 0x268]
push 0
push edx
call esi
lea eax, [ebp - 0x264]
push eax
mov ecx, ebx
call fcn.0041ab30
mov byte [ebp - 4], 0x12
mov ecx, dword [ebp - 0x268]
mov eax, dword [eax]
push ecx
push eax
call fcn.00497720
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 0x421ab1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x421b62
lea ecx, [ebp - 0x264]
push ecx
call fcn.004201d0
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 [0x52f4f8]
push esi
push edx
push eax
call fcn.0047c050
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 0x421b0c
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 0x421b32
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 0x421b5b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x421df5
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.00420910
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 SysReAllocString
mov dword [ebp - 0x264], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x421bdc
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 0x421c02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x421ca5
lea ecx, [ebp - 0x264]
push ecx
call fcn.00420420
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 [0x52f4f8]
push esi
push edx
push eax
call fcn.0047c050
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 0x421c5d
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 0x421c74
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 0x421ca0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x421b32
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 0x421cc3
lea esi, [ecx + 0xd]
jmp 0x421ce6
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 0x421d87
lea edx, [ebp - 0x264]
push edx
call fcn.00420420
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 [0x52f4f8]
push esi
push edx
push eax
call fcn.0047c050
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 0x421d3f
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 0x421d56
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 0x421d82
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x421b32
mov byte [ebp - 4], 1
xor esi, esi
cmp edi, esi
je 0x421d9e
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 0x421dca
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 0x421df3
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.004aaa9b
mov esp, ebp
pop ebp
ret