Function at 0x511820
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x5119d3
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0xc], 0xffffffff
xor ebx, ebx
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [esi + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov edi, eax
test edi, edi
jne 0x51197c
cmp dword [ebp - 0x14], 4
jne 0x5118f5
mov dword [ebp - 0x1c], 0xffffffff
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [esi + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov edi, eax
test edi, edi
jne 0x5118d6
mov eax, dword [ebp - 0x1c]
cdq
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov bl, 1
jmp 0x511996
lea edx, [ebp - 0x2c]
mov eax, edi
call sub.rtl120.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 4]
mov edx, 0x5119f4
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x511996
cmp dword [ebp - 0x14], 0xb
jne 0x51195b
mov dword [ebp - 0x28], 0xffffffff
mov dword [ebp - 0x24], 0xffffffff
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [esi + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov edi, eax
test edi, edi
jne 0x51193f
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
mov bl, 1
jmp 0x511996
lea edx, [ebp - 0x30]
mov eax, edi
call sub.rtl120.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 4]
mov edx, 0x511a24
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x511996
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x34]
call sub.rtl120.bpl__Sysutils_IntToStr_qqrj
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 4]
mov edx, 0x511a54
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x511996
lea edx, [ebp - 0x38]
mov eax, edi
call sub.rtl120.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 4]
mov edx, 0x511a7c
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
test bl, bl
jne 0x5119b0
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x3c]
call fcn.00510df4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5119da
lea eax, [ebp - 0x3c]
mov edx, 5
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret