joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403c24
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 8], ebx
test dl, dl
je 0x403c3d
add esp, 0xfffffff0
call sub.rtl120.bpl__System__ClassCreate_qqrp17System_TMetaClasso
mov dword [ebp - 4], ecx
mov byte [ebp - 9], dl
mov ebx, eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x403da8
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebx + 0x24], eax
mov byte [ebx + 0x21], 0
mov byte [ebx + 0x20], 0
mov dword [ebx + 0x1c], 0xffffffff
lea eax, [ebx + 0x18]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov byte [ebx + 0x22], 0
xor ecx, ecx
xor edx, edx
mov eax, ebx
call sub.rtl120.bpl__Inifiles_TMemIniFile__bctr_qqrx20System_UnicodeString
lea eax, [ebx + 0xc]
sub eax, 4
mov eax, dword [eax]
mov dword [ebx + 0x14], eax
call sub.rtl120.bpl__System_TObject_Free_qqrv
mov dl, 1
mov eax, dword [0x4033c4]
call sub.rtl120.bpl__Classes_TStringList__bctr_qqrv
mov esi, eax
mov dword [ebx + 0x14], esi
lea eax, [ebx + 0xc]
sub eax, 4
mov dword [eax], esi
lea eax, [ebx + 0x10]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
cmp dword [ebx + 0x10], 0
je 0x403d77
mov edx, dword [ebx + 0x10]
mov eax, ebx
call fcn.0040399c
mov eax, dword [ebx + 0x10]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
jne 0x403d6d
lea edx, [ebp - 4]
mov eax, dword [ebx + 0x10]
call sub.rtl120.bpl__Sysutils_ExtractFileDir_qqrx20System_UnicodeString
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
test eax, eax
jle 0x403d04
mov eax, dword [ebp - 4]
call fcn.00403a64
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov eax, dword [ebx + 0x10]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
cmp esi, 0xffffffff
je 0x403d6d
cmp dword [ebp + 8], 0
je 0x403d67
mov eax, dword [ebp + 8]
mov dword [ebx + 0xc], eax
lea edx, [ebp - 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
test eax, eax
jle 0x403d67
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
push eax
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_WriteFile
push esi
call sub.kernel32.dll_CloseHandle
cmp dword [ebx + 0x24], 0
je 0x403d77
mov byte [ebx + 0x21], 1
mov eax, dword [ebx + 0x14]
mov dword [eax + 0x34], ebx
mov dword [eax + 0x30], 0x403b88
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403daf
lea eax, [ebp - 8]
mov edx, dword [sym.imp.rtl120.bpl___xp_15Sysutils_TBytes]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x4048f4
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, eax
push esp
push 0xff
call sub.kernel32.dll_GetTempPathW
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
add esp, 0x200
pop ebx
ret
Function at 0x40578c
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x405808
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], 0xff
mov edx, dword [ebp - 8]
inc edx
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__WStrSetLength_qqrr17System_WideStringi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
push eax
call sub.advapi32.dll_GetUserNameW
test eax, eax
je 0x4057e9
mov edx, dword [ebp - 8]
dec edx
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__WStrSetLength_qqrr17System_WideStringi
mov eax, ebx
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
jmp 0x4057f2
mov eax, ebx
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40580f
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__WStrClr_qqrpv
ret
Function at 0x4087d4
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff4
mov ecx, dword [eax]
mov dword [edx], ecx
lea ecx, [eax + 4]
mov ecx, dword [ecx]
mov dword [edx + 4], ecx
lea ecx, [eax + 8]
mov ecx, dword [ecx]
mov dword [edx + 8], ecx
lea ecx, [eax + 0xc]
mov ecx, dword [ecx]
mov dword [edx + 0xc], ecx
lea ecx, [eax + 0x10]
mov ecx, dword [ecx]
mov dword [edx + 0x10], ecx
add eax, 0x14
mov eax, dword [eax]
mov dword [edx + 0x14], eax
xor eax, eax
mov dword [esp], 1
mov ecx, dword [edx + eax*4 + 0x14]
mov ebx, ecx
shl ebx, 0x18
shr ecx, 8
or ebx, ecx
mov ecx, ebx
movzx ebx, cl
mov ebx, dword [ebx*4 + str.cwko0]
mov dword [esp + 4], ebx
mov ebx, ecx
shr ebx, 8
movzx ebx, bl
mov esi, dword [ebx*4 + str.cwko0]
mov ebx, ecx
shr ebx, 0x10
movzx ebx, bl
mov ebx, dword [ebx*4 + str.cwko0]
mov dword [esp + 8], ebx
shr ecx, 0x18
movzx ecx, cl
mov ecx, dword [ecx*4 + str.cwko0]
mov ebx, esi
shl ebx, 8
shr esi, 0x18
or ebx, esi
xor ebx, dword [esp + 4]
mov esi, dword [esp + 8]
shl esi, 0x10
mov edi, dword [esp + 8]
shr edi, 0x10
or esi, edi
xor ebx, esi
mov esi, ecx
shl esi, 0x18
shr ecx, 8
or esi, ecx
xor ebx, esi
xor ebx, dword [edx + eax*4]
mov ecx, dword [esp]
xor ebx, dword [ecx*4 + 0x45426c]
mov dword [edx + eax*4 + 0x18], ebx
inc dword [esp]
mov ecx, dword [edx + eax*4 + 4]
xor ecx, dword [edx + eax*4 + 0x18]
mov dword [edx + eax*4 + 0x1c], ecx
mov ebx, dword [edx + eax*4 + 8]
xor ebx, ecx
mov dword [edx + eax*4 + 0x20], ebx
mov ecx, dword [edx + eax*4 + 0xc]
xor ecx, ebx
mov dword [edx + eax*4 + 0x24], ecx
mov ebx, dword [edx + eax*4 + 0x10]
xor ebx, ecx
mov dword [edx + eax*4 + 0x28], ebx
mov ecx, dword [edx + eax*4 + 0x14]
xor ecx, ebx
mov dword [edx + eax*4 + 0x2c], ecx
add eax, 6
cmp eax, 0x2e
jl 0x40880f
add esp, 0xc
pop edi
pop esi
pop ebx
ret
Function at 0x4088e4
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff4
mov ecx, dword [eax]
mov dword [edx], ecx
lea ecx, [eax + 4]
mov ecx, dword [ecx]
mov dword [edx + 4], ecx
lea ecx, [eax + 8]
mov ecx, dword [ecx]
mov dword [edx + 8], ecx
lea ecx, [eax + 0xc]
mov ecx, dword [ecx]
mov dword [edx + 0xc], ecx
lea ecx, [eax + 0x10]
mov ecx, dword [ecx]
mov dword [edx + 0x10], ecx
lea ecx, [eax + 0x14]
mov ecx, dword [ecx]
mov dword [edx + 0x14], ecx
lea ecx, [eax + 0x18]
mov ecx, dword [ecx]
mov dword [edx + 0x18], ecx
add eax, 0x1c
mov eax, dword [eax]
mov dword [edx + 0x1c], eax
xor eax, eax
mov dword [esp], 1
mov ecx, dword [edx + eax*4 + 0x1c]
mov edi, ecx
shl edi, 0x18
shr ecx, 8
or edi, ecx
mov ecx, edi
movzx ecx, cl
mov ecx, dword [ecx*4 + str.cwko0]
mov dword [esp + 4], ecx
mov ecx, edi
shr ecx, 8
movzx ecx, cl
mov ecx, dword [ecx*4 + str.cwko0]
mov ebx, edi
shr ebx, 0x10
movzx ebx, bl
mov esi, dword [ebx*4 + str.cwko0]
mov ebx, edi
shr ebx, 0x18
movzx ebx, bl
mov ebx, dword [ebx*4 + str.cwko0]
mov dword [esp + 8], ebx
mov ebx, ecx
shl ebx, 8
shr ecx, 0x18
or ebx, ecx
xor ebx, dword [esp + 4]
mov ecx, esi
shl ecx, 0x10
shr esi, 0x10
or ecx, esi
xor ebx, ecx
mov ecx, dword [esp + 8]
shl ecx, 0x18
mov esi, dword [esp + 8]
shr esi, 8
or ecx, esi
xor ebx, ecx
xor ebx, dword [edx + eax*4]
mov ecx, dword [esp]
xor ebx, dword [ecx*4 + 0x45426c]
mov dword [edx + eax*4 + 0x20], ebx
inc dword [esp]
mov ecx, dword [edx + eax*4 + 4]
xor ecx, dword [edx + eax*4 + 0x20]
mov dword [edx + eax*4 + 0x24], ecx
mov ebx, dword [edx + eax*4 + 8]
xor ebx, ecx
mov dword [edx + eax*4 + 0x28], ebx
mov edi, dword [edx + eax*4 + 0xc]
xor edi, ebx
mov dword [edx + eax*4 + 0x2c], edi
movzx ecx, byte [edx + eax*4 + 0x2c]
mov ecx, dword [ecx*4 + str.cwko0]
mov dword [esp + 4], ecx
mov ecx, edi
shr ecx, 8
movzx ecx, cl
mov ecx, dword [ecx*4 + str.cwko0]
mov ebx, edi
shr ebx, 0x10
movzx ebx, bl
mov esi, dword [ebx*4 + str.cwko0]
mov ebx, edi
shr ebx, 0x18
movzx ebx, bl
mov ebx, dword [ebx*4 + str.cwko0]
mov dword [esp + 8], ebx
mov ebx, ecx
shl ebx, 8
shr ecx, 0x18
or ebx, ecx
xor ebx, dword [esp + 4]
mov ecx, esi
shl ecx, 0x10
shr esi, 0x10
or ecx, esi
xor ebx, ecx
mov ecx, dword [esp + 8]
shl ecx, 0x18
mov esi, dword [esp + 8]
shr esi, 8
or ecx, esi
xor ebx, ecx
xor ebx, dword [edx + eax*4 + 0x10]
mov dword [edx + eax*4 + 0x30], ebx
mov ecx, dword [edx + eax*4 + 0x14]
xor ecx, dword [edx + eax*4 + 0x30]
mov dword [edx + eax*4 + 0x34], ecx
mov ebx, dword [edx + eax*4 + 0x18]
xor ebx, ecx
mov dword [edx + eax*4 + 0x38], ebx
mov ecx, dword [edx + eax*4 + 0x1c]
xor ecx, ebx
mov dword [edx + eax*4 + 0x3c], ecx
add eax, 8
cmp eax, 0x34
jl 0x40892f
add esp, 0xc
pop edi
pop esi
pop ebx
ret
Function at 0x410ec4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdf4
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, dword [ebp + 8]
mov eax, ebx
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
push 0
push edi
lea eax, [ebp - 0x20a]
push eax
push esi
call sub.shell32.dll_SHGetSpecialFolderPathW
mov eax, ebx
lea edx, [ebp - 0x20a]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x410f0c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, edx
push 0xff
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
add esp, 0x200
pop ebx
ret

Function at 0x410f3c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, edx
push esp
push 0xff
call sub.kernel32.dll_GetTempPathW
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
add esp, 0x200
pop ebx
ret

Function at 0x410f68
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, edx
push 0xff
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
add esp, 0x200
pop ebx
ret

Function at 0x410f98
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdf4
push ebx
mov ebx, eax
mov eax, ebx
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov dword [ebp - 4], 0x104
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20c]
push eax
call sub.advapi32.dll_GetUserNameW
test eax, eax
je 0x410fd5
mov eax, ebx
lea edx, [ebp - 0x20c]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x410fdc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdf4
push ebx
xor edx, edx
mov dword [ebp - 0x20c], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x411058
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x104
lea eax, [ebp - 0x208]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
test eax, eax
jbe 0x41103f
push ebx
lea eax, [ebp - 0x20c]
lea edx, [ebp - 0x208]
mov ecx, 0x104
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov eax, dword [ebp - 0x20c]
mov ecx, 2
mov edx, 1
call sub.rtl120.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41105f
lea eax, [ebp - 0x20c]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret
Function at 0x411c18
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffddc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x218], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x411d7b
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x411c96
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x23
lea eax, [ebp - 0x212]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.shell32.dll_SHGetSpecialFolderPathW
mov eax, dword [ebp - 4]
add eax, 8
lea edx, [ebp - 0x212]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x411cc1
xor eax, eax
push ebp
push 0x411d03
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x1a
lea eax, [ebp - 0x212]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.shell32.dll_SHGetSpecialFolderPathW
mov eax, dword [ebp - 4]
add eax, 4
lea edx, [ebp - 0x212]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x411d2e
lea edx, [ebp - 0x224]
xor eax, eax
call sub.rtl120.bpl__System_ParamStr_qqri
mov eax, dword [ebp - 0x224]
lea edx, [ebp - 0x220]
call sub.rtl120.bpl__Sysutils_ExtractFilePath_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 4]
add eax, 0xc
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x411d82
lea eax, [ebp - 0x224]
mov edx, 4
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret

Function at 0x414344
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, eax
push 0xff
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
add esp, 0x200
pop ebx
ret

Function at 0x418e1c
Capabilities:
Hash data with md5

Disassembly:
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
xor edx, edx
mov dword [eax + 0x10], edx
xor edx, edx
mov dword [eax + 0x14], edx
add eax, 0x18
mov edx, 0x40
call fcn.00402228
ret
Function at 0x41c4a0
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
cmp byte [0x45721c], 0
jne 0x41c4ac
xor eax, eax
ret
call sub.kernel32.dll_GetTickCount
sub eax, dword [0x455008]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x7d0
jle 0x41c4e2
push 0x91
call sub.user32.dll_GetKeyState
cmp ax, 1
sete byte [0x45500c]
call sub.kernel32.dll_GetTickCount
mov dword [0x455008], eax
movzx eax, byte [0x45500c]
ret

Function at 0x41e824
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
dec ecx
test ecx, ecx
jl 0x41e893
inc ecx
xor ebx, ebx
mov eax, dword [ebp - 0x10]
and eax, 0xff
movzx edx, byte [esi + ebx]
xor eax, edx
mov edx, dword [eax*8 + 0x455518]
mov eax, dword [eax*8 + 0x455514]
push edx
push eax
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
shrd eax, edx, 8
shr edx, 8
xor eax, dword [esp]
xor edx, dword [esp + 4]
add esp, 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
inc ebx
dec ecx
jne 0x41e848
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x41e8a4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
push esi
dec ecx
test ecx, ecx
jl 0x41e8cc
inc ecx
xor ebx, ebx
movzx esi, byte [edx + ebx]
xor esi, eax
and esi, 0xff
mov esi, dword [esi*4 + 0x455114]
shr eax, 8
xor esi, eax
mov eax, esi
inc ebx
dec ecx
jne 0x41e8ae
pop esi
pop ebx
ret
Function at 0x422acc
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov ebx, eax
movzx eax, byte [ebx + 0x48]
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax]
dec al
je 0x422afd
dec al
je 0x422b38
dec al
je 0x422b7d
dec al
je 0x422be6
jmp 0x422c70
mov esi, dword [ebx + 0x24]
inc esi
mov edi, dword [ebx + 0x20]
sub edi, esi
jb 0x422c70
inc edi
mov edx, esi
sub edx, dword [ebx + 0x24]
movzx ecx, byte [ebx + 0x48]
mov ecx, dword [ebx + ecx*4 + 0x40]
movzx edx, byte [ecx + edx]
movzx eax, byte [ebx + 0x48]
mov eax, dword [ebx + eax*4 + 0x40]
add dl, byte [eax + esi]
and dl, 0xff
mov byte [eax + esi], dl
inc esi
dec edi
jne 0x422b0d
jmp 0x422c70
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x422c70
mov esi, 1
movzx eax, byte [ebx + 0x48]
mov edx, eax
xor dl, 1
and edx, 0x7f
mov edx, dword [ebx + edx*4 + 0x40]
movzx edx, byte [edx + esi]
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
add dl, byte [eax + esi]
and dl, 0xff
movzx eax, byte [ebx + 0x48]
mov eax, dword [ebx + eax*4 + 0x40]
mov byte [eax + esi], dl
inc esi
dec edi
jne 0x422b48
jmp 0x422c70
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x422c70
mov esi, 1
movzx eax, byte [ebx + 0x48]
xor al, 1
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax + esi]
mov ecx, esi
dec ecx
mov edx, dword [ebx + 0x24]
cmp ecx, edx
jae 0x422bac
xor ebp, ebp
jmp 0x422bbc
mov ecx, esi
sub ecx, edx
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
movzx ebp, byte [edx + ecx]
add eax, ebp
sar eax, 1
jns 0x422bc5
adc eax, 0
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
add al, byte [edx + esi]
and al, 0xff
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
mov byte [edx + esi], al
inc esi
dec edi
jne 0x422b8d
jmp 0x422c70
xor ebp, ebp
xor eax, eax
mov dword [esp + 4], eax
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x422c70
mov esi, 1
movzx eax, byte [ebx + 0x48]
xor al, 1
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax + esi]
mov edx, esi
dec edx
cmp edx, dword [ebx + 0x24]
jb 0x422c3f
mov edx, esi
sub edx, dword [ebx + 0x24]
movzx ecx, byte [ebx + 0x48]
mov ecx, dword [ebx + ecx*4 + 0x40]
movzx ebp, byte [ecx + edx]
movzx edx, byte [ebx + 0x48]
xor dl, 1
and edx, 0x7f
mov edx, dword [ebx + edx*4 + 0x40]
mov ecx, esi
sub ecx, dword [ebx + 0x24]
movzx edx, byte [edx + ecx]
mov dword [esp + 4], edx
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
movzx edx, byte [edx + esi]
mov dword [esp], edx
movzx ecx, byte [esp + 4]
push eax
mov eax, ebp
pop edx
call fcn.0041e8d0
add al, byte [esp]
and al, 0xff
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
mov byte [edx + esi], al
inc esi
dec edi
jne 0x422bfa
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x42cc34
Capabilities:
Allocate or change rwx memory
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x42cd91
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [esi + 5], eax
mov byte [esi], 0
mov edx, 6
mov eax, ebx
call fcn.0042c680
test al, al
je 0x42cc9e
mov eax, dword [sym.imp.rtl120.bpl__System_DebugHook]
cmp byte [eax], 0
je 0x42cc8f
mov ecx, 0x366d
mov edx, 0x42cdac
mov eax, 0x42ce04
call sub.rtl120.bpl__System__Assert_qqrx20System_UnicodeStringt1i
push 0x42ce48
call sub.kernel32.dll_OutputDebugStringW
jmp 0x42cd76
mov eax, ebx
call fcn.0042c590
mov ebx, eax
lea eax, [ebp - 4]
push eax
push 5
push esi
push ebx
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_ReadProcessMemory
test eax, eax
je 0x42cd76
mov byte [ebp - 0xd], 0xe9
sub edi, ebx
sub edi, 5
mov dword [ebp - 0xc], edi
movzx eax, byte [esi]
cmp al, byte [ebp - 0xd]
jne 0x42cd2b
push 0x42ce70
call sub.kernel32.dll_OutputDebugStringW
movzx eax, byte [esi]
mov byte [ebp - 0xd], al
mov byte [esi], 0
lea eax, [ebp - 0x1c]
push eax
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0
lea edx, [ebp - 0x24]
xor ecx, ecx
mov eax, 0x42ceac
call sub.rtl120.bpl__Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
mov edx, 0x42cec0
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x18]
mov ecx, 0x3686
mov edx, 0x42cdac
call sub.rtl120.bpl__System__Assert_qqrx20System_UnicodeStringt1i
jmp 0x42cd76
mov dword [esi + 5], ebx
lea eax, [ebp - 0x14]
push eax
push 0x40
push 5
push ebx
call sub.kernel32.dll_VirtualProtect
lea eax, [ebp - 4]
push eax
push 5
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_WriteProcessMemory
mov esi, eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
push 5
push ebx
call sub.kernel32.dll_VirtualProtect
test esi, esi
je 0x42cd76
push 5
push ebx
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_FlushInstructionCache
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x42cd98
lea eax, [ebp - 0x1c]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret
Function at 0x42cefc
Capabilities:
Allocate or change rwx memory
Print debug messages

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff8
mov esi, edx
mov ebx, eax
cmp byte [esi], 0
je 0x42cfa6
test ebx, ebx
je 0x42cfa6
mov edx, 6
mov eax, ebx
call fcn.0042c680
test al, al
je 0x42cf51
mov eax, dword [sym.imp.rtl120.bpl__System_DebugHook]
cmp byte [eax], 0
je 0x42cf45
mov ecx, 0x36a4
mov edx, 0x42cfb8
mov eax, 0x42d010
call sub.rtl120.bpl__System__Assert_qqrx20System_UnicodeStringt1i
push 0x42d054
call sub.kernel32.dll_OutputDebugStringW
jmp 0x42cfa6
mov eax, ebx
call fcn.0042c590
mov ebx, eax
test ebx, ebx
je 0x42cfa6
lea eax, [esp + 4]
push eax
push 0x40
push 5
push ebx
call sub.kernel32.dll_VirtualProtect
push esp
push 5
push esi
push ebx
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_WriteProcessMemory
mov edi, eax
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 8]
push eax
push 5
push ebx
call sub.kernel32.dll_VirtualProtect
test edi, edi
je 0x42cfa3
push 5
push ebx
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_FlushInstructionCache
mov byte [esi], 0
pop ecx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x43192c
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x431989
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [ebp - 0xc], eax
mov byte [ebp - 8], 0
lea edx, [ebp - 0xc]
xor ecx, ecx
mov eax, 0x4319a0
call sub.rtl120.bpl__Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_OutputDebugStringW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x431990
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret