joyce8/EMBER2024-capa huggingface dataset:
Function at 0x59809224
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x59809325
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x30]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
mov esi, eax
lea eax, [esi + 1]
push eax
lea eax, [ebx + 0x30]
mov ecx, 1
mov edx, dword [0x59808f1c]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
lea eax, [esi + esi*2]
mov edx, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x38]
mov dword [edx + eax*8], ecx
mov ecx, dword [ebx + 0x3c]
mov dword [edx + eax*8 + 4], ecx
mov edx, dword [ebx + 0x30]
mov ecx, dword [ebp + 8]
mov dword [edx + eax*8 + 8], ecx
mov ecx, dword [ebp + 0xc]
mov dword [edx + eax*8 + 0xc], ecx
test edi, edi
jne 0x598092a6
test esi, esi
jle 0x598092a6
lea edi, [esi + esi*2]
mov eax, dword [ebx + 0x30]
lea eax, [eax + edi*8 + 0x10]
mov edx, dword [ebx + 0x30]
mov edx, dword [edx + edi*8 - 8]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x598092b7
lea eax, [esi + esi*2]
mov edx, dword [ebx + 0x30]
lea eax, [edx + eax*8 + 0x10]
mov edx, edi
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
add dword [ebx + 0x38], eax
adc dword [ebx + 0x3c], edx
test esi, esi
jne 0x5980930f
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x598092ea
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x10]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebx + 0x28]
push eax
call sub.user32.dll_SetWindowTextW
jmp 0x5980930f
lea eax, [ebp - 4]
mov edx, dword [ebx + 0x30]
mov edx, dword [edx + 0x10]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
mov eax, dword [ebx + 0x28]
push eax
call sub.user32.dll_SetWindowTextA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5980932c
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret
Function at 0x5980f041
Capabilities:
Delete file
Write file on windows

Disassembly:
jmp dword [sym.imp.rtl120.bpl__System_TInterfacedObject__AddRef_qqsv]
add ecx, dword [edx]
push esp
push eax
outsb dx, byte [esi]
inc esi
outsd dx, dword [esi]
jb 0x5980efff
popal
je 0x5980ef96
add byte [eax], al
add byte [eax], al
add eax, 0x84000000
add byte [eax], al
add byte [0x84000000], al
out dx, eax
sbb byte [ecx + 0xb], 0x70
xor dh, byte [0x6c6f4336]
outsd dx, dword [esi]
jb 0x5980f020
or dword [eax + 0x66], esi
xor dword [esi], esi
inc edi
jb 0x5980f016
jns 0x5980f02a
push es
jo 0x5980f020
xor eax, 0x7626b30
jo 0x5980f027
xor dword [eax], esi
xor byte [ebx + 0x62], ch
pop es
jo 0x5980f02f
xor dh, byte [eax]
xor byte [ebx + 0x62], ch
pop es
jo 0x5980f037
xor esi, dword [eax]
xor byte [ebx + 0x62], ch
or ebp, dword [ebp + 0x61]
dec esi
push esi
inc edx
imul esi, dword [ebp + ebp*2 + 0x61], 0xe8c08b70
out dx, eax
sbb byte [ecx + 0xf], 9
wbinvd
inc esi
test eax, 0x1773e817
aaa
aad 0xbe
or ebp, dword [ebp + 0x61]
dec esi
push esi
inc edx
imul esi, dword [ebp + ebp*2 + 0x61], 0xff000870
dec esp
add eax, 0xffffffbc
jmp 0x5980f298
invalid
add byte [ebx + 0x73e9bcc0], al
add al, byte [eax]
add byte [ebx + 0x6fe9bcc0], al
add al, byte [eax]
add byte [ebx - 0x5c164340], al
add al, byte [eax]
add byte [ebx + 0x1be9bcc0], al
sbb byte [eax], al
add byte [ebx - 0x50164340], al
sbb eax, dword [eax]
add byte [ebx - 0x14164340], al
sbb al, 0
add byte [ebx + 0x6be9bcc0], al
and al, 0
add byte [ebx - 0x43fbdbbc], al
jmp 0x59801428
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5980f2a0
sar byte [ecx + ebp*8 + 0x26f], 0x83
sar byte [ecx + ebp*8 + 0x2a3], 0x83
sar byte [ecx + ebp*8 + 0x181b], 0x83
sar byte [ecx + ebp*8 + 0x1baf], 0x83
sar byte [ecx + ebp*8 + 0x1ceb], 0x83
sar byte [ecx + ebp*8 + 0x246b], 0x83
inc esp
and al, 4
mov esp, 0xff23c5e9
inc dword [ebx - 0x43fbdbbc]
jmp 0x59801430
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5980f2dc
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5981085c
mov eax, dword [eax + 0x10]
ret
Function at 0x5980f049
Capabilities:
Delete file
Write file on windows

