joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c2420
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x4c2469
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x4c28e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fabd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.004c2490
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004c2510
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004c2510
lea ecx, [esi + 0xc]
call fcn.004ec6fc
lea ecx, [esi + 0x10]
call fcn.004ec6fc
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004c3aa0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004c3aa0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004c3aa0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004ec771
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004ec771
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4c6ae0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0xf59960]
xor edx, edx
cmp eax, edx
jne 0x4c6b06
xor eax, eax
mov byte [eax + 0xf59860], al
inc eax
cmp eax, 0x100
jl 0x4c6aee
mov dword [0xf59960], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0xf59860
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x4c6b97
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x4c6b6a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x4c6b38
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x4c6ba0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x4c6bf3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x4c6bda
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4cd580
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fafce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.004cdea0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0xf06de4
call fcn.004ec4b2
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x4cd613
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004ec4b2
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x4cd60c
push 0
mov ecx, eax
call fcn.004c4720
mov dword [esi + 0xc], eax
jmp 0x4cd615
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x4cd615
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x4eeb28
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4eeb60
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004ecbcc
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004ecba4
jmp 0x4eeb6c
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4f021a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4f025c
call fcn.004f5e59
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4f025c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4f0253
xor eax, eax
jmp 0x4f0264
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004f026a
pop edi
pop esi
pop ebx
ret 4

Function at 0x4f6389
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4f63b7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4f63d5
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004f62ef
jmp 0x4f63d5
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4f63d5
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004f62ef
test edi, edi
mov eax, edi
jne 0x4f63bf
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x50001798
Capabilities:
Get file size
Move file
Read file on windows

Disassembly:
adc byte [ebx + eax*2 + 0x6c], dl
popal
jae 0x50001812
dec eax
insb byte es:[edi], dx
jo 0x50001809
jb 0x500017e8
popal
jae 0x5000180e
lea eax, [eax]
mov al, 0x17
add byte [eax + 7], dl
pop es

Function at 0x500017b0
Capabilities:
Get file size
Move file

Disassembly:
pop es
adc byte [ebx + eax*2 + 0x6c], dl
popal
jae 0x5000182b
dec eax
insb byte es:[edi], dx
jo 0x50001822
jb 0x50001801
popal
jae 0x50001827
cwde
pop ss
add byte [eax + 0x44], dl
adc eax, 0x5000
push es
push ebx
jns 0x50001843
je 0x50001837
insd dword es:[edi], dx
add byte [eax], al
lea eax, [eax]
fcom qword [edi]
add byte [eax + 1], dl
add dword [eax], ecx
push ebp
inc ebx
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [ebx], al
add byte [eax], al
add al, bl
pop ss
push ebx
je 0x50001897
imul ebp, dword [esi + 0x67], 0xc08bfde9
xor byte [eax], bl
sal byte [eax], 0x18
add byte [eax + 0xa], dl
or eax, 0x42776152
je 0x5000189e
push ebx
outsb dx, byte [esi]
imul edx, dword [ebx + 0x74], 0x61

Function at 0x500017f4
Capabilities:
Get file size
Move file

Disassembly:
adc dword [edx], ecx
push ebp
inc ebx
push ebx
xor al, 0x53
je 0x5000186f
imul ebp, dword [esi + 0x67], 4
add byte [eax], al
add byte [eax], al
add eax, dword [eax]
add byte [eax], al
fcom dword [edi]
add byte [eax + 6], dl
push ebx
jns 0x50001887
je 0x5000187b
insd dword es:[edi], dx
nop
sbb al, 0x18
add byte [eax + 0xa], dl
or cl, byte [edx]
push ebp
push esp
push eax
add dword [eax + 0x4500018], eax
add eax, 0x74614454

Function at 0x50001830
Capabilities:
Get file size
Move file

Disassembly:
or cl, byte [0x42776152]
jns 0x500018ac
push ebx
je 0x500018ae
imul ebp, dword [esi + 0x67], 0x408dffff
add byte [eax + 0x18], cl
add byte [eax + 0x11], dl
adc dword [ebx], ecx
push esp
inc edx
outsd dx, dword [esi]
add byte [eax], al
add byte [eax + ebx + 0x630d5000], dl
jae 0x5000190c
outsb dx, byte [esi]

Function at 0x50001848
Capabilities:
Get file size
Move file

Disassembly:
adc dword [ebx], ecx
push esp
inc edx
outsd dx, dword [esi]
jne 0x500018bd
inc ecx
jb 0x500018c5
popal
jns 0x5000185a
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [ebx], al
add byte [eax], al
add byte [eax + edx + 0x53065000], al
jns 0x500018dc
je 0x500018d0
insd dword es:[edi], dx
jo 0x50001886
add byte [eax + 4], dl
or dword [esp + eax*2 + 0x61], edx
add dword gs:[eax + ebx + 0x5045000], ecx
popal
je 0x50001925
or esp, dword fs:[ebx + 0x73]

Function at 0x50001870
Capabilities:
Get file size
Move file

Disassembly:
add al, 9
push esp
inc esp
popal
je 0x500018dc
push esp
imul ebp, dword [ebp + 0x65], 0x188001
push eax

Function at 0x50001880
Capabilities:
Get file size
Move file

Disassembly:
add al, 5
push esp
inc esp
popal
je 0x500018ec
add dword [eax + ebx + 0x5045000], ecx

Function at 0x5000188c
Capabilities:
Get file size
Move file

Disassembly:
add al, 5
push esp
push esp
imul ebp, dword [ebp + 0x65], 0x189801
push eax
Function at 0x50001898
Capabilities:
Get file size
Move file

Disassembly:
add ecx, dword [esp + edx*2]
inc ebx
push 0x536b6e75
je 0x50001904
je 0x5000191a
jae 0x500018a8
add byte [eax], al
add byte [eax], al
add al, 0
add byte [eax], al
add byte [eax + eax], al
add byte [eax], al
xchg esp, eax
sbb byte [eax], al
push eax
or eax, 0x6e557363
popal
insb byte es:[edi], dx
insb byte es:[edi], dx
outsd dx, dword [esi]
arpl word [ecx + 0x74], sp
or esp, dword fs:[ebx + 0x73]
inc ecx
insb byte es:[edi], dx
insb byte es:[edi], dx
outsd dx, dword [esi]
arpl word [ecx + 0x74], sp
or ah, byte fs:[ebx + 0x73]
push edx
jae 0x50001939
jb 0x5000194c
push cs
arpl word [ebx + 0x53], si
jns 0x50001951
inc ecx
insb byte es:[edi], dx
insb byte es:[edi], dx
outsd dx, dword [esi]
arpl word [ecx + 0x74], sp
or eax, 0x79537363
jae 0x50001940
jae 0x50001956
jb 0x50001969
push es
push ebx
jns 0x5000196c
je 0x50001960
insd dword es:[edi], dx
add byte [ecx], bl
add byte [eax + 3], dl
add edx, dword [esi]
popal
jns 0x500019c4
add byte [eax], al
inc eax
sbb dword [eax], eax
push eax
push es
inc esp

Function at 0x50001900
Capabilities:
Get file size
Move file

Disassembly:
add edx, dword [esi]
push esp
dec ebp
imul ebp, dword [esi + 0x69], 0x426d756d
insb byte es:[edi], dx
outsd dx, dword [esi]
arpl word [ebx + 0x41], bp
insb byte es:[edi], dx
imul esp, dword [edi + 0x6e], 0x746e656d
add dword [eax], eax
add byte [eax], al
add byte [ecx], al
add byte [eax], al
add ah, bh
sbb byte [eax], al
push eax
or byte [ebp + 0x62], ch
popal
cmp byte [edx + 0x79], al
je 0x50001993
or dword [ebp + 0x62], ebp
popal
xor dword [esi], esi
inc edx
jns 0x500019ab
push es
push ebx
jns 0x500019af
je 0x500019a3
insd dword es:[edi], dx
nop
inc esp
sbb dword [eax], eax
push eax
add dword [eax], eax
jne 0x50001a21
dec edi
dec ebp

