Function at 0x405030
Capabilities:
Set registry value

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
mov esi, 1
cmp dword [esp + 0x11c], esi
push edi
mov byte [esp + 0x13], 0
mov dword [esp + 0x14], 0
mov ebx, 0x401210
mov dword [esp + 0x18], SysReAllocString
jle 0x405179
mov edi, dword [esp + 0x124]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov eax, dword [edi + esi*4]
push 0x4016dc
push eax
call ebp
test eax, eax
jne 0x405089
mov ebx, 0x401260
jmp 0x4050cc
mov ecx, dword [edi + esi*4]
push 0x4016bc
push ecx
call ebp
test eax, eax
jne 0x40509f
mov ebx, 0x4012b0
jmp 0x4050cc
mov edx, dword [edi + esi*4]
push 0x40169c
push edx
call ebp
test eax, eax
jne 0x4050b5
mov byte [esp + 0x13], 1
jmp 0x4050cc
mov eax, dword [edi + esi*4]
push 0x40167c
push eax
call ebp
test eax, eax
jne 0x4050cc
mov dword [esp + 0x18], reloc.OLEAUT32.dll_SysReAllocString
inc esi
cmp esi, dword [esp + 0x120]
jl 0x405073
cmp byte [esp + 0x13], 0
je 0x40516e
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
push 3
push ebx
push edx
call fcn.00404f80
add esp, 0x10
test al, al
je 0x405152
push 0x80
lea eax, [esp + 0x20]
push eax
push 0x401448
lea ecx, [esp + 0x20]
call fcn.00404540
mov esi, eax
cmp esi, 2
je 0x405172
test esi, esi
jne 0x405134
push eax
lea ecx, [esp + 0x20]
push 0x401420
push ecx
call fcn.00404760
add esp, 0xc
test al, al
je 0x405172
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40514b
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x14], 0
mov ebx, 0x401300
jmp 0x405172
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405169
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x14], 0
mov ebx, 0x401300
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x14], 0
jne 0x4051b0
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
push 3
push ebx
push eax
call fcn.00404f80
add esp, 0x10
test al, al
je 0x4052c6
push 0x80
lea ecx, [esp + 0x20]
push ecx
push 0x401448
lea ecx, [esp + 0x20]
call fcn.00404540
mov esi, eax
test esi, esi
je 0x4051c4
cmp esi, 2
jne 0x4052c6
xor edx, edx
mov word [esp + 0x1c], dx
cmp byte [esp + 0x13], 0
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
je 0x405266
push 0x401408
call esi
mov ebp, dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov edi, eax
push 0x401408
lea eax, [esp + 0x20]
push eax
call ebp
test eax, eax
je 0x405212
movzx ecx, word [eax + edi*2]
lea eax, [eax + edi*2]
cmp cx, 0x2d
je 0x405266
test cx, cx
je 0x405266
push 0x401408
push eax
call ebp
test eax, eax
jne 0x4051f4
lea ecx, [esp + 0x1c]
push 0x4013fc
push ecx
call fcn.00404670
add esp, 8
test al, al
je 0x405241
push 0x4013fc
call esi
lea edx, [esp + 0x1c]
push edx
mov edi, eax
call esi
sub eax, edi
xor ecx, ecx
mov word [esp + eax*2 + 0x1c], cx
lea edx, [esp + 0x1c]
push edx
call esi
mov ecx, 0x80
push 0x401408
sub ecx, eax
push ecx
lea edx, [esp + eax*2 + 0x24]
push edx
call fcn.00404600
add esp, 0xc
test al, al
je 0x4052c6
lea eax, [esp + 0x1c]
push 0x4013fc
push eax
call fcn.00404670
add esp, 8
test al, al
jne 0x4052c6
lea ecx, [esp + 0x1c]
push ecx
call esi
mov edx, 0x80
sub edx, eax
push 0x4013fc
push edx
lea eax, [esp + eax*2 + 0x24]
push eax
call fcn.00404600
add esp, 0xc
test al, al
je 0x4052c6
lea ecx, [esp + 0x1c]
push ecx
call esi
mov ecx, dword [esp + 0x14]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x20]
push eax
push 1
push 0
push 0x401448
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4052d5
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret