Function at 0x405866
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6b8
mov eax, dword [0x40f014]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push 0x4020e8
mov dword [ebp - 4], eax
mov dword [ebp - 0x6b4], edi
call fcn.004061e0
pop ecx
call fcn.00405e04
test eax, eax
jne 0x4058b0
push 0x401788
push edi
push edi
push 0x4020cc
push 0x55a
jmp 0x40598d
lea eax, [ebp - 0x6b0]
push eax
mov dword [ebp - 0x6b0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4058e7
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4020bc
push 0x4020cc
push 0x563
jmp 0x40598d
cmp dword [ebp - 0x6a0], 2
je 0x405919
push dword [ebp - 0x6a0]
push 0x402098
push edi
push edi
push 0x4020cc
push 0x571
push 0x401240
call fcn.004062d4
add esp, 0x1c
jmp 0x40599a
cmp dword [ebp - 0x6ac], 4
jae 0x40593b
push dword [ebp - 0x6ac]
push 0x402074
push edi
push edi
push 0x4020cc
push 0x577
jmp 0x405907
cmp esi, edi
jne 0x405952
push 0x401f5c
push edi
push edi
push 0x4020cc
push 0x581
jmp 0x40598d
push esi
call fcn.004048e5
test eax, eax
je 0x40599a
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0x7d0
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x4059a1
push 0x40205c
push edi
push edi
push 0x4020cc
push 0x591
push 0x401240
call fcn.004062d4
add esp, 0x18
xor eax, eax
jmp 0x405dc2
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push dword [esi + 8]
call edi
mov ebx, eax
lea eax, [ebp - 0x61c]
push eax
call edi
lea eax, [ebx + eax - 2]
shl eax, 1
cmp eax, 0x208
jbe 0x4059ec
push 0x40203c
push 0
push 0
push 0x4020cc
push 0x596
push 0x401240
call fcn.004062d4
add esp, 0x18
xor eax, eax
jmp 0x405dc1
push dword [esi + 8]
lea eax, [ebp - 0x61c]
push eax
mov ebx, 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00404a42
add esp, 0x10
lea eax, [ebp - 0x6b8]
push eax
lea eax, [ebp - 0x6b4]
push eax
xor eax, eax
push eax
push 2
push eax
push eax
push eax
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x405a4e
push 0
push eax
push 0x402028
push 0x4020cc
push 0x5a7
jmp 0x405d31
push ebx
lea eax, [ebp - 0x414]
push eax
push dword [esi + 0xc]
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
jne 0x405a79
push eax
push eax
push 0x401704
push 0x4020cc
push 0x5b1
jmp 0x405d31
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x7d1
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405aab
push 0x40205c
push eax
push eax
push 0x4020cc
push 0x5b7
jmp 0x405d31
lea eax, [ebp - 0x414]
push eax
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x414]
push eax
push 1
push 0
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405af4
push 0
push eax
push 0x402014
push 0x4020cc
push 0x5c4
jmp 0x405d31
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x7d2
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405b2a
push 0x40205c
push eax
push eax
push 0x4020cc
push 0x5cd
jmp 0x405d31
push dword [esi + 0x10]
call edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x10]
lea eax, [ebp - 0x20c]
push 1
push 0
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405b65
push 0
push eax
push 0x402014
push 0x4020cc
push 0x5da
jmp 0x405d31
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x7d3
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405b9b
push 0x402000
push eax
push eax
push 0x4020cc
push 0x5e3
jmp 0x405d31
push dword [esi + 0x14]
call edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x14]
lea eax, [ebp - 0x20c]
push 1
push 0
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405bd6
push 0
push eax
push 0x402014
push 0x4020cc
push 0x5f0
jmp 0x405d31
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x7d5
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405c0c
push 0x40205c
push eax
push eax
push 0x4020cc
push 0x5f9
jmp 0x405d31
push dword [esi + 0x18]
call edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x18]
lea eax, [ebp - 0x20c]
push 1
push 0
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405c47
push 0
push eax
push 0x402014
push 0x4020cc
push 0x606
jmp 0x405d31
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x7d4
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405c7d
push 0x40205c
push eax
push eax
push 0x4020cc
push 0x60f
jmp 0x405d31
push dword [esi + 0x1c]
call edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x1c]
lea eax, [ebp - 0x20c]
push 1
push 0
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405cb5
push 0
push eax
push 0x402014
push 0x4020cc
push 0x61c
jmp 0x405d31
cmp dword [esi], 4
jne 0x405d84
cmp dword [esi + 0x20], 0
je 0x405d84
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x7d6
push dword [0x40fba0]
call fcn.0040576b
test eax, eax
jne 0x405cfb
push 0x40205c
push eax
push eax
push 0x4020cc
push 0x628
jmp 0x405d31
push dword [esi + 0x20]
call edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x20]
lea eax, [ebp - 0x20c]
push 1
push 0
push eax
push dword [ebp - 0x6b4]
call ebx
test eax, eax
je 0x405d84
push 0
push eax
push 0x402014
push 0x4020cc
push 0x635
push 0x401240
call fcn.004062d4
add esp, 0x18
cmp dword [ebp - 0x6b4], 0
je 0x405d76
push dword [ebp - 0x6b4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x405d76
push 0
push eax
push 0x4012dc
push 0x4020cc
push 0x645
push 0x401240
call fcn.004062d4
add esp, 0x18
push 0x401fdc
call fcn.004061e0
xor eax, eax
jmp 0x405dc0
push dword [ebp - 0x6b4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x405db3
push 0
push eax
push 0x4012dc
push 0x4020cc
push 0x63b
push 0x401240
call fcn.004062d4
add esp, 0x18
push 0x401fb4
call fcn.004061e0
xor eax, eax
inc eax
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.004065c9
leave
ret 8