joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4466a0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4466d3
push esi
call fcn.00454a60
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4466cc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x446759
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x446742
mov eax, dword [esi + 8]
test eax, eax
je 0x4466f7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x44673e
cmp eax, 2
je 0x446742
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4466ea
cmp eax, 3
je 0x44671d
cmp eax, 1
jne 0x4466ea
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4466ea
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4466ea
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00446780
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x446768
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00446780
add esp, 4
pop esi
ret

Function at 0x447000
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x447021
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x447021
mov eax, dword [eax + 0x44]
test eax, eax
je 0x447021
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x461d50
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x461df3
test eax, eax
jbe 0x461df3
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x461df3
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x461d9e
xor esi, esi
jmp 0x461da4
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x461dcf
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.00463d40
add esi, eax
push esi
mov ebx, esi
call fcn.00463d40
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x461db0
pop ebp
test edi, edi
pop edi
jne 0x461df3
test ebx, ebx
je 0x461df3
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.004668c0
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x461f15
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x46202d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x46202d
mov eax, dword [esi + 0x3c]
push eax
call fcn.0047748f
mov esi, eax
test esi, esi
je 0x46202d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x46202d
mov ecx, esi
call fcn.00461ea0
cmp edi, eax
jge 0x46202d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x461fb3
mov dword [esp + 0x34], 1
jmp 0x46200e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x46202d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.00461490
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x477e33
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x477e6b
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.00475ee7
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00475ebf
jmp 0x477e77
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x479521
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 0x479563
call fcn.0047efda
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x479563
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x47955a
xor eax, eax
jmp 0x47956b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00479571
pop edi
pop esi
pop ebx
ret 4
Function at 0x47f50a
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 0x47f538
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x47f556
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0047f470
jmp 0x47f556
mov eax, dword [esi + 0x14]
test eax, eax
je 0x47f556
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0047f470
test edi, edi
mov eax, edi
jne 0x47f540
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401207
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
mov eax, dword [0x4182e8]
and dword [ebp - 0x18], 0
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [0x4182ec]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], eax
mov esi, dword [edi]
mov edx, dword [edi + 4]
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], edx
call fcn.00401200
mov ebx, dword [ebp - 0x18]
add ebx, 0x23f
cmp dword [0xb03de4], 0x14
jne 0x401265
push 0
lea eax, [ebp - 0x830]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov edx, dword [ebp - 0xc]
mov ecx, dword [0x4182f0]
mov eax, dword [0x4182f4]
push 0x20
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
pop edi
mov dword [ebp - 0x1c], 2
add dword [ebp - 0x1c], 3
mov eax, esi
mov dword [ebp - 0xc], 0xedeb2e40
shl eax, 4
add eax, ecx
cmp dword [0xb03de4], 0xfa9
mov dword [ebp - 8], eax
mov eax, dword [0xb03de0]
cmove eax, dword [ebp - 0xc]
and dword [ebp - 0xc], 0
cmp dword [0xb03de4], 0x3eb
mov dword [0xb03de0], eax
mov eax, dword [0xb03d38]
cmove eax, dword [ebp - 0xc]
mov dword [0xb03d38], eax
lea eax, [ebx + esi]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
shr eax, 5
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
and dword [ebp - 0x10], 0
mov dword [0xb03ddc], 0xf4ea3dee
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
xor eax, dword [ebp - 4]
sub edx, eax
mov dword [ebp - 0x14], eax
mov eax, edx
mov dword [ebp - 0xc], edx
shl eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x28]
add dword [ebp - 8], eax
mov ecx, dword [ebp - 0x1c]
lea eax, [ebx + edx]
and dword [ebp - 4], 0
mov dword [ebp - 0x18], eax
mov eax, edx
shr eax, cl
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
xor dword [ebp - 0x10], eax
cmp dword [0xb03de4], 0xb03
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jne 0x401363
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
xor eax, dword [ebp - 0x14]
add ebx, 0x61c88647
mov ecx, dword [ebp - 0x24]
sub esi, eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], esi
dec edi
jne 0x401279
mov edi, dword [ebp - 0x2c]
mov dword [edi], esi
mov dword [edi + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c0ca
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x417f10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00408870
mov dword [ebp - 0x14], eax
cmp dword [0x45f5d8], esi
jne 0x40c1bd
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40c14a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40c29d
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40c29d
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c29d
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x45f5d8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x45f5dc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x45f5e0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x45f5e8], eax
test eax, eax
je 0x40c1ba
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x45f5e4], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40c1e2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40c1d5
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40c1f7
push 4
pop eax
jmp 0x40c29f
cmp dword [ebp - 0x14], esi
je 0x40c1f7
push dword [0x45f5d8]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40c1dc
mov eax, dword [0x45f5e4]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40c255
cmp dword [0x45f5e8], edi
je 0x40c255
push eax
call ebx
push dword [0x45f5e8]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40c255
test eax, eax
je 0x40c255
call ecx
test eax, eax
je 0x40c24a
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40c24a
test byte [ebp - 8], 1
jne 0x40c255
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40c285
mov eax, dword [0x45f5dc]
cmp eax, edi
je 0x40c282
push eax
call ebx
test eax, eax
je 0x40c282
call eax
mov esi, eax
test esi, esi
je 0x40c282
mov eax, dword [0x45f5e0]
cmp eax, edi
je 0x40c282
push eax
call ebx
test eax, eax
je 0x40c282
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x45f5d8]
call ebx
test eax, eax
je 0x40c29d
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40c29f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403d87
mov esp, ebp
pop ebp
ret
Function at 0x44ef1c
Capabilities:
Encode data using xor

Disassembly:
push ebp
jmp 0x44edd1
mov ebp, esp
push 0xfffffffffffffffe
push 0x4b2b40
push 0x4a4f00
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
jmp 0x44ef1c
mov dword [ebp - 0x18], esp
push 0x44f0d8
ret
push esi
push edi
mov eax, dword [0x5be670]
xor dword [ebp - 8], eax
je 0x44f13b
jne 0x44f13b
mov dword [0x112b7d10], eax
push 0x697ddd80
mov ecx, 0x103e71f8
cmp byte [0x699d1180], 0
xchg byte [ecx + ebp*2 - 0x28], ah
cmp word [ecx + 0x1c], 0
push 0xaa388c
cmp dword [0xdeb2ec], eax
mov dword [0x424ce4], edi
mov eax, 0xfd7e68
mov eax, 0x100cb118
push 0x4e5c5d
cmp eax, dword [0x448168]
movzx ecx, byte [eax + 0x927900]
xor dword [ebp + edi*8 - 0x57], 0xd2886f7b
jecxz 0x44ef5c
ret 0x1a27
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
je 0x44eeda
jne 0x44eeda
mov eax, str.h_a_
and eax, 0xfffff
jmp dword [0x432270]
Function at 0x524f20
Capabilities:
Encode data using xor