Disassembly:
jmp dword [sym.imp.rtl120.bpl__System_TInterfacedObject__AddRef_qqsv]
add ecx, dword [edx]
push esp
push eax
outsb dx, byte [esi]
inc esi
outsd dx, dword [esi]
jb 0x5980efff
popal
je 0x5980ef96
add byte [eax], al
add byte [eax], al
add eax, 0x84000000
add byte [eax], al
add byte [0x84000000], al
out dx, eax
sbb byte [ecx + 0xb], 0x70
xor dh, byte [0x6c6f4336]
outsd dx, dword [esi]
jb 0x5980f020
or dword [eax + 0x66], esi
xor dword [esi], esi
inc edi
jb 0x5980f016
jns 0x5980f02a
push es
jo 0x5980f020
xor eax, 0x7626b30
jo 0x5980f027
xor dword [eax], esi
xor byte [ebx + 0x62], ch
pop es
jo 0x5980f02f
xor dh, byte [eax]
xor byte [ebx + 0x62], ch
pop es
jo 0x5980f037
xor esi, dword [eax]
xor byte [ebx + 0x62], ch
or ebp, dword [ebp + 0x61]
dec esi
push esi
inc edx
imul esi, dword [ebp + ebp*2 + 0x61], 0xe8c08b70
out dx, eax
sbb byte [ecx + 0xf], 9
wbinvd
inc esi
test eax, 0x1773e817
aaa
aad 0xbe
or ebp, dword [ebp + 0x61]
dec esi
push esi
inc edx
imul esi, dword [ebp + ebp*2 + 0x61], 0xff000870
dec esp
add eax, 0xffffffbc
jmp 0x5980f298
invalid
add byte [ebx + 0x73e9bcc0], al
add al, byte [eax]
add byte [ebx + 0x6fe9bcc0], al
add al, byte [eax]
add byte [ebx - 0x5c164340], al
add al, byte [eax]
add byte [ebx + 0x1be9bcc0], al
sbb byte [eax], al
add byte [ebx - 0x50164340], al
sbb eax, dword [eax]
add byte [ebx - 0x14164340], al
sbb al, 0
add byte [ebx + 0x6be9bcc0], al
and al, 0
add byte [ebx - 0x43fbdbbc], al
jmp 0x59801428
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5980f2a0
sar byte [ecx + ebp*8 + 0x26f], 0x83
sar byte [ecx + ebp*8 + 0x2a3], 0x83
sar byte [ecx + ebp*8 + 0x181b], 0x83
sar byte [ecx + ebp*8 + 0x1baf], 0x83
sar byte [ecx + ebp*8 + 0x1ceb], 0x83
sar byte [ecx + ebp*8 + 0x246b], 0x83
inc esp
and al, 4
mov esp, 0xff23c5e9
inc dword [ebx - 0x43fbdbbc]
jmp 0x59801430
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5980f2dc
add byte [eax], al
add eax, 0xffffffbc
jmp fcn.5981085c
mov eax, dword [eax + 0x10]
ret

Function at 0x598107f8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
movzx eax, cl
mov edx, dword [ebp - 4]
cmp word [edx + eax*2], 0xffff
jne 0x5981084a
mov dword [ebp - 0xc], 0x7fffffff
xor esi, esi
mov ebx, dword [ebp - 8]
movzx eax, cl
movzx edx, byte [ebx]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [ebp - 0xc]
jge 0x59810841
movzx edx, cl
mov edi, dword [ebp - 4]
lea edi, [edi + edx*2]
mov word [edi], si
mov dword [ebp - 0xc], eax
inc esi
add ebx, 3
cmp esi, 0x10
jne 0x59810820
movzx eax, cl
mov edx, dword [ebp - 4]
movzx eax, byte [edx + eax*2]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x59811734
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
mov esi, eax
lea eax, [ebp - 0x14]
mov edx, 0x14
call fcn.59802018
mov dword [ebp - 0x14], 0x14
push 0x5981183c
push 0x59811858
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.59801964
mov ebx, eax
test ebx, ebx
je 0x59811777
lea eax, [ebp - 0x14]
push eax
call ebx
test eax, eax
jne 0x598117cd
lea eax, [ebp - 8]
push eax
call sub.user32.dll_GetCursorPos
test eax, eax
je 0x598117cd
push dword [ebp - 4]
push dword [ebp - 8]
call sub.user32.dll_WindowFromPoint
test eax, eax
je 0x5981179f
push 0
push eax
call sub.user32.dll_GetWindowThreadProcessId
mov ebx, eax
jmp 0x598117a1
xor ebx, ebx
test ebx, ebx
je 0x598117b3
push 0xffffffffffffffff
push ebx
call sub.kernel32.dll_GetCurrentThreadId
push eax
call sub.user32.dll_AttachThreadInput
call sub.user32.dll_GetCursor
mov dword [ebp - 0xc], eax
test ebx, ebx
je 0x598117cd
push 0
push ebx
call sub.kernel32.dll_GetCurrentThreadId
push eax
call sub.user32.dll_AttachThreadInput
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x59811836
test byte [ebp - 0x10], 1
je 0x59811836
lea eax, [ebp - 0x28]
push eax
push ebx
call sub.user32.dll_GetIconInfo
test eax, eax
je 0x5981180e
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x598117f5
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x59811802
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [ebp - 0x24]
sub dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
sub dword [ebp - 4], eax
push 3
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
sub edx, dword [eax - 8]
push edx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 8]
sub edx, dword [eax - 4]
push edx
push esi
call sub.user32.dll_DrawIconEx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x59812d60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov byte [esp + 4], cl
mov dword [esp], edx
mov edi, eax
mov ecx, edi
movzx eax, byte [esp]
mov byte [esp + 5], al
mov edx, edi
shr edx, 8
mov eax, dword [esp]
shr eax, 8
mov byte [esp + 6], al
mov eax, edi
shr eax, 0x10
mov ebx, dword [esp]
shr ebx, 0x10
mov byte [esp + 7], bl
xor esi, esi
cmp byte [esp + 4], 0
je 0x59812df4
movzx ebx, cl
movzx ebp, byte [esp + 5]
add ebx, ebp
cmp ebx, 0xff
jbe 0x59812db8
inc esi
mov cl, 0xff
jmp 0x59812dbc
add cl, byte [esp + 5]
movzx ebx, dl
movzx ebp, byte [esp + 6]
add ebx, ebp
cmp ebx, 0xff
jbe 0x59812dd3
inc esi
mov dl, 0xff
jmp 0x59812dd7
add dl, byte [esp + 6]
movzx ebx, al
movzx ebp, byte [esp + 7]
add ebx, ebp
cmp ebx, 0xff
jbe 0x59812dee
inc esi
mov al, 0xff
jmp 0x59812e21
add al, byte [esp + 7]
jmp 0x59812e21
cmp cl, byte [esp + 5]
jae 0x59812dff
inc esi
xor ecx, ecx
jmp 0x59812e03
sub cl, byte [esp + 5]
cmp dl, byte [esp + 6]
jae 0x59812e0e
inc esi
xor edx, edx
jmp 0x59812e12
sub dl, byte [esp + 6]
cmp al, byte [esp + 7]
jae 0x59812e1d
inc esi
xor eax, eax
jmp 0x59812e21
sub al, byte [esp + 7]
dec esi
jle 0x59812e38
movzx ecx, byte [esp + 4]
xor cl, 1
mov edx, dword [esp]
mov eax, edi
call fcn.59812d60
jmp 0x59812e4b
movzx eax, al
shl eax, 0x10
movzx edx, dl
shl edx, 8
add eax, edx
movzx edx, cl
add eax, edx
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x5981404c
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x59814157
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
mov edx, 0x10
call fcn.59802018
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x30]
sub eax, 0x2e
mov dword [esi + 8], eax
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x598140ca
push 0x410
push esi
lea edx, [ebp - 4]
mov eax, ebx
call fcn.59814274
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
push eax
lea edx, [ebp - 8]
mov eax, ebx
call fcn.59814274
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push edi
call sub.user32.dll_DrawTextW
jmp 0x5981411c
push 0x410
push esi
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.59814274
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0xc]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrLen_qqrx27System__AnsiStringT_us_i0__
push eax
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.59814274
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push edi
call sub.user32.dll_DrawTextA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5981415e
lea eax, [ebp - 0x18]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x14]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x10]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0xc]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret
Function at 0x59814630
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5981470f
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0x14], 0
je 0x598146ef
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5981469d
push 0
push 0
push 0xe
mov eax, dword [ebx + 0x14]
push eax
call sub.user32.dll_SendMessageW
mov edx, eax
inc edx
lea eax, [ebx + 0x50]
call sub.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
mov eax, dword [ebx + 0x50]
push eax
mov eax, dword [ebx + 0x50]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
push eax
push 0xd
mov eax, dword [ebx + 0x14]
push eax
call sub.user32.dll_SendMessageW
mov edx, eax
lea eax, [ebx + 0x50]
call sub.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
jmp 0x598146ef
push 0
push 0
push 0xe
mov eax, dword [ebx + 0x14]
push eax
call sub.user32.dll_SendMessageA
mov edx, eax
inc edx
lea eax, [ebp - 4]
xor ecx, ecx
call sub.rtl120.bpl__System__LStrSetLength_qqrv
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__EnsureAnsiString_qqrr27System__AnsiStringT_us_i0__us
call sub.rtl120.bpl__System__LStrLen_qqrx27System__AnsiStringT_us_i0__
push eax
push 0xd
mov eax, dword [ebx + 0x14]
push eax
call sub.user32.dll_SendMessageA
mov edx, eax
lea eax, [ebp - 4]
xor ecx, ecx
call sub.rtl120.bpl__System__LStrSetLength_qqrv
lea eax, [ebx + 0x50]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
mov eax, esi
mov edx, dword [ebx + 0x50]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59814716
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret
Function at 0x59819cf8
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdec
push ebx
xor edx, edx
mov dword [ebp - 0x214], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x59819d9d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0x104
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x59819d51
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20e]
push eax
call sub.kernel32.dll_GetComputerNameW
mov eax, ebx
lea edx, [ebp - 0x20e]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x59819d84
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20e]
push eax
call sub.kernel32.dll_GetComputerNameA
lea eax, [ebp - 0x214]
lea edx, [ebp - 0x20e]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x214]
mov eax, ebx
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59819da4
lea eax, [ebp - 0x214]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret
Function at 0x59819f7c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ecx
mov edi, edx
mov esi, eax
mov eax, dword [ebp + 8]
call sub.rtl120.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x5981a0eb
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5981a02b
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
mov eax, edi
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.advapi32.dll_RegCreateKeyExW
test eax, eax
jne 0x5981a0c0
lea eax, [ebp + 8]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
add eax, eax
add eax, 2
push eax
mov eax, dword [ebp + 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 1
push 0
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExW
test eax, eax
sete bl
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
jmp 0x5981a0c0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
lea eax, [ebp - 0x14]
mov edx, edi
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push esi
call sub.advapi32.dll_RegCreateKeyExA
test eax, eax
jne 0x5981a0c0
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__EnsureAnsiString_qqrr27System__AnsiStringT_us_i0__us
call sub.rtl120.bpl__System__LStrLen_qqrx27System__AnsiStringT_us_i0__
inc eax
push eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push 1
push 0
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 8]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete bl
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5981a0f2
lea eax, [ebp - 0x18]
mov edx, 2
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp + 8]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x5981a100
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x5981a1eb
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5981a173
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
mov eax, edi
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x5981a1d0
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegDeleteValueW
test eax, eax
sete bl
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
jmp 0x5981a1d0
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0xc]
mov edx, edi
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push esi
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x5981a1d0
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 4]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegDeleteValueA
test eax, eax
sete bl
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5981a1f2
lea eax, [ebp - 0x10]
mov edx, 2
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
ret
Function at 0x5981a914
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov edi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call sub.madBasic_.bpl__Madtools_GetImageNtHeaders_qqrui
test eax, eax
je 0x5981a9c5
cmp word [eax + 0x18], 0x20b
jne 0x5981a952
add eax, 0x18
add eax, 0x78
mov edx, dword [eax]
mov esi, edx
add esi, dword [ebp - 4]
add edx, dword [eax + 4]
mov dword [ebp - 0x10], edx
jmp 0x5981a964
add eax, 0x80
mov edx, dword [eax]
mov esi, edx
add esi, dword [ebp - 4]
add edx, dword [eax + 4]
mov dword [ebp - 0x10], edx
test esi, esi
je 0x5981a9c5
jmp 0x5981a9bf
mov eax, dword [esi + 0x10]
cmp eax, dword [ebp - 0x10]
jbe 0x5981a97b
push ebp
call fcn.5981a754
pop ecx
jmp 0x5981a9c5
cmp dword [esi + 0x10], 0
je 0x5981a9bc
mov ebx, dword [ebp - 4]
add ebx, dword [esi + 0x10]
jmp 0x5981a9b7
cmp edi, dword [ebx]
jne 0x5981a9b4
lea eax, [ebp - 0xc]
push eax
push 0x40
push 4
push ebx
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x5981a9b4
mov eax, dword [ebp - 8]
mov dword [ebx], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 4
push ebx
call sub.kernel32.dll_VirtualProtect
add ebx, 4
cmp dword [ebx], 0
jne 0x5981a989
add esi, 0x14
cmp dword [esi + 0xc], 0
jne 0x5981a96a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5981bca4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x5981be29
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 4]
push eax
call sub.shell32.dll_SHGetMalloc
test eax, eax
jne 0x5981bdfd
lea eax, [ebp - 8]
push eax
push esi
push 0xffffffffffffffff
call sub.shell32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x5981bdfd
cmp dword [0x59858074], 0
jne 0x5981bd26
push 0x5981be38
push 0x5981be64
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.59801964
mov dword [0x59858074], eax
cmp dword [0x59858074], 0
je 0x5981bd58
lea eax, [ebp - 0x212]
push eax
mov eax, dword [ebp - 8]
push eax
call dword [0x59858074]
test eax, eax
je 0x5981bd58
mov eax, edi
lea edx, [ebp - 0x212]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x5981bd8f
lea eax, [ebp - 0x212]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
test eax, eax
je 0x5981bd8f
lea eax, [ebp - 0x218]
lea edx, [ebp - 0x212]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x218]
mov eax, edi
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
cmp dword [edi], 0
jne 0x5981bdbb
lea edx, [ebp - 0x21c]
xor eax, eax
call fcn.5981950c
mov eax, dword [ebp - 0x21c]
mov edx, edi
call sub.madBasic_.bpl__Madstrings_ExtractFilePathW_qqrx20System_UnicodeString
cmp dword [edi], 0
je 0x5981bdfd
mov eax, dword [edi]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov edx, dword [edi]
cmp word [edx + eax*2 - 2], 0x5c
sete al
cmp bl, al
je 0x5981bdfd
test bl, bl
je 0x5981bde8
mov eax, edi
mov edx, 0x5981be88
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x5981bdfd
mov eax, dword [edi]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov edx, eax
mov eax, edi
mov ecx, 1
call sub.rtl120.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5981be30
lea eax, [ebp - 0x21c]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x218]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret