Function at 0x51bfd0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59b845
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 0x51c036
mov eax, dword [esi]
cmp ecx, 3
jne 0x51c142
push ecx
push 0x5bdd64
push eax
call fcn.0042f9f0
add esp, 0xc
test eax, eax
jne 0x51c13f
mov eax, dword [edi + 0x10]
lea ebx, [eax*2 + 2]
push ebx
call fcn.00554273
add esp, 4
mov esi, eax
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x1c], esi
jb 0x51c076
mov edi, dword [edi]
test ebx, ebx
je 0x51c091
test esi, esi
je 0x51c10f
push ebx
test edi, edi
je 0x51c104
push edi
push esi
call fcn.00555ce0
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 0x51c0ae
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 0x51c4ae
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x14], 8
jb 0x51c0df
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.00500ef0
add esp, 0x1c
jmp 0x51c523
push 0
push esi
call fcn.00556260
add esp, 0xc
call fcn.0055ed05
mov dword [eax], 0x16
call fcn.0055ec07
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.00500ef0
add esp, 0x14
jmp 0x51c538
mov ecx, dword [esi + 0x10]
mov eax, esi
cmp ebx, 8
jb 0x51c14b
mov eax, dword [esi]
cmp ecx, 3
jne 0x51c167
push ecx
push 0x5a81b4
push eax
call fcn.0042f9f0
add esp, 0xc
test eax, eax
je 0x51c3e1
push str.DWORD
push esi
call fcn.004379e0
add esp, 8
test al, al
jne 0x51c3e1
push str.QWORD
push esi
call fcn.004379e0
add esp, 8
test al, al
je 0x51c270
mov byte [ebp - 4], 3
call fcn.0055ed05
cmp dword [edi + 0x14], 8
mov esi, eax
jb 0x51c1a6
mov edi, dword [edi]
push 0xa
lea eax, [ebp - 0x24]
mov dword [esi], 0
push eax
push edi
call fcn.005668b1
add esp, 0xc
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], edx
cmp edi, dword [ebp - 0x24]
je 0x51c589
cmp dword [esi], 0x22
je 0x51c593
jmp 0x51c20a
mov edi, 0xb
mov dword [ebp - 4], 0
lea ebx, [edi - 3]
push ebx
call fcn.00554273
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x51c260
call fcn.0055ed05
mov dword [eax], 0x16
call fcn.0055ec07
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.00500ef0
add esp, 0x14
xor al, al
jmp 0x51c56d
mov eax, dword [ebp - 0x34]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 4], eax
jmp 0x51c096
push 0x5a9e94
push esi
call fcn.004379e0
add esp, 8
test al, al
je 0x51c3b4
mov ebx, dword [edi + 0x10]
inc ebx
shr ebx, 1
push ebx
call fcn.00554273
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 0x51c2aa
mov ecx, dword [edi]
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x51c388
xor eax, eax
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x51c37e
nop
movzx eax, word [ecx]
mov edx, eax
mov dword [ebp - 0x20], edx
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x51c2d6
sub dl, 0x30
jmp 0x51c2f4
lea eax, [edx - 0x61]
cmp ax, 5
ja 0x51c2e4
sub dl, 0x57
jmp 0x51c2f4
lea eax, [edx - 0x41]
cmp ax, 5
ja 0x51c377
sub dl, 0x37
cmp dl, 0xff
je 0x51c377
movzx eax, word [ecx + 2]
movzx ecx, ax
mov dword [ebp - 0x20], eax
lea eax, [ecx - 0x30]
cmp ax, 9
ja 0x51c311
sub cl, 0x30
jmp 0x51c32b
lea eax, [ecx - 0x61]
cmp ax, 5
ja 0x51c31f
sub cl, 0x57
jmp 0x51c32b
lea eax, [ecx - 0x41]
cmp ax, 5
ja 0x51c35d
sub cl, 0x37
cmp cl, 0xff
je 0x51c35d
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 0x51c2c0
mov edi, 3
jmp 0x51c096
cmp word [ebp - 0x20], 0
jne 0x51c388
mov eax, dword [ebp - 0x28]
mov edi, 3
shl dl, 4
mov byte [eax + esi], dl
jmp 0x51c096
cmp word [ebp - 0x20], 0
jne 0x51c388
mov edi, 3
jmp 0x51c096
cmp dword [edi + 0x14], 8
jb 0x51c390
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.00500ef0
add esp, 0x18
jmp 0x51c538
cmp ebx, 8
jb 0x51c3bb
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.00500ef0
add esp, 0x18
xor al, al
jmp 0x51c56d
mov byte [ebp - 4], 1
call fcn.0055ed05
cmp dword [edi + 0x14], 8
mov esi, eax
jb 0x51c3f4
mov edi, dword [edi]
push 0xa
lea eax, [ebp - 0x20]
mov dword [esi], 0
push eax
push edi
call fcn.0056686b
add esp, 0xc
mov dword [ebp - 0x34], eax
cmp edi, dword [ebp - 0x20]
je 0x51c59d
cmp dword [esi], 0x22
je 0x51c5a7
jmp 0x51c452
mov edi, 4
mov dword [ebp - 4], 0
push edi
mov ebx, edi
call fcn.00554273
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x51c4a4
call fcn.0055ed05
mov dword [eax], 0x16
call fcn.0055ec07
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.00500ef0
add esp, 0x14
xor al, al
jmp 0x51c56d
mov eax, dword [ebp - 0x34]
mov dword [esi], eax
jmp 0x51c096
mov ecx, dword [ebp - 0x30]
mov eax, ecx
cmp dword [ecx + 0x14], 8
jb 0x51c4bb
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 0x51c549
mov ebx, dword [ebp - 0x2c]
cmp dword [ebx + 0x14], 8
jb 0x51c4db
mov ebx, dword [ebx]
mov eax, dword [ebp - 0x30]
push 0x5bb418
push eax
call fcn.004379e0
add esp, 8
test al, al
je 0x51c4f7
mov eax, str._Default_
jmp 0x51c502
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x14], 8
jb 0x51c502
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.00500ef0
add esp, 0x20
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51c538
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x18], 0
test esi, esi
je 0x51c545
push esi
call fcn.004697f0
add esp, 4
xor al, al
jmp 0x51c56d
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51c55e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x18], 0
test esi, esi
je 0x51c56b
push esi
call fcn.004697f0
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.00553daa
mov esp, ebp
pop ebp
ret
push str.invalid_stoull_argument
call fcn.0053ed52
push str.stoull_argument_out_of_range
call fcn.0053ed92
push str.invalid_stoul_argument
call fcn.0053ed52
push str.stoul_argument_out_of_range
call fcn.0053ed92
int3