joyce8/EMBER2024-capa huggingface dataset:
Function at 0x50026af4
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x50026bca
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], 0xffffffff
lea eax, [ebp - 4]
mov edx, ebx
call sym.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 4]
call sym.rtl120.bpl__System_UniqueString_qqrr20System_UnicodeString
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.version.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
je 0x50026bb4
mov eax, ebx
call sym.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x50026bad
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x50026b97
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x50026bdc
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x50026b97
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50026bb4
mov eax, dword [ebp - 0x10]
call sym.rtl120.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50026bd1
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret

Function at 0x50029244
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffdf8
mov ebx, eax
mov eax, ebx
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ebp, eax
push 0
push 0
push ebp
push ebx
push 0
push 0xfde9
call sub.kernel32.dll_MultiByteToWideChar_1
mov edi, eax
cmp edi, 0x104
jbe 0x500291ee
mov eax, edi
add eax, eax
call sym.rtl120.bpl__System__GetMem_qqri
mov esi, eax
jmp 0x500291f0
mov esi, esp
push edi
push esi
push ebp
push ebx
push 0
push 0xfde9
call sub.kernel32.dll_MultiByteToWideChar_1
push edi
push esi
call sub.user32.dll_CharUpperBuffW
xor ebx, ebx
mov eax, edi
dec eax
test eax, eax
jl 0x50029229
inc eax
xor edx, edx
mov ecx, ebx
shl ecx, 5
shr ebx, 0x1b
or ecx, ebx
mov ebx, ecx
movzx ecx, word [esi + edx*2]
xor ebx, ecx
inc edx
dec eax
jne 0x50029213
mov eax, esp
cmp esi, eax
je 0x50029236
mov eax, esi
call sym.rtl120.bpl__System__FreeMem_qqrpv
mov eax, ebx
add esp, 0x208
pop ebp
pop edi
pop esi
pop ebx
ret
push esi
push ebx
mov esi, eax
xor eax, eax
push esi
rol eax, 5
mov bl, byte [esi]
test bl, 0x80
jne 0x50029270
cmp bl, 0
je 0x5002926c
cmp bl, 0x41
jl 0x50029267
cmp bl, 0x5a
jg 0x50029267
or bl, 0x20
xor al, bl
inc esi
jmp 0x5002924b
pop ecx
pop ebx
pop esi
ret
pop eax
pop ebx
pop esi
jmp 0x500291b0
Function at 0x50029394
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
mov ebx, eax
xor eax, eax
mov dword [ebp - 4], eax
push 0xa
push 0x50029404
push ebx
call sub.kernel32.dll_FindResourceW
test eax, eax
je 0x500293fb
push eax
push ebx
call sub.kernel32.dll_LoadResource
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x500293fb
xor eax, eax
push ebp
push 0x500293f4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_LockResource
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x500293fb
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_FreeResource
ret
mov eax, dword [ebp - 4]
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x50029ce8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x50029e36
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov byte [ebp - 9], 1
mov dl, 1
mov eax, ebx
call sym.rtl120.bpl__System_LoadResourceModule_qqrpbo
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x50029d89
push ebx
call sub.kernel32.dll_GetModuleHandleW_1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x50029d44
push 2
push 0
push ebx
call sub.kernel32.dll_LoadLibraryExW_1
mov dword [ebp - 4], eax
jmp 0x50029d48
mov byte [ebp - 9], 0
cmp dword [ebp - 4], 0
jne 0x50029d89
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x18], 0xa
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x20]
call sym.rtl120.bpl__Sysutils_SysErrorMessage_qqrui
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0x11
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [sym.rtl120.bpl__Sysconst__sErrorLoadingPackage]
mov dl, 1
mov eax, dword [sym.rtl120.bpl__Sysutils_EPackageError_]
call sym.rtl120.bpl__Sysutils_Exception__bctr_qqrp20System_TResStringRecpx14System_TVarRecxi
call sym.rtl120.bpl__System__RaiseExcept_qqrv
xor edx, edx
push ebp
push 0x50029e19
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xa
push 0x50029e44
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FindResourceW
test eax, eax
je 0x50029dfc
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_LoadResource
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x50029dfc
xor eax, eax
push ebp
push 0x50029df5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_LockResource
mov edx, eax
mov eax, esi
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50029dfc
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_FreeResource
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50029e20
cmp byte [ebp - 9], 0
je 0x50029e18
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FreeLibrary_2
ret
Function at 0x5002ac08
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff800
mov esi, edx
mov edi, eax
mov eax, esi
xor edx, edx
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
push 0x400
lea eax, [esp + 4]
push eax
mov eax, edi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ebp, eax
push ebp
call sub.kernel32.dll_GetEnvironmentVariableW
mov ebx, eax
cmp ebx, 0x400
jge 0x5002ac4f
mov edx, esp
mov eax, esi
mov ecx, ebx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
jmp 0x5002ac68
mov edx, ebx
dec edx
mov eax, esi
call sym.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
push ebx
mov eax, dword [esi]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push ebp
call sub.kernel32.dll_GetEnvironmentVariableW
add esp, 0x800
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x500561b4
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xe]
mov byte [ebp - 5], al
xor eax, eax
push ebp
push 0x50056202
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0xe], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.kernel32.dll_SuspendThread
test eax, eax
setge dl
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__Classes_TThread_CheckThreadError_qqro
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5005621b
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x50056224
Capabilities:
Resume thread