Function at 0x50001944
Capabilities:
Get file size
Move file

Disassembly:
add edx, dword [ebx]
push esp
push esp
js 0x500019bf
dec esp
imul ebp, dword [esi + 0x65], 0x61657242
imul edx, dword [ebx + 0x74], 0x79
insb byte es:[edi], dx
add dword gs:[eax], eax
add byte [eax], al
add byte [ecx], al
add byte [eax], al
add byte [eax + 0x19], al
add byte [eax + 6], dl
je 0x500019d5
bound esi, qword [ebx + 0x4c]
inc esi
or byte [esp + ebp*2 + 0x62], dh
jae 0x500019b6
push edx
dec esp
inc esi
push es
push ebx
jns 0x500019ed
je 0x500019e1
insd dword es:[edi], dx
lea eax, [eax]
test byte [ecx], bl
add byte [eax + 3], dl
add ecx, dword [0x6e755254]
jb 0x50001a1d
dec ecx
push eax
je 0x50001a34
or esi, dword [edx + 0x65]
inc ebp
dec edi
popal
je 0x50001aa0
outsd dx, dword [esi]
inc ebx
Function at 0x50002aa6
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword fs:[0x30]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
add eax, 0xc
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
je 0x50002b09
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x30]
push ecx
call fcn.50002a46
add esp, 4
cmp dword [ebp + 8], eax
jne 0x50002aff
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x18]
jmp 0x50002b0b
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
jmp 0x50002ad5
xor eax, eax
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + edx*8 + 0x78]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
add eax, dword [edx + 0x20]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + 0x1c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
jmp 0x50002bfe
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 0x18]
jae 0x50002c46
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + edx*4]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.50002b46
add esp, 8
cmp eax, dword [ebp + 0x10]
jne 0x50002c44
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax*4]
mov eax, edx
jmp 0x50002c48
jmp 0x50002bf5
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x50003bf0
Capabilities:
Read file via mapping

Disassembly:
push ebx
push esi
call fcn.50003bbc
push str.LocalFastMM_PID_________
push 0
push 4
call sub.kernel32.dll_OpenFileMappingA
mov ebx, eax
test ebx, ebx
jne 0x50003c0f
xor esi, esi
jmp 0x50003c2b
push 0
push 0
push 0
push 4
push ebx
call sub.kernel32.dll_MapViewOfFile
mov esi, dword [eax]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, esi
pop esi
pop ebx
ret
Function at 0x50003c94
Capabilities:
Read file via mapping

Disassembly:
call sym.rtl120.bpl__System_IsMemoryManagerSet_qqrv
test al, al
jne 0x50003cee
cmp dword [0x500a6af8], 0
jne 0x50003cee
call fcn.50003bf0
test eax, eax
jne 0x50003ceb
push str.LocalFastMM_PID_________
push 4
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.kernel32.dll_CreateFileMappingA
mov dword [0x500a6af8], eax
push 0
push 0
push 0
push 2
mov eax, dword [0x500a6af8]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [eax], sym.rtl120.bpl__System_SysGetMem_qqri
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov al, 1
jmp 0x50003cf0
xor eax, eax
ret
xor eax, eax
ret

Function at 0x500042f0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x5000432c
movzx eax, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x5000434c
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
push 0
call sym.rtl120.bpl__System__LStrFromArray_qqrr27System__AnsiStringT_us_i0__pcius
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x50004368
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffbe4
mov esi, edx
mov ebx, eax
test bl, bl
je 0x500043a9
movzx eax, bl
add eax, 0x41
dec eax
mov word [esp], ax
mov word [esp + 2], 0x3a
mov word [esp + 4], 0
lea eax, [esp + 0x212]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
push esp
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [esp + 8]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x500043c9
lea eax, [esp + 0x212]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov eax, esi
lea edx, [esp + 8]
mov ecx, 0x105
call sym.rtl120.bpl__System__WStrFromWArray_qqrr17System_WideStringpbi
add esp, 0x41c
pop esi
pop ebx
ret

