Function at 0x402070
Capabilities:
Set registry value

Disassembly:
sub esp, 0x51c
push esi
push edi
mov esi, dword [esp + 0x528]
push esi
call fcn.004029a0
add esp, 4
test eax, eax
jne 0x4021f8
push esi
call fcn.004031a0
add esp, 4
test eax, eax
jne 0x4021f8
push esi
call fcn.00402380
add esp, 4
test eax, eax
je 0x402152
cmp dword [0x4095f8], 0
jne 0x402152
mov edi, dword [esp + 0x530]
test edi, edi
jne 0x4020f4
push esi
call fcn.00403360
add esp, 4
cmp dword [0x4091c4], 0
jne 0x4020f4
push esi
call fcn.00402440
add esp, 4
test eax, eax
jne 0x4020f4
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
push edi
push esi
call fcn.00402750
add esp, 8
test eax, eax
jne 0x40210d
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
test edi, edi
jne 0x4021f8
cmp dword [0x4091c4], 0
jne 0x402136
push esi
call fcn.004028c0
add esp, 4
test eax, eax
jne 0x402136
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
push esi
call fcn.004039d0
add esp, 4
test eax, eax
jne 0x4021f8
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
push esi
call fcn.004023e0
add esp, 4
test eax, eax
je 0x402206
mov edi, dword [esp + 0x530]
test edi, edi
jne 0x402198
push esi
call fcn.00403360
add esp, 4
cmp dword [0x4091c4], 0
jne 0x402198
push esi
call fcn.00402440
add esp, 4
test eax, eax
jne 0x402198
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
push edi
push esi
call fcn.00402750
add esp, 8
test eax, eax
jne 0x4021b1
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
test edi, edi
jne 0x4021ee
cmp dword [0x4091c4], 0
jne 0x4021d6
push esi
call fcn.004028c0
add esp, 4
test eax, eax
jne 0x4021d6
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
push esi
call fcn.004039d0
add esp, 4
test eax, eax
jne 0x4021ee
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
mov dword [0x4095f8], 1
mov eax, 1
pop edi
pop esi
add esp, 0x51c
ret
cmp dword [esp + 0x530], 0
jne 0x4021f8
lea eax, [esp + 0x298]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edi, [esp + 0xc]
xor eax, eax
mov ecx, 0xa2
push 0x5c
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x29c]
push ecx
call fcn.004040e0
add esp, 8
test eax, eax
je 0x402291
cmp byte [eax], 0
je 0x402291
cmp byte [eax + 1], 0x22
jne 0x402291
lea edi, [eax + 2]
mov ecx, 0xffffffff
mov byte [eax], 0
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x22
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
call fcn.00404020
add esp, 8
test eax, eax
je 0x402291
cmp byte [eax], 0
je 0x402291
mov byte [eax], 0
lea eax, [esp + 8]
lea ecx, [esp + 0x298]
push eax
push ecx
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4022c5
push 0
push eax
push 0x13
call fcn.00401c00
add esp, 0xc
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
cmp byte [esp + 0xc], 0
mov esi, dword [esp + 0x52c]
push esi
je 0x402317
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 8]
push eax
lea eax, [esp + 0x10]
push esi
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x402355
push 0
push eax
push 0x13
call fcn.00401c00
mov eax, dword [esp + 0x14]
add esp, 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
mov eax, dword [esp + 0x10]
push 1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
test eax, eax
je 0x402355
push 0
push eax
push 0x13
call fcn.00401c00
mov eax, dword [esp + 0x14]
add esp, 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x4021f8
push 0
push eax
push 0x13
call fcn.00401c00
add esp, 0xc
xor eax, eax
pop edi
pop esi
add esp, 0x51c
ret