Disassembly:
push ebx
push esi
mov ebx, eax
mov eax, dword [ebx + 4]
push eax
call sub.kernel32.dll_ResumeThread
mov esi, eax
test esi, esi
setge dl
mov eax, ebx
call sym.rtl120.bpl__Classes_TThread_CheckThreadError_qqro
dec esi
jne 0x50056246
mov byte [ebx + 0xe], 0
pop esi
pop ebx
ret

Function at 0x50057e18
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, 0x500a8ea0
cmp dword [edi], 0
jne 0x50057e94
push 0x40
push 0x1000
push 0x1000
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
mov eax, dword [0x500a8e9c]
mov dword [esi], eax
lea edx, [esi + 4]
mov eax, 0x5009d958
mov ecx, 2
call sym.rtl120.bpl__System_Move_qqrpxvpvi
mov edx, 0x50057df0
lea eax, [esi + 5]
call fcn.50057e10
mov dword [esi + 6], eax
lea ebx, [esi + 0xa]
mov byte [ebx], 0xe8
lea edx, [esi + 4]
mov eax, ebx
call fcn.50057e10
mov dword [ebx + 1], eax
mov eax, dword [edi]
mov dword [ebx + 5], eax
mov dword [edi], ebx
add ebx, 0xd
mov eax, ebx
sub eax, esi
cmp eax, 0xffc
jl 0x50057e69
mov dword [0x500a8e9c], esi
mov eax, dword [edi]
mov ebx, dword [edi]
mov edx, dword [ebx + 5]
mov dword [edi], edx
mov edx, dword [ebp + 8]
mov dword [ebx + 5], edx
mov edx, dword [ebp + 0xc]
mov dword [ebx + 9], edx
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x5005ec44
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x5005ed20
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x2001f
push 0
push 0x5005ed30
push 0
mov eax, ebx
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp + 8]
push eax
call sub.advapi32.dll_RegCreateKeyExW
mov ebx, eax
test ebx, ebx
jne 0x5005ecef
mov eax, dword [ebp - 4]
test eax, eax
je 0x5005ecb5
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5005ecb5
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__InternalUStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
mov ebx, eax
test ebx, ebx
je 0x5005ecc0
sub ebx, 4
mov ebx, dword [ebx]
inc ebx
mov eax, ebx
add eax, eax
push eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 1
push 0
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExW
mov ebx, eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
test ebx, ebx
je 0x5005ed0a
mov ecx, dword [sym.rtl120.bpl__Comconst__SCreateRegKeyError]
mov dl, 1
mov eax, dword [sym.rtl120.bpl__Comobj_EOleRegistrationError_]
call sym.rtl120.bpl__Sysutils_Exception__bctr_qqrp20System_TResStringRec
call sym.rtl120.bpl__System__RaiseExcept_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5005ed27
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x5005ed4c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edx
mov esi, eax
mov ebx, dword [ebp + 8]
mov eax, ebx
xor edx, edx
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 0xc]
push eax
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push edi
call sub.advapi32.dll_RegOpenKeyW
test eax, eax
jne 0x5005edf7
xor eax, eax
push ebp
push 0x5005edf0
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
mov eax, ebx
mov edx, dword [ebp - 8]
call sym.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebx]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0
push 0
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x5005edd0
mov edx, dword [ebp - 8]
dec edx
mov eax, ebx
call sym.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
jmp 0x5005edd9
mov eax, ebx
xor edx, edx
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5005edf7
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x50068f04
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x50068f84
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [ebp - 4]
test eax, eax
je 0x50068f41
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x50068f41
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__InternalUStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
test eax, eax
je 0x50068f4a
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x50068f6e
mov edx, 1
mov ecx, ebx
add ecx, ecx
add ecx, ecx
shr ebx, 0x1e
or ecx, ebx
mov ebx, dword [ebp - 4]
movzx ebx, word [ebx + edx*2 - 2]
xor ecx, ebx
mov ebx, ecx
inc edx
dec eax
jne 0x50068f53
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50068f8b
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret

Function at 0x50069df8
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebx + 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x800
lea eax, [ebp - 0x1000]
push eax
mov eax, dword [ebp + 0xc]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, edi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetPrivateProfileStringW
mov ecx, eax
lea edx, [ebp - 0x1000]
mov eax, dword [ebp + 8]
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x50069ec4
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x50069fb9
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x4000
call sym.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x50069f9c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__Classes_TStrings_BeginUpdate_qqrv
xor eax, eax
push ebp
push 0x50069f7f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebx + 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x4000
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
call sub.kernel32.dll_GetPrivateProfileStringW
test eax, eax
je 0x50069f69
mov ebx, dword [ebp - 8]
jmp 0x50069f63
lea eax, [ebp - 0xc]
mov edx, ebx
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, ebx
call sym.rtl120.bpl__Sysutils_StrLen_qqrpxb
inc eax
add eax, eax
add ebx, eax
cmp word [ebx], 0
jne 0x50069f42
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50069f86
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__Classes_TStrings_EndUpdate_qqrv
ret

Function at 0x5006a088
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 0x400
mov eax, dword [ebp - 0x1c]
add eax, eax
call sym.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x5006a114
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
mov eax, dword [ebp - 0x18]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetPrivateProfileStringW
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
sub eax, 2
cmp eax, dword [ebp - 8]
jle 0x5006a0fb
push ebp
call fcn.50069fc8
pop ecx
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x5006a12a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5006a11b
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__System__FreeMem_qqrpv
ret
mov esp, ebp
pop ebp
ret
Function at 0x5006b7d8
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x5006b942
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
mov edx, ebx
call sym.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 4]
call fcn.5006b0a0
mov byte [ebp - 0x11], al
cmp byte [ebp - 0x11], 0
jne 0x5006b82a
lea eax, [ebp - 4]
mov ecx, 1
mov edx, 1
call sym.rtl120.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
mov edx, ebx
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_GetKey_qqrx20System_UnicodeString
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x5006b8ff
xor eax, eax
push ebp
push 0x5006b8f8
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_SetCurrentKey_qqrp6HKEY__
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_GetKeyInfo_qqrr20Registry_TRegKeyInfo
test al, al
je 0x5006b8d6
mov ecx, dword [ebp - 0x34]
inc ecx
lea eax, [ebp - 8]
xor edx, edx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
mov ebx, dword [ebp - 0x38]
dec ebx
cmp ebx, 0
jl 0x5006b8d6
mov eax, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x10], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegEnumKeyExW
test eax, eax
jne 0x5006b8d0
mov eax, dword [ebp - 8]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edx, eax
lea eax, [ebp - 0x3c]
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_DeleteKey_qqrx20System_UnicodeString
dec ebx
cmp ebx, 0xffffffff
jne 0x5006b889
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5006b8ff
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_SetCurrentKey_qqrp6HKEY__
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
movzx edx, byte [ebp - 0x11]
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__Registry_TRegistry_GetBaseKey_qqro
push eax
call sub.advapi32.dll_RegDeleteKeyW
test eax, eax
sete bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5006b949
lea eax, [ebp - 0x3c]
call sym.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 8]
mov edx, 2
call sym.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret
Function at 0x5006b9d8
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov edi, eax
xor eax, eax
push ebp
push 0x5006ba90
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x44]
lea edx, [ebp - 0x28]
mov eax, edi
call sym.rtl120.bpl__Registry_TRegistry_GetKeyInfo_qqrr20Registry_TRegKeyInfo
test al, al
je 0x5006ba72
mov ecx, dword [ebp - 0x24]
inc ecx
lea eax, [ebp - 4]
xor edx, edx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
mov ebx, dword [ebp - 0x28]
dec ebx
test ebx, ebx
jl 0x5006ba72
inc ebx
xor esi, esi
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0xc], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
mov eax, dword [edi + 4]
push eax
call sub.advapi32.dll_RegEnumKeyExW
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edx, eax
lea eax, [ebp - 0x2c]
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc esi
dec ebx
jne 0x5006ba2b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5006ba97
lea eax, [ebp - 0x2c]
call sym.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x5006baa0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov edi, eax
xor eax, eax
push ebp
push 0x5006bb58
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x44]
lea edx, [ebp - 0x28]
mov eax, edi
call sym.rtl120.bpl__Registry_TRegistry_GetKeyInfo_qqrr20Registry_TRegKeyInfo
test al, al
je 0x5006bb3a
mov ecx, dword [ebp - 0x1c]
inc ecx
lea eax, [ebp - 4]
xor edx, edx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
mov ebx, dword [ebp - 0x20]
dec ebx
test ebx, ebx
jl 0x5006bb3a
inc ebx
xor esi, esi
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0xc], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
mov eax, dword [edi + 4]
push eax
call sub.advapi32.dll_RegEnumValueW
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edx, eax
lea eax, [ebp - 0x2c]
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc esi
dec ebx
jne 0x5006baf3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5006bb5f
lea eax, [ebp - 0x2c]
call sym.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret

Function at 0x5006c184
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
movzx eax, byte [ebp + 8]
call fcn.5006b114
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push esi
push 0
mov eax, edi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebx + 4]
push eax
call sub.advapi32.dll_RegSetValueExW
test eax, eax
je 0x5006c1e3
mov dword [ebp - 0xc], edi
mov byte [ebp - 8], 0x11
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [sym.rtl120.bpl__Rtlconsts__SRegSetDataFailed]
mov dl, 1
mov eax, dword [sym.rtl120.bpl__Registry_ERegistryException_]
call sym.rtl120.bpl__Sysutils_Exception__bctr_qqrp20System_TResStringRecpx14System_TVarRecxi
call sym.rtl120.bpl__System__RaiseExcept_qqrv
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8