Function at 0x5000472c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call sym.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
test esi, esi
jne 0x50004764
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call sym.rtl120.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
jmp 0x50004782
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.50004610
mov edi, eax
test esi, esi
je 0x50004782
cmp dword [ebx], 0
je 0x50004782
dec esi
jmp 0x5000476b
add esp, 0x20c
pop edi
pop esi
pop ebx
ret
Function at 0x5000480c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + sym.rtl120.bpl__System_RandSeed], 0x8088405
inc edx
mov dword [ebx + sym.rtl120.bpl__System_RandSeed], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x50004828
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + sym.rtl120.bpl__System_RandSeed], 0x8088405
inc edx
mov dword [ebx + sym.rtl120.bpl__System_RandSeed], edx
fld qword [ebx + 0x5009c7d8]
push 0
push edx
fild qword [esp]
add esp, 8
fmulp st(1)
pop ebx
ret

Function at 0x50005c08
Capabilities:
Clear file content

Disassembly:
movzx edx, word [eax + 4]
sub edx, 0xd7b1
cmp edx, 2
ja 0x50005c26
push dword [eax]
call sub.kernel32.dll_SetEndOfFile
dec eax
je 0x50005c30
jmp fcn.50004244
mov eax, 0x67
jmp sym.rtl120.bpl__System_SetInOutRes_qqri
ret

Function at 0x50005d18
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, eax
movzx eax, word [eax + 4]
sub eax, 0xd7b2
cmp eax, 1
ja 0x50005d4b
push 0
mov eax, esp
push 0
push eax
push dword [ebx + 8]
push edx
push dword [ebx]
call sub.kernel32.dll_WriteFile
pop edx
dec eax
jne 0x50005d52
cmp edx, dword [ebx + 8]
je 0x50005d5c
mov eax, 0x65
jmp 0x50005d57
mov eax, 5
jmp 0x50005d57
call sub.kernel32.dll_GetLastError
call sym.rtl120.bpl__System_SetInOutRes_qqri
mov eax, ebx
pop ebx
ret

Function at 0x500069b4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [sym.rtl120.bpl__System_Default8087CW]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x50006a4c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x50006a2c
xor eax, eax
push ebp
push 0x50006a25
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x50006a84
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50006a2c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [sym.rtl120.bpl__System_Default8087CW]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [sym.rtl120.bpl__System_Default8087CW], ax
mov esp, ebp
pop ebp
ret
Function at 0x5000730c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call sym.rtl120.bpl__System_TMonitor_TryEnter_qqrv
mov byte [esp], al
cmp byte [esp], 0
jne 0x50007495
test edi, edi
je 0x50007495
mov byte [esp + 1], 0
test ebp, ebp
jle 0x500073cc
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x500073a7
cmp edi, 0xffffffff
je 0x5000736b
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x5000736b
mov byte [esp], 0
jmp 0x50007495
mov ebx, dword [esi]
cmp ebx, 1
jg 0x500073a7
test ebx, ebx
jne 0x500073a0
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.50001d04
test eax, eax
jne 0x500073a0
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x50007495
pause
dec ebp
test ebp, ebp
jg 0x50007350
cmp edi, 0xffffffff
je 0x500073cc
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x500073ca
mov byte [esp], 0
jmp 0x50007495
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x5000731a
lea edx, [ebx + 2]
mov eax, esi
mov ecx, ebx
call fcn.50001d04
cmp ebx, eax
jne 0x500073cc
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call sym.rtl120.bpl__System_TMonitor_GetEvent_qqrv
mov edx, eax
mov ebx, dword [sym.rtl120.bpl__System_MonitorSupport]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x50007433
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x50007431
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x50007433
xor edi, edi
cmp byte [esp], 0
je 0x5000745c
mov ebx, dword [esi]
test bl, 1
jne 0x50007475
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, esi
mov ecx, ebx
call fcn.50001d04
cmp ebx, eax
jne 0x50007439
mov byte [esp + 1], 1
jmp 0x50007475
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, esi
mov ecx, ebx
call fcn.50001d04
cmp ebx, eax
jne 0x5000745c
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x500073e6
cmp byte [esp], 0
je 0x50007495
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret