joyce8/EMBER2024-capa huggingface dataset:
Function at 0x50017754
Capabilities:
Resolve function by parsing pe exports

Disassembly:
pop es
or dword [ebp + 0x45], eax
js 0x500177ce
jb 0x500177cb
popal
insb byte es:[edi], dx
cmp al, 0x77
add dword [eax + 0x68], edx
jb 0x50017767
push eax
add byte [eax], al
or byte [ebx + 0x79], dl
jae 0x500177c3
je 0x500177d9
insb byte es:[edi], dx
jae 0x50017773
add ah, cl
ja 0x50017778
push eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
aam 0x77
add dword [eax + 0x20], edx
add byte [eax], al
add ah, ah
jbe 0x500177a0
push eax
test al, 0x6c
add byte [eax - 0x50], dl
insb byte es:[edi], dx
add byte [eax + 0x10], dl
insb byte es:[edi], dx
add dl, byte [eax + 0x18]
outsd dx, dword [esi]
add byte [eax + 0x38], dl
outsd dx, dword [esi]
add byte [eax + 0x3c], dl
outsd dx, dword [esi]
add byte [eax + 0x40], dl
outsd dx, dword [esi]
add byte [eax + 0x34], dl
outsd dx, dword [esi]
add byte [eax - 0x7c], dl
imul eax, dword [eax], 0x50
push eax
mov al, byte [0x1450006b]
imul eax, dword [edx], 0x50
push eax
add dl, byte [eax + 0x58]

Function at 0x500177cc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x5850026b
imul eax, dword [edx], 0x50
adc al, byte [ebp + 0x45]
js 0x5001784d
jb 0x5001784a
popal
insb byte es:[edi], dx
inc ebp
js 0x50017844
jo 0x50017858
imul ebp, dword [edi + 0x6e], 0x177ec90
push eax
cmp al, 0x6f

Function at 0x500177ec
Capabilities:
Resolve function by parsing pe exports

Disassembly:
pop es
adc al, byte [ebp + 0x45]
js 0x50017866
jb 0x50017863
popal
insb byte es:[edi], dx
inc ebp
js 0x5001785d
jo 0x50017871
imul ebp, dword [edi + 0x6e], sym.rtl120.bpl__Sysutils_EExternalException_
push eax
ja 0x50017808
push eax
add byte [eax], al
or byte [ebx + 0x79], dl
jae 0x50017864
push eax
test byte [ebx], ch
push eax
add byte [eax - 0x60], dl
imul eax, dword [eax], 0x50
adc al, 0x6b
add dl, byte [eax - 0x48]
invalid
imul eax, dword [edx], 0x50
pop eax
Function at 0x50017870
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
je 0x5001787a
insb byte es:[edi], dx
jae 0x50017814
add byte [ebp + 0x78700040], cl
add dword [eax], edx
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax + 0x78], bh
add dword [eax + 0x20], edx
add byte [eax], al
add ah, ah
jbe 0x50017844
push eax
test al, 0x6c
add byte [eax - 0x50], dl
insb byte es:[edi], dx
add byte [eax + 0x10], dl
insb byte es:[edi], dx
add dl, byte [eax + 0x18]
outsd dx, dword [esi]
add byte [eax + 0x38], dl
outsd dx, dword [esi]
add byte [eax + 0x3c], dl
outsd dx, dword [esi]
add byte [eax + 0x40], dl
outsd dx, dword [esi]
add byte [eax + 0x34], dl
outsd dx, dword [esi]
add byte [eax - 0x7c], dl
imul eax, dword [eax], 0x50
mov al, byte [0x1450006b]
imul eax, dword [edx], 0x50
mov eax, 0x5850026b
imul eax, dword [edx], 0x50
or dword [ebp + 0x49], eax
dec ecx
outsb dx, byte [esi]
je 0x500178c3
jb 0x500178f2
outsd dx, dword [esi]
jb 0x5001780e
ror byte [eax + 0x7500178], 9
inc ebp
dec ecx
add byte [eax], al
add byte [eax], al
add byte [eax], cl
jns 0x500178cc