Disassembly:
dec eax
mov esp, 0x31de58b7
pop eax
fidiv word [ecx]
mov byte [esi - 0x4d], 0x2a
nop
cwde
xchg ebp, eax
push ebx
mov edi, 0xaf6a94bd
push eax
inc ecx
cmpsb byte [esi], byte es:[edi]
out dx, eax
insd dword es:[edi], dx
xor esi, edi
or al, 0xf0
mov dword [0xbe71ff34], eax
xor edi, dword es:[ecx - 0x6f6456ff]
dec edi
arpl word [esi], cx
rcl dword [ebp - 0x59], 0xbe
in eax, dx
or al, 0x94
aam 0xb4
mov cl, 0x95
adc ah, ah
lds edx, [ebp - 0x5b]
mov ds, word [ebx - 0x23160fca]
pop eax
push eax
jg 0x524f23
push ss
out dx, eax
hlt
Function at 0x401207
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
mov eax, dword [0x4182d8]
and dword [ebp - 0x18], 0
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [0x4182dc]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], eax
mov esi, dword [edi]
mov edx, dword [edi + 4]
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], edx
call fcn.00401200
mov ebx, dword [ebp - 0x18]
add ebx, 0x23f
cmp dword [0xae0124], 0x14
jne 0x401265
push 0
lea eax, [ebp - 0x830]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov edx, dword [ebp - 0xc]
mov ecx, dword [0x4182e0]
mov eax, dword [0x4182e4]
push 0x20
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
pop edi
mov dword [ebp - 0x1c], 2
add dword [ebp - 0x1c], 3
mov eax, esi
mov dword [ebp - 0xc], 0xedeb2e40
shl eax, 4
add eax, ecx
cmp dword [0xae0124], 0xfa9
mov dword [ebp - 8], eax
mov eax, dword [0xae0120]
cmove eax, dword [ebp - 0xc]
and dword [ebp - 0xc], 0
cmp dword [0xae0124], 0x3eb
mov dword [0xae0120], eax
mov eax, dword [0xae0078]
cmove eax, dword [ebp - 0xc]
mov dword [0xae0078], eax
lea eax, [ebx + esi]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
shr eax, 5
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
and dword [ebp - 0x10], 0
mov dword [0xae011c], 0xf4ea3dee
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
xor eax, dword [ebp - 4]
sub edx, eax
mov dword [ebp - 0x14], eax
mov eax, edx
mov dword [ebp - 0xc], edx
shl eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x28]
add dword [ebp - 8], eax
mov ecx, dword [ebp - 0x1c]
lea eax, [ebx + edx]
and dword [ebp - 4], 0
mov dword [ebp - 0x18], eax
mov eax, edx
shr eax, cl
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
xor dword [ebp - 0x10], eax
cmp dword [0xae0124], 0xb03
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jne 0x401363
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
xor eax, dword [ebp - 0x14]
add ebx, 0x61c88647
mov ecx, dword [ebp - 0x24]
sub esi, eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], esi
dec edi
jne 0x401279
mov edi, dword [ebp - 0x2c]
mov dword [edi], esi
mov dword [edi + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c062
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x417f10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00407f6c
mov dword [ebp - 0x14], eax
cmp dword [0x43b914], esi
jne 0x40c155
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40c0e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40c235
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40c235
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c235
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x43b914], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x43b918], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x43b91c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x43b924], eax
test eax, eax
je 0x40c152
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x43b920], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40c17a
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40c16d
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40c18f
push 4
pop eax
jmp 0x40c237
cmp dword [ebp - 0x14], esi
je 0x40c18f
push dword [0x43b914]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40c174
mov eax, dword [0x43b920]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40c1ed
cmp dword [0x43b924], edi
je 0x40c1ed
push eax
call ebx
push dword [0x43b924]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40c1ed
test eax, eax
je 0x40c1ed
call ecx
test eax, eax
je 0x40c1e2
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40c1e2
test byte [ebp - 8], 1
jne 0x40c1ed
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40c21d
mov eax, dword [0x43b918]
cmp eax, edi
je 0x40c21a
push eax
call ebx
test eax, eax
je 0x40c21a
call eax
mov esi, eax
test esi, esi
je 0x40c21a
mov eax, dword [0x43b91c]
cmp eax, edi
je 0x40c21a
push eax
call ebx
test eax, eax
je 0x40c21a
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x43b914]
call ebx
test eax, eax
je 0x40c235
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40c237
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004040a8
mov esp, ebp
pop ebp
ret
Function at 0x4030f0
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403988
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x586024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403a20
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403a00
xor eax, eax
push ebp
push 0x4039f9
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 0x403a3c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403a00
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x586024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x586024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404898
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x58a04c], 0
je 0x4048f9
cmp word [0x58a220], 0xd7b2
jne 0x4048c1
cmp dword [0x58a228], 0
jbe 0x4048c1
mov eax, 0x58a21c
call dword [0x58a238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404920
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x586030], 0
jne 0x404915
push 0
push 0x586764
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404a50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x586034], 0
je 0x404a76
mov edx, esi
mov eax, ebx
call dword [0x586034]
jmp 0x404a85
mov eax, 8
call fcn.00402dd8
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x58a04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404a18
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc