Function at 0x51bf50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59b7c5
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], 0
mov ebx, dword [esi + 0x14]
mov eax, esi
mov ecx, dword [esi + 0x10]
mov dword [ebp - 4], 0
cmp ebx, 8
jb 0x51bfb6
mov eax, dword [esi]
cmp ecx, 3
jne 0x51c0c2
push ecx
push 0x5bdd64
push eax
call fcn.0042f980
add esp, 0xc
test eax, eax
jne 0x51c0bf
mov eax, dword [edi + 0x10]
lea ebx, [eax*2 + 2]
push ebx
call fcn.005541f3
add esp, 4
mov esi, eax
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x1c], esi
jb 0x51bff6
mov edi, dword [edi]
test ebx, ebx
je 0x51c011
test esi, esi
je 0x51c08f
push ebx
test edi, edi
je 0x51c084
push edi
push esi
call fcn.00555c60
add esp, 0xc
mov edi, 1
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x2c]
mov ecx, eax
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 8
jb 0x51c02e
mov ecx, dword [eax]
push 0
lea eax, [ebp - 0x18]
push eax
movzx eax, byte [ebp + 0x18]
push 0
push dword [ebp + 0x1c]
push eax
push 0
push 0
push ecx
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x51c42e
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x14], 8
jb 0x51c05f
mov ecx, dword [ecx]
push ecx
push eax
push str.Error___d__creating_registry_key:__s
push 0xab
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x1c
jmp 0x51c4a3
push 0
push esi
call fcn.005561e0
add esp, 0xc
call fcn.0055ec85
mov dword [eax], 0x16
call fcn.0055eb87
push str.memcpy_s_failed_in_SetRegistryKey
push 0x66
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x14
jmp 0x51c4b8
mov ecx, dword [esi + 0x10]
mov eax, esi
cmp ebx, 8
jb 0x51c0cb
mov eax, dword [esi]
cmp ecx, 3
jne 0x51c0e7
push ecx
push 0x5a81b4
push eax
call fcn.0042f980
add esp, 0xc
test eax, eax
je 0x51c361
push str.DWORD
push esi
call fcn.00437980
add esp, 8
test al, al
jne 0x51c361
push str.QWORD
push esi
call fcn.00437980
add esp, 8
test al, al
je 0x51c1f0
mov byte [ebp - 4], 3
call fcn.0055ec85
cmp dword [edi + 0x14], 8
mov esi, eax
jb 0x51c126
mov edi, dword [edi]
push 0xa
lea eax, [ebp - 0x24]
mov dword [esi], 0
push eax
push edi
call fcn.00566831
add esp, 0xc
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], edx
cmp edi, dword [ebp - 0x24]
je 0x51c509
cmp dword [esi], 0x22
je 0x51c513
jmp 0x51c18a
mov edi, 0xb
mov dword [ebp - 4], 0
lea ebx, [edi - 3]
push ebx
call fcn.005541f3
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x51c1e0
call fcn.0055ec85
mov dword [eax], 0x16
call fcn.0055eb87
push str.memcpy_s_failed_in_SetRegistryKey
push 0x90
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x14
xor al, al
jmp 0x51c4ed
mov eax, dword [ebp - 0x34]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 4], eax
jmp 0x51c016
push 0x5a9e94
push esi
call fcn.00437980
add esp, 8
test al, al
je 0x51c334
mov ebx, dword [edi + 0x10]
inc ebx
shr ebx, 1
push ebx
call fcn.005541f3
add esp, 4
mov dword [ebp - 0x24], edi
cmp dword [edi + 0x14], 8
mov esi, eax
mov dword [ebp - 0x1c], esi
mov ecx, edi
jb 0x51c22a
mov ecx, dword [edi]
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x51c308
xor eax, eax
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x51c2fe
nop
movzx eax, word [ecx]
mov edx, eax
mov dword [ebp - 0x20], edx
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x51c256
sub dl, 0x30
jmp 0x51c274
lea eax, [edx - 0x61]
cmp ax, 5
ja 0x51c264
sub dl, 0x57
jmp 0x51c274
lea eax, [edx - 0x41]
cmp ax, 5
ja 0x51c2f7
sub dl, 0x37
cmp dl, 0xff
je 0x51c2f7
movzx eax, word [ecx + 2]
movzx ecx, ax
mov dword [ebp - 0x20], eax
lea eax, [ecx - 0x30]
cmp ax, 9
ja 0x51c291
sub cl, 0x30
jmp 0x51c2ab
lea eax, [ecx - 0x61]
cmp ax, 5
ja 0x51c29f
sub cl, 0x57
jmp 0x51c2ab
lea eax, [ecx - 0x41]
cmp ax, 5
ja 0x51c2dd
sub cl, 0x37
cmp cl, 0xff
je 0x51c2dd
mov eax, dword [ebp - 0x28]
and cl, 0xf
shl dl, 4
or cl, dl
mov byte [eax + esi], cl
inc eax
mov ecx, dword [ebp - 0x24]
add ecx, 4
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
cmp eax, ebx
jb 0x51c240
mov edi, 3
jmp 0x51c016
cmp word [ebp - 0x20], 0
jne 0x51c308
mov eax, dword [ebp - 0x28]
mov edi, 3
shl dl, 4
mov byte [eax + esi], dl
jmp 0x51c016
cmp word [ebp - 0x20], 0
jne 0x51c308
mov edi, 3
jmp 0x51c016
cmp dword [edi + 0x14], 8
jb 0x51c310
mov edi, dword [edi]
push edi
push str.Unable_to_convert__s_to_hex
push 0x9a
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x18
jmp 0x51c4b8
cmp ebx, 8
jb 0x51c33b
mov esi, dword [esi]
push esi
push str.Unknown_registry_key_type:__s
push 0xa1
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x18
xor al, al
jmp 0x51c4ed
mov byte [ebp - 4], 1
call fcn.0055ec85
cmp dword [edi + 0x14], 8
mov esi, eax
jb 0x51c374
mov edi, dword [edi]
push 0xa
lea eax, [ebp - 0x20]
mov dword [esi], 0
push eax
push edi
call fcn.005667eb
add esp, 0xc
mov dword [ebp - 0x34], eax
cmp edi, dword [ebp - 0x20]
je 0x51c51d
cmp dword [esi], 0x22
je 0x51c527
jmp 0x51c3d2
mov edi, 4
mov dword [ebp - 4], 0
push edi
mov ebx, edi
call fcn.005541f3
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x51c424
call fcn.0055ec85
mov dword [eax], 0x16
call fcn.0055eb87
push str.memcpy_s_failed_in_SetRegistryKey
push 0x7b
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x14
xor al, al
jmp 0x51c4ed
mov eax, dword [ebp - 0x34]
mov dword [esi], eax
jmp 0x51c016
mov ecx, dword [ebp - 0x30]
mov eax, ecx
cmp dword [ecx + 0x14], 8
jb 0x51c43b
mov eax, dword [ecx]
push ebx
push esi
push edi
push 0
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x51c4c9
mov ebx, dword [ebp - 0x2c]
cmp dword [ebx + 0x14], 8
jb 0x51c45b
mov ebx, dword [ebx]
mov eax, dword [ebp - 0x30]
push 0x5bb418
push eax
call fcn.00437980
add esp, 8
test al, al
je 0x51c477
mov eax, str._Default_
jmp 0x51c482
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x14], 8
jb 0x51c482
mov eax, dword [eax]
push ebx
push eax
push edi
push str.Error___d__setting_value___s__under_registry_key:__s
push 0xb3
push str.XMLUpdater::v2::SetRegistryKey
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterRegistryCommand.cpp
push 1
call fcn.00500e60
add esp, 0x20
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51c4b8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x18], 0
test esi, esi
je 0x51c4c5
push esi
call fcn.00469760
add esp, 4
xor al, al
jmp 0x51c4ed
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51c4de
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x18], 0
test esi, esi
je 0x51c4eb
push esi
call fcn.00469760
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00553d2a
mov esp, ebp
pop ebp
ret
push str.invalid_stoull_argument
call fcn.0053ecd2
push str.stoull_argument_out_of_range
call fcn.0053ed12
push str.invalid_stoul_argument
call fcn.0053ecd2
push str.stoul_argument_out_of_range
call fcn.0053ed12
int3