Function at 0x50019bd4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x50019c7d
test eax, edx
je 0x50019c80
push 0
push 0
cmp word [eax - 0xa], 2
je 0x50019bfd
push edx
mov edx, eax
mov eax, esp
call sym.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x50019c13
push eax
lea eax, [esp + 8]
call sym.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x50019c22
movzx eax, word [eax]
sub eax, ecx
jmp 0x50019c49
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
shl ecx, 1
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x50019c63
add ecx, 4
js 0x50019c3a
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x50019c60
push eax
mov eax, ecx
mov edx, 2
call sym.rtl120.bpl__System__LStrArrayClr_qqrpvi
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x50019c47
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x50019c49
xor eax, eax
ret
test eax, eax
je 0x50019c90
test edx, edx
jne 0x50019be4
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret
Function at 0x5001bd50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x5001bd6e
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 2
je 0x5001bd8f
cmp ebx, 3
je 0x5001bd8f
cmp ebx, 0x7b
je 0x5001bd8f
mov eax, esi
call fcn.5001bd10
test al, al
jne 0x5001bd93
xor eax, eax
jmp 0x5001bd95
mov al, 1
pop esi
pop ebx
ret

Function at 0x5001bd98
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x5001bdb1
test al, 0x10
jne 0x5001bdb5
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x5001bfac
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
pop ebx
ret

Function at 0x5001bfc0
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_SetFileAttributesW
test eax, eax
jne 0x5001bfe2
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x5001bfe8
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
test al, 1
setne al
pop ebx
ret

Function at 0x5001c000
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov byte [esp], dl
mov esi, eax
xor ebx, ebx
mov eax, esi
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ebp, eax
push ebp
call sub.kernel32.dll_GetFileAttributesW
mov edi, eax
cmp edi, 0xffffffff
je 0x5001c03d
cmp byte [esp], 0
je 0x5001c02d
or edi, 1
jmp 0x5001c030
and edi, 0xfffffffe
push edi
push ebp
call sub.kernel32.dll_SetFileAttributesW
cmp eax, 1
sbb ebx, ebx
inc ebx
mov eax, ebx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x5001c198
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
mov ebx, eax
mov byte [ebp - 1], 0
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, ebx
call sym.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0xc], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CreateFileMappingW
mov dword [ebp - 0x10], eax
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_MapViewOfFile_1
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 8]
xor eax, eax
push ebp
push 0x5001c255
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
je 0x5001c21b
lea eax, [ebp - 0x14]
push eax
push 0xe
push 0
mov eax, dword [ebp - 8]
push eax
call sub.IMAGEHLP.DLL_ImageDirectoryEntryToData
test eax, eax
jne 0x5001c222
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x5001c25c
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5001c25c
cmp dword [ebp - 0xc], 0
je 0x5001c254
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_UnmapViewOfFile_1
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
movzx eax, byte [ebp - 1]
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50025b78
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x200]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoW_1
test eax, eax
jle 0x50025bb1
mov ecx, eax
dec ecx
lea edx, [ebp - 0x200]
mov eax, ebx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
jmp 0x50025bba
mov eax, ebx
mov edx, esi
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x50025bc4
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov edi, ecx
mov esi, edx
mov ebx, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push ebx
call sub.kernel32.dll_GetLocaleInfoW_1
test eax, eax
jle 0x50025be6
movzx eax, word [esp]
jmp 0x50025be8
mov eax, edi
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x50026498
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffff004
push eax
add esp, 0xffffff7c
push 0x800
lea ecx, [esp + 0x88]
call sym.rtl120.bpl__Sysutils_ExceptionErrorMessage_qqrp14System_TObjectpvpbi
mov eax, dword [sym.rtl120.bpl__System_IsConsole]
cmp byte [eax], 0
je 0x5002652a
mov eax, dword [sym.rtl120.bpl__System_Output]
call sym.rtl120.bpl__System_Flush_qqrr15System_Textfile
call sym.rtl120.bpl__System___IOTest_qqrv
lea eax, [esp + 0x884]
push eax
lea eax, [esp + 0x88]
push eax
call sub.user32.dll_CharToOemW
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x88c]
call sym.rtl120.bpl__Sysutils_StrLen_qqrpxc
push eax
lea eax, [esp + 0x890]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x50026578
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x50026563
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [sym.rtl120.bpl__Sysconst__SExceptTitle]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x500a6b30]
call sym.rtl120.bpl__System_FindResourceHInstance_qqrui
push eax
call sub.user32.dll_LoadStringW_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x8c]
push eax
push 0
call sub.user32.dll_MessageBoxW
add esp, 0x1084
ret
Function at 0x500275a0
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 0x50027676
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 0x50027660
mov eax, ebx
call sym.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x50027659
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 0x50027643
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x50027688
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x50027643
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 0x50027660
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 0x5002767d
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret

Function at 0x50029cf0
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 0x50029c9a
mov eax, edi
add eax, eax
call sym.rtl120.bpl__System__GetMem_qqri
mov esi, eax
jmp 0x50029c9c
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 0x50029cd5
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 0x50029cbf
mov eax, esp
cmp esi, eax
je 0x50029ce2
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 0x50029d1c
cmp bl, 0
je 0x50029d18
cmp bl, 0x41
jl 0x50029d13
cmp bl, 0x5a
jg 0x50029d13
or bl, 0x20
xor al, bl
inc esi
jmp 0x50029cf7
pop ecx
pop ebx
pop esi
ret
pop eax
pop ebx
pop esi
jmp 0x50029c5c
Function at 0x50029e40
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 0x50029eb0
push ebx
call sub.kernel32.dll_FindResourceW
test eax, eax
je 0x50029ea7
push eax
push ebx
call sub.kernel32.dll_LoadResource
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x50029ea7
xor eax, eax
push ebp
push 0x50029ea0
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 0x50029ea7
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 0x5002a794
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 0x5002a8e2
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 0x5002a835
push ebx
call sub.kernel32.dll_GetModuleHandleW_1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x5002a7f0
push 2
push 0
push ebx
call sub.kernel32.dll_LoadLibraryExW_1
mov dword [ebp - 4], eax
jmp 0x5002a7f4
mov byte [ebp - 9], 0
cmp dword [ebp - 4], 0
jne 0x5002a835
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 0x5002a8c5
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xa
push 0x5002a8f0
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FindResourceW
test eax, eax
je 0x5002a8a8
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 0x5002a8a8
xor eax, eax
push ebp
push 0x5002a8a1
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 0x5002a8a8
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 0x5002a8cc
cmp byte [ebp - 9], 0
je 0x5002a8c4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FreeLibrary_2
ret
Function at 0x5002b6b4
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 0x5002b6fb
mov edx, esp
mov eax, esi
mov ecx, ebx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
jmp 0x5002b714
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 0x50056ce8
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 0x50056d36
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 0x50056d4f
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x50056d58
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 0x50056d7a
mov byte [ebx + 0xe], 0
pop esi
pop ebx
ret

Function at 0x5005894c
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 0x500589c8
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, 0x50058924
lea eax, [esi + 5]
call fcn.50058944
mov dword [esi + 6], eax
lea ebx, [esi + 0xa]
mov byte [ebx], 0xe8
lea edx, [esi + 4]
mov eax, ebx
call fcn.50058944
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 0x5005899d
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 0x5005f778
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 0x5005f854
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 0x5005f864
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 0x5005f823
mov eax, dword [ebp - 4]
test eax, eax
je 0x5005f7e9
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5005f7e9
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 0x5005f7f4
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 0x5005f83e
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 0x5005f85b
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x5005f880
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 0x5005f92b
xor eax, eax
push ebp
push 0x5005f924
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 0x5005f904
mov edx, dword [ebp - 8]
dec edx
mov eax, ebx
call sym.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
jmp 0x5005f90d
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 0x5005f92b
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