Function at 0x401e50
Capabilities:
Set registry value

Disassembly:
sub esp, 0x328
push ebx
push esi
push edi
lea eax, [esp + 0x1c]
push 5
push eax
call fcn.00404720
mov edi, dword [esp + 0x340]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
lea ecx, [esp + 0x34]
push esi
push ecx
mov dword [esp + 0x20], esi
call fcn.00401e10
lea edx, [esp + 0x3c]
add esp, 0x10
test edx, edx
lea edi, [esp + 0x130]
lea ebx, [esp + 0x2c]
je 0x40202d
lea eax, [esp + 0x130]
test eax, eax
je 0x40202d
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x40202d
mov eax, 0x55555556
push ebp
imul esi
mov eax, edx
xor ebp, ebp
shr eax, 0x1f
add edx, eax
mov eax, 0x6bca1af3
shl edx, 2
mov dword [esp + 0x28], edx
imul edx
sar edx, 5
mov ecx, edx
mov dword [esp + 0x10], ebp
shr ecx, 0x1f
add edx, ecx
mov esi, 0x13
mov ecx, edx
mov dword [esp + 0x2c], ecx
js 0x401fa8
cmp ebp, ecx
jne 0x401f3c
mov eax, dword [esp + 0x28]
mov esi, 0x4c
cdq
idiv esi
mov eax, edx
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
test esi, esi
jle 0x401f81
mov dword [esp + 0x18], esi
xor ecx, ecx
mov edx, 3
xor eax, eax
mov al, byte [ebx]
or ecx, eax
inc ebx
shl ecx, 8
dec edx
jne 0x401f4b
mov edx, 4
mov eax, ecx
shr eax, 0x1a
inc edi
mov al, byte [eax + 0x401158]
mov byte [edi - 1], al
shl ecx, 6
dec edx
jne 0x401f5d
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x401f44
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
mov byte [edi], 0xd
inc edi
lea eax, [edx + esi*4 + 2]
mov byte [edi], 0xa
inc edi
inc ebp
mov dword [esp + 0x10], eax
cmp ebp, ecx
jle 0x401f21
test eax, eax
je 0x401fa8
sub edi, 2
sub eax, 2
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov ecx, 3
cdq
idiv ecx
mov ebp, edx
test ebp, ebp
je 0x402022
lea esi, [ebp + 1]
test esi, esi
je 0x402022
xor eax, eax
xor ecx, ecx
cmp ecx, ebp
jge 0x401fd0
xor edx, edx
mov dl, byte [ebx]
or eax, edx
inc ebx
shl eax, 8
inc ecx
cmp ecx, 3
jl 0x401fc5
test esi, esi
jle 0x401ff4
mov ecx, esi
mov edx, eax
shr edx, 0x1a
inc edi
mov dl, byte [edx + 0x401158]
mov byte [edi - 1], dl
shl eax, 6
dec ecx
jne 0x401fdf
mov edx, dword [esp + 0x10]
add edx, esi
mov dword [esp + 0x10], edx
mov edx, 4
sub edx, esi
test edx, edx
jle 0x40201e
mov ecx, edx
mov eax, 0x3d3d3d3d
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
add dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
pop ebp
mov dword [esp + 0x10], eax
mov esi, eax
lea ecx, [esp + 0x234]
push 0x100
push ecx
mov byte [esp + esi + 0x138], 0
call fcn.00403df0
add esp, 8
lea edx, [esp + 0x18]
lea eax, [esp + 0x234]
push 0
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4020a7
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x20]
push ecx
push 1
push eax
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x140]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0x328
ret