Function at 0x3163e1d9
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push ebx
push esi
push edi
push dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.3163da84
test eax, eax
pop ecx
jne 0x3163e205
push ebx
push dword [ebp + 0x10]
call fcn.3163df31
pop ecx
pop ecx
push 0x28
lea eax, [ebp - 0x60]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x3163e42b
mov esi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
lea eax, [ebp - 0x60]
push eax
push 0x316460c0
mov edi, 0x104
lea eax, [ebp - 0x268]
push edi
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x2001f
push ebx
push 0x316460d4
push ebx
lea eax, [ebp - 0x268]
push eax
push SysAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x3163e42b
cmp dword [ebp + 0xc], ebx
lea eax, [ebp - 0x268]
jne 0x3163e288
push dword [ebp + 8]
push 0x316460d8
push edi
push eax
call esi
add esp, 0x10
jmp 0x3163e292
push dword [ebp + 0xc]
push edi
push eax
call fcn.3163806b
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x268]
push eax
push 1
push ebx
push ebx
push dword [ebp - 8]
call esi
test eax, eax
jne 0x3163e42b
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x2001f
push ebx
push 0x316460ec
push ebx
push 0x316460f0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x3163e42b
push edi
lea eax, [ebp - 0x268]
push eax
push dword [0x31649354]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebx
je 0x3163e42b
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x268]
push eax
push 1
push ebx
push ebx
push dword [ebp - 4]
call esi
test eax, eax
jne 0x3163e42b
push 0x14
push str.Apartment
push 1
push ebx
push str.ThreadingModel
push dword [ebp - 4]
call esi
test eax, eax
jne 0x3163e42b
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 8]
call esi
mov esi, dword [ebp + 0x10]
cmp dword [esi], 0xf0e42d60
jne 0x3163e45b
push 4
pop ecx
mov edi, 0x31646060
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x3163e45b
lea eax, [ebp - 8]
push eax
mov esi, 0x2001f
push esi
push ebx
push 0x31646148
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x10], 0x400
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x3163e447
push 0x28
lea eax, [ebp - 0x60]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea eax, [ebp - 0x60]
push eax
push 0x316461c0
lea eax, [ebp - 0x268]
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push esi
push ebx
push ebx
push ebx
lea eax, [ebp - 0x268]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x3163e42b
mov esi, str.F0E42D50_368C_11D0_AD81_00A0C90DC8D9
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 1
push ebx
push 0x316461c8
push dword [ebp - 4]
call esi
test eax, eax
jne 0x3163e42b
push 4
lea eax, [ebp - 0x10]
push eax
push 4
push ebx
push 0x316461e8
push dword [ebp - 4]
call esi
test eax, eax
je 0x3163e44b
cmp dword [ebp - 8], ebx
je 0x3163e439
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], ebx
je 0x3163e447
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x3163e45e
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 8]
call esi
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret