Function at 0x4037dc
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x4d
push 0
push 0
dec ecx
jne 0x4037e4
push ecx
push ebx
push esi
push edi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x403bc0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x44]
lea eax, [ebp - 8]
call sub.RtlVcl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
push eax
push 0x403bd0
push 1
push 0
mov eax, dword [sym.imp.RtlVcl160.bpl__Winapi_Activex_CLSID_StdComponentCategoryMgr]
push eax
call sub.ole32.dll_CoCreateInstance
mov ebx, eax
mov eax, ebx
call sub.RtlVcl160.bpl__Winapi_Activex_Succeeded_qqrl
test al, al
je 0x403961
lea eax, [ebp - 4]
call sub.RtlVcl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
push eax
push 0
push 0
mov eax, dword [sym.imp.PublicPkg160.bpl__Datasnap_Midconst_CATID_MIDASAppServer]
push eax
push 1
mov eax, dword [ebp - 8]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
call sub.RtlVcl160.bpl__System_Win_Comobj_OleCheck_qqrl
jmp 0x403941
cmp dword [ebp - 0x14], 0
je 0x4038bf
push 0x403bec
lea edx, [ebp - 0x238]
lea eax, [ebp - 0x34]
call sub.RtlVcl160.bpl__System_Win_Comobj_GUIDToString_qqrrx5_GUID
push dword [ebp - 0x238]
push 0x403c08
lea eax, [ebp - 0xc]
mov edx, 3
call sub.RtlVcl160.bpl__System__UStrCatN_qqrv
lea eax, [ebp - 0x23c]
push eax
mov ecx, 0x80000000
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call sub.RtlVcl160.bpl__System_Win_Comobj_GetRegStringValue_qqrx20System_UnicodeStringt1p6HKEY__
mov eax, dword [ebp - 0x23c]
mov edx, 0x403c18
call sub.RtlVcl160.bpl__System__UStrEqual_qqrv
jne 0x403941
xor eax, eax
push ebp
push 0x4038e2
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0xc]
lea eax, [ebp - 0x34]
call sub.RtlVcl160.bpl__System_Win_Comobj_ClassIDToProgID_qqrrx5_GUID
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x403936
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x34]
push eax
push 1
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
test eax, eax
je 0x403861
jmp 0x403b6a
lea eax, [ebp - 0x24]
push eax
push 0x20019
push 0
push 0x403c1c
push 0x80000000
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x403b6a
xor eax, eax
push ebp
push 0x403b63
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x403b2b
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0xa
lea edx, [ebp - 0x260]
mov eax, dword [sym.imp.PublicPkg160.bpl__Datasnap_Midconst_CATID_MIDASAppServer]
call sub.RtlVcl160.bpl__System_Win_Comobj_GUIDToString_qqrrx5_GUID
mov eax, dword [ebp - 0x260]
mov dword [ebp - 0x254], eax
mov byte [ebp - 0x250], 0x11
lea edx, [ebp - 0x25c]
mov ecx, 1
mov eax, 0x403c34
call sub.RtlVcl160.bpl__System_Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
lea eax, [ebp - 0x20]
push eax
push 0
mov eax, dword [ebp - 0xc]
call sub.RtlVcl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_RegQueryValueW
test eax, eax
jne 0x403a8c
cmp dword [ebp - 0x14], 0
je 0x403a8c
mov dword [ebp - 0x20], pe_nt_image_headers32
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x20]
call sub.RtlVcl160.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
call sub.RtlVcl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0
push 0
mov eax, dword [ebp - 0x14]
call sub.RtlVcl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x403a57
mov edx, dword [ebp - 0x20]
dec edx
lea eax, [ebp - 0xc]
call sub.RtlVcl160.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
jmp 0x403a5f
lea eax, [ebp - 0xc]
call sub.RtlVcl160.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x264]
push eax
mov ecx, 0x80000000
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call sub.RtlVcl160.bpl__System_Win_Comobj_GetRegStringValue_qqrx20System_UnicodeStringt1p6HKEY__
mov eax, dword [ebp - 0x264]
mov edx, 0x403c18
call sub.RtlVcl160.bpl__System__UStrEqual_qqrv
jne 0x403b2b
xor eax, eax
push ebp
push 0x403ad9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x268]
lea edx, [ebp - 0x234]
mov ecx, pe_nt_image_headers32
call sub.RtlVcl160.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov eax, dword [ebp - 0x268]
lea edx, [ebp - 0x25c]
call sub.RtlVcl160.bpl__System_Win_Comobj_StringToGUID_qqrx20System_UnicodeString
lea eax, [ebp - 0x25c]
lea edx, [ebp - 0xc]
call sub.RtlVcl160.bpl__System_Win_Comobj_ClassIDToProgID_qqrrx5_GUID
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x403b1d
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc dword [ebp - 0x1c]
push 0x200
lea eax, [ebp - 0x234]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_RegEnumKeyW
test eax, eax
je 0x40399b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403b6a
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_RegCloseKey
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403bc7
lea eax, [ebp - 0x26c]
mov edx, 4
call sub.RtlVcl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x24c]
mov edx, 2
call sub.RtlVcl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x23c]
mov edx, 2
call sub.RtlVcl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0xc]
call sub.RtlVcl160.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 8]
call sub.RtlVcl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
lea eax, [ebp - 4]
call sub.RtlVcl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret