Function at 0x413886
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fdf0
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x45b070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x5c], edx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x54], eax
call fcn.004137ff
test al, al
jne 0x413d01
cmp dword [0x45d18c], 0
jne 0x413d01
mov dl, 1
call fcn.00413fcb
test al, al
jne 0x413d01
xor eax, eax
push ecx
mov esi, eax
mov dword [ebp - 0x60], eax
push 0x45d488
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x6c], eax
call fcn.0040dba0
mov edi, dword [ebp - 0x54]
xor edx, edx
mov eax, edx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x64], eax
cmp eax, 4
jge 0x4139e8
push ecx
push dword [ebx + 0x18]
mov byte [ebp - 0x4d], dl
push edx
mov edx, dword [ebx + 0x10]
push ecx
lea ecx, [ebp - 0x7c]
call fcn.00412d9d
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x74], ecx
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x70], ecx
lea ecx, [ebp - 0x74]
push eax
call fcn.004148f8
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x413955
xor edi, edi
mov dword [ebp - 0x78], edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x54]
test edi, edi
jne 0x4139d4
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x60]
push ecx
xor edx, edx
lea ecx, [ebp - 0x6c]
push edx
push ecx
push edx
push dword [ebx]
push dword [eax + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov dword [ebp - 0x54], edi
test edi, edi
jne 0x4139ba
cmp dword [ebp - 0x60], eax
je 0x4139ba
push dword [ebp - 0x60]
lea ecx, [ebp - 0x68]
call fcn.00414518
mov esi, dword [ebp - 0x68]
test al, al
jne 0x41399b
push 8
pop edi
jmp 0x4139b7
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x60]
push ecx
push esi
lea ecx, [ebp - 0x6c]
xor edi, edi
push ecx
push edi
push dword [ebx]
push dword [eax + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov dword [ebp - 0x54], edi
mov ecx, edi
call fcn.00412c07
test eax, eax
je 0x4139d4
mov ecx, dword [ebx + 0x10]
call fcn.00412c23
mov edi, dword [ebp - 0x54]
mov byte [ebp - 0x4d], 1
mov eax, dword [ebp - 0x64]
inc eax
cmp byte [ebp - 0x4d], 0
push 0
mov dword [ebp - 0x64], eax
pop edx
jne 0x413912
test edi, edi
jne 0x413b09
test esi, esi
je 0x413b09
movzx eax, word [ebx + 0x14]
and eax, 0xf
cmp dword [ebp - 0x6c], eax
jne 0x413a56
dec eax
cmp eax, 1
ja 0x413ae8
mov eax, dword [ebp - 0x60]
shr eax, 1
cmp word [esi + eax*2 - 2], dx
jne 0x413a56
mov ecx, dword [ebp - 0x5c]
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x413a47
test dx, dx
je 0x413a41
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x413a47
add eax, 4
add ecx, 4
test dx, dx
jne 0x413a1f
xor edx, edx
mov eax, edx
jmp 0x413a4e
sbb eax, eax
or eax, 1
xor edx, edx
test eax, eax
je 0x413cd7
mov esi, dword [ebp - 0x5c]
mov eax, edx
mov dword [ebp - 0x64], eax
cmp eax, 4
jge 0x413cd4
push ecx
push dword [ebx + 0x18]
mov byte [ebp - 0x4d], dl
mov edx, dword [ebx + 0x10]
push 4
push ecx
lea ecx, [ebp - 0x74]
call fcn.00412d9d
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x7c], ecx
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x78], ecx
lea ecx, [ebp - 0x7c]
push eax
call fcn.004148f8
mov ecx, dword [ebp - 0x70]
xor edi, edi
test ecx, ecx
je 0x413aa2
mov dword [ebp - 0x70], edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x54]
test eax, eax
jne 0x413c08
movzx ecx, word [ebx + 0x14]
mov eax, dword [ebp - 0x58]
and ecx, 0xf
push 4
push esi
push ecx
push edi
push dword [ebx]
push dword [eax + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov ecx, edi
mov dword [ebp - 0x54], edi
call fcn.00412c07
test eax, eax
je 0x413b4d
mov ecx, dword [ebx + 0x10]
call fcn.00412c23
mov byte [ebp - 0x4d], 1
jmp 0x413cbd
cmp dword [ebp - 0x60], 4
jne 0x413a56
mov ecx, dword [ebp - 0x5c]
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x413a56
mov edi, edx
mov dword [ebp - 0x54], edi
jmp 0x413cd7
mov ecx, dword [ebx + 8]
cmp ecx, 0xcccccccc
je 0x413a56
movzx eax, word [ebx + 0x14]
and eax, 0xf
jbe 0x413b42
cmp eax, 2
jbe 0x413b3d
cmp eax, 4
je 0x413b36
cmp eax, 0xb
je 0x413d1f
jmp 0x413b42
mov eax, dword [ebp - 0x5c]
cmp dword [eax], ecx
jmp 0x413af9
cmp ecx, dword [ebp - 0x5c]
jmp 0x413af9
push edx
push 0x599491
jmp 0x413d25
test edi, edi
je 0x413cc0
mov edx, dword [ebx + 0x10]
lea ecx, [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x8c], 0x4356dc
mov word [ebp - 0x80], ax
mov eax, dword [ebx]
mov dword [ebp - 0x94], eax
xor eax, eax
mov byte [ebp - 0x5c], al
push dword [ebp - 0x5c]
mov dword [ebp - 0x88], str.Win32ErrorCode
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x9c], vtable.Mso::Logging::StructuredObject_wchar_t_const___1_.0
mov dword [ebp - 0x98], str.RegistryValueName
mov word [ebp - 0x90], ax
call fcn.004123e0
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x34], 0x4356c8
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x30], str.KeyPath
call fcn.0040d50a
xor eax, eax
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x34]
push eax
push str.Failed_to_write_registry_value.
push ecx
push ecx
mov ecx, 0x16928cc
call fcn.00414ade
lea ecx, [ebp - 0x2c]
call fcn.0040a89b
lea ecx, [ebp - 0x4c]
call fcn.0040a89b
mov edx, str.OrapiWriteFail:_RegSetValueExW
jmp 0x413cb5
mov dword [ebp - 0xa4], eax
lea ecx, [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0xac], 0x4356dc
mov word [ebp - 0xa0], ax
mov eax, dword [ebx]
mov dword [ebp - 0xb4], eax
xor eax, eax
mov word [ebp - 0xb0], ax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0xa8], str.Win32ErrorCode
mov dword [ebp - 0xbc], vtable.Mso::Logging::StructuredObject_wchar_t_const___1_.0
mov dword [ebp - 0xb8], str.RegistryValueName
push dword [eax]
call fcn.0040a850
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x34], 0x4356c8
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x30], str.KeyName
call fcn.0040d50a
xor eax, eax
mov word [ebp - 0x14], ax
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0x34]
push eax
push str.Failed_to_open_registry_key.
push ecx
push ecx
mov ecx, 0x16928cd
call fcn.00414ade
lea ecx, [ebp - 0x2c]
call fcn.0040a89b
lea ecx, [ebp - 0x4c]
call fcn.0040a89b
mov edx, str.OrapiWriteFail:_TryOpenKey_in_WriteValue
mov ecx, dword [ebp - 0x54]
call fcn.0041385e
mov edi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x64]
inc eax
cmp byte [ebp - 0x4d], 0
push 0
mov dword [ebp - 0x64], eax
pop edx
jne 0x413a5e
mov esi, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x413ce6
mov dword [ebp - 0x58], edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0xc8]
call fcn.0040db7b
test esi, esi
je 0x413cfd
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov eax, edi
jmp 0x413d03
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042d667
leave
ret 4
push edx
push 0x59948f
call fcn.004117c5
int3