joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001500
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x10008040]
xor eax, esp
mov dword [esp + 0x10], eax
cmp dword [0x100080b4], 0
push ebx
push esi
push edi
mov ebx, ecx
je 0x1000169b
mov eax, dword [0x100080b0]
cmp dword [0x100080a0], eax
jne 0x10001576
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x27
call esi
test al, 1
je 0x1000154e
mov eax, dword [0x100084d8]
cmp eax, 1
jge 0x10001565
inc eax
jmp 0x10001560
push 0x25
call esi
test al, 1
je 0x10001565
mov eax, dword [0x100084d8]
test eax, eax
jle 0x10001565
dec eax
mov dword [0x100084d8], eax
mov eax, dword [0x100080b0]
cmp dword [0x100080a0], eax
je 0x10001603
cmp dword [0x100084d8], 0
jle 0x10001603
mov edi, dword [sym.imp.USER32.dll_SetRect]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [0x100080a4]
add ecx, dword [0x100080ac]
add eax, 0xfffffffd
push ecx
push eax
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call edi
mov eax, dword [0x100084e0]
lea edx, [esp + 0xc]
push 0xffffff33
push 0x100
push edx
mov ecx, dword [eax]
push 0xffffffffffffffff
push ebx
push 0
push eax
call dword [ecx + 0x38]
mov eax, dword [0x100084d8]
mov ecx, dword [0x100080b0]
shl ecx, 4
sub ecx, dword [0x100080b0]
mov esi, dword [eax*4 + 0x10008098]
add ecx, dword [0x100080ac]
mov eax, dword [0x100080a4]
push ecx
add eax, 0x7d
push eax
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call edi
push 0xffffff33
jmp 0x1000167b
mov edi, dword [sym.imp.USER32.dll_SetRect]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [0x100080a4]
add ecx, dword [0x100080ac]
add eax, 0xfffffffd
push ecx
push eax
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call edi
mov eax, dword [0x100084e0]
lea edx, [esp + 0xc]
push 0xfffffffffffffff9
push 0x100
push edx
mov ecx, dword [eax]
push 0xffffffffffffffff
push ebx
push 0
push eax
call dword [ecx + 0x38]
mov eax, dword [0x100084d8]
mov ecx, dword [0x100080b0]
shl ecx, 4
sub ecx, dword [0x100080b0]
mov esi, dword [eax*4 + 0x10008098]
add ecx, dword [0x100080ac]
mov eax, dword [0x100080a4]
push ecx
add eax, 0x7d
push eax
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
call edi
push 0xfffffffffffffff9
mov eax, dword [0x100084e0]
lea edx, [esp + 0x10]
push 0x100
push edx
push 0xffffffffffffffff
mov ecx, dword [eax]
push esi
push 0
push eax
call dword [ecx + 0x38]
inc dword [0x100080b0]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100046b0
mov esp, ebp
pop ebp
ret
Function at 0x100016b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10008040]
xor eax, ebp
mov dword [ebp - 4], eax
movaps xmm0, xmmword [0x100062f0]
xor ecx, ecx
mov dword [0x100084d4], 0x3729a770
mov word [ebp - 8], 0x100
movups xmmword [ebp - 0x18], xmm0
cmp dword [0x100084d8], ecx
je 0x10001700
lea eax, [ecx - 0x18]
xor byte [ebp + ecx - 0x18], al
inc ecx
cmp ecx, 0x10
jb 0x100016e5
push 0x40000000
jmp 0x1000170f
lea eax, [ecx - 0x18]
xor byte [ebp + ecx - 0x18], al
inc ecx
cmp ecx, 0x10
jb 0x10001700
push 0
lea eax, [ebp - 0x18]
mov byte [ebp - 7], 0
push eax
mov eax, 0x3729a770
call eax
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
call fcn.100046b0
mov esp, ebp
pop ebp
ret

Function at 0x10001c40
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
jne 0x10001cbf
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.100011c0
test esi, esi
je 0x10001ca9
push edi
mov edi, dword [esi + 0x3c]
lea eax, [ebp + 0xc]
push eax
push 4
push 0x40
push esi
add edi, esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001c7e
push 0x40
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test edi, edi
je 0x10001ca8
lea eax, [ebp + 0xc]
push eax
push 4
push 0xf8
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001ca8
push 0xf8
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
pop edi
push 0
push 0
push 0
push 0x10001b00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop esi
mov eax, 1
pop ebp
ret 0xc

Function at 0x10001e20
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
sub eax, 0x10000
push eax
call fcn.10001fd0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jbe 0x10001eed
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10001e6a
mov eax, dword [ebp - 4]
cmp eax, dword [0x10008004]
ja 0x10001e6a
mov ecx, dword [ebp - 4]
sub ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10001e3a
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10001e90
jmp 0x10001eed
cmp dword [ebp - 0x14], 0x10000
jne 0x10001ed3
cmp dword [ebp - 0x18], 0x10000
jb 0x10001ed3
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10001ec6
mov eax, dword [ebp - 8]
jmp 0x10001eef
mov eax, dword [ebp - 4]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10001ee8
mov ecx, dword [ebp - 0x20]
sub ecx, 0x10000
push ecx
call fcn.10001fd0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10001e3a
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10001f00
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push eax
call fcn.10002000
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x10001fc5
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10001f45
mov eax, dword [ebp - 4]
cmp eax, dword [0x10008004]
ja 0x10001f45
mov ecx, dword [ebp - 4]
add ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10001f15
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10001f6b
jmp 0x10001fc5
cmp dword [ebp - 0x14], 0x10000
jne 0x10001fae
cmp dword [ebp - 0x18], 0x10000
jb 0x10001fae
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10001fa1
mov eax, dword [ebp - 8]
jmp 0x10001fc7
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10001fc0
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x18]
push ecx
call fcn.10002000
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10001f15
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x414df3
Capabilities:
Encode data using xor

Disassembly:
xor dword [esi], ecx
add esi, 4
cmp esi, ebx
jne fcn.00414df3
ret

Function at 0x1000125c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0xc], 0
call sub.KERNEL32.DLL_GetEnvironmentStringsA
mov ebx, eax
mov dword [ebp - 0x10], ebx
jmp 0x10001299
cmp byte [ebx], 0x3d
je 0x10001285
inc dword [ebp - 0xc]
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
lea ebx, [ebx + edi]
cmp byte [ebx], 0
jne 0x10001278
mov edi, dword [ebp - 0xc]
inc edi
lea edi, [edi*4]
mov dword [ebp - 0x14], edi
push dword [ebp - 0x14]
call sub.CRTDLL.DLL_malloc
pop ecx
mov dword [ebp - 8], eax
mov dword [0x10003010], eax
cmp dword [ebp - 8], 0
jne 0x100012cc
xor eax, eax
jmp 0x10001342
mov ebx, dword [ebp - 0x10]
jmp 0x10001325
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
mov dword [ebp - 4], edi
cmp byte [ebx], 0x3d
je 0x1000131f
push dword [ebp - 4]
call sub.CRTDLL.DLL_malloc
pop ecx
mov esi, dword [ebp - 8]
mov dword [esi], eax
or eax, eax
jne 0x10001308
jmp 0x10001342
push ebx
mov edi, dword [ebp - 8]
push dword [edi]
call sub.CRTDLL.DLL_strcpy
add esp, 8
add dword [ebp - 8], 4
mov edx, dword [ebp - 4]
lea ebx, [ebx + edx]
cmp byte [ebx], 0
jne 0x100012d1
mov edx, dword [ebp - 8]
mov dword [edx], 0
mov eax, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x435b50
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x19000]
push edi
or ebp, 0xffffffff
jmp 0x435b72
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x435b79
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x435b68
mov eax, 1
add ebx, ebx
jne 0x435b8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x435b80
jne 0x435b9c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x435b80
xor ecx, ecx
sub eax, 3
jb 0x435bb0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x435c22
mov ebp, eax
add ebx, ebx
jne 0x435bbb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x435bc8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x435bec
inc ecx
add ebx, ebx
jne 0x435bd8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x435bcd
jne 0x435be9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x435bcd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x435c0c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x435bfd
jmp 0x435b6e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x435c0c
add edi, ecx
jmp 0x435b6e
pop esi
mov edi, esi
mov ecx, 0x12
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x435c2a
cmp byte [edi], 0x2a
jne 0x435c2a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x435c2f
lea edi, [esi + 0x33000]
mov eax, dword [edi]
or eax, eax
je 0x435c9e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x40024]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x40118]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x435c5c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x40120]
or eax, eax
je 0x435c98
mov dword [ebx], eax
add ebx, 4
jmp 0x435c79
call dword [esi + 0x4011c]
mov ebp, dword [esi + 0x40124]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1ff]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x435cd2
sub esp, 0xffffff80
jmp 0x413004
Function at 0x402f89
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
push esi
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xfc], 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x198], 0
mov dword [ebp - 0xc], 0
mov ecx, 5
mov esi, 0x456098
lea edi, [ebp - 0x4c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x94
push 0
lea eax, [ebp - 0x194]
push eax
call fcn.00429b30
add esp, 0xc
mov word [ebp - 0x46], 0x67
mov word [ebp - 0x3e], 0x37
mov word [ebp - 0x3c], 0x32
push 0xa8
push 0
lea ecx, [ebp - 0xf4]
push ecx
call fcn.00429b30
add esp, 0xc
push 0
mov edx, dword [ebp - 0x100]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
lea eax, [ebp - 0x30]
push eax
push 0x65
call fcn.00401467
add esp, 8
mov dword [ebp - 4], eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x100], eax
mov dword [ebp - 0x100], 0
cmp dword [ebp - 0x198], 0
jne 0x4030ab
mov ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx]
cmp edx, 0x41
je 0x4030ab
mov eax, dword [ebp - 0x2c]
movsx ecx, byte [eax + 1]
cmp ecx, 0x42
je 0x4030ab
push 4
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 4]
push eax
call fcn.00429b90
add esp, 0xc
push 0
push 0x402f64
push 0
mov ecx, dword [ebp - 0x100]
push ecx
call dword [sym.imp.GDI32.dll_EnumObjects]
mov edx, dword [ebp - 0x30]
mov eax, dword [0x452a30]
mov dword [edx + 0x1a0], eax
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x160], 0xdf02b408
mov edx, dword [ebp - 0x30]
push edx
call fcn.0040150e
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x12c]
mov dword [ebp - 0x198], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x1a4], 1
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1a4], 0
je 0x40311a
mov ecx, dword [ebp - 4]
mov dword [ecx + 0xfc], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x12c]
mov dword [0x4565a0], eax
mov eax, dword [ebp - 4]
jmp 0x403136
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0xa
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401496
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
and dword [ebp - 0x14], 0
push ebx
push esi
mov esi, ecx
lea ecx, [ebp - 0x14]
push edi
mov dword [ebp - 0x34], esi
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dword [ebp - 8], eax
mov eax, dword [0x41b5d0]
mov dword [ebp - 0x28], eax
mov eax, dword [0x41b5d4]
mov dword [ebp - 0x30], eax
call fcn.0040148f
mov edi, dword [ebp - 0x14]
mov eax, dword [0x41b5d8]
add edi, 0x23f
mov dword [ebp - 0x20], eax
mov eax, dword [0x41b5dc]
push 0x20
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x24], eax
pop esi
mov dword [ebp - 0x18], 2
add dword [ebp - 0x18], 3
mov edx, dword [ebp - 8]
mov eax, edx
mov ecx, dword [0x2d39b4c]
shl eax, 4
mov dword [ebp - 4], eax
cmp ecx, 0xc
jne 0x40151f
push 0x418248
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [0x2d39b4c]
add eax, dword [ebp - 0x20]
cmp ecx, 0xfa9
mov dword [ebp - 4], eax
mov eax, dword [0x2d39b48]
mov dword [ebp - 0x1c], 0xedeb2e40
cmove eax, dword [ebp - 0x1c]
and dword [ebp - 0x1c], 0
cmp ecx, 0x3eb
mov dword [0x2d39b48], eax
mov eax, dword [0x2d39aa0]
cmove eax, dword [ebp - 0x1c]
mov dword [0x2d39aa0], eax
lea eax, [edi + edx]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
shr eax, 5
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov dword [0x2d39b44], 0xf4ea3dee
call fcn.0040146c
mov ecx, dword [ebp - 0x10]
xor ecx, eax
sub ebx, ecx
mov dword [ebp - 0x10], ecx
mov eax, ebx
mov dword [ebp - 0x2c], ebx
shl eax, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x28]
add dword [ebp - 4], eax
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x14]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x2c]
nop
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
mov eax, ebx
shr eax, cl
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
xor eax, dword [ebp - 0x1c]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
sub dword [ebp - 8], eax
add edi, 0x61c88647
mov dword [ebp - 0x14], edi
dec esi
jne 0x4014e7
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 8]
pop edi
mov dword [esi + 4], ebx
mov dword [esi], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4015ef
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x2d39b4c]
push esi
mov esi, eax
shr esi, 3
push edi
mov edi, dword [0x2d39aa4]
test esi, esi
je 0x401632
cmp eax, 0x959
jne 0x40161e
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, edi
call fcn.00401496
add edi, 8
dec esi
je 0x401632
mov eax, dword [0x2d39b4c]
jmp 0x401605
pop edi
pop esi
ret 4
Function at 0x40d179
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41a36c]
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.00405045
mov dword [ebp - 0x14], eax
cmp dword [0x440200], esi
jne 0x40d26c
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40d1f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40d34c
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40d34c
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d34c
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x440200], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x440204], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x440208], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x440210], eax
test eax, eax
je 0x40d269
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x44020c], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40d291
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d284
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40d2a6
push 4
pop eax
jmp 0x40d34e
cmp dword [ebp - 0x14], esi
je 0x40d2a6
push dword [0x440200]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40d28b
mov eax, dword [0x44020c]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40d304
cmp dword [0x440210], edi
je 0x40d304
push eax
call ebx
push dword [0x440210]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40d304
test eax, eax
je 0x40d304
call ecx
test eax, eax
je 0x40d2f9
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 0x40d2f9
test byte [ebp - 8], 1
jne 0x40d304
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40d334
mov eax, dword [0x440204]
cmp eax, edi
je 0x40d331
push eax
call ebx
test eax, eax
je 0x40d331
call eax
mov esi, eax
test esi, esi
je 0x40d331
mov eax, dword [0x440208]
cmp eax, edi
je 0x40d331
push eax
call ebx
test eax, eax
je 0x40d331
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x440200]
call ebx
test eax, eax
je 0x40d34c
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40d34e
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040432b
mov esp, ebp
pop ebp
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41cae4
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cb15
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cafd
add dl, dl
jne 0x41cb20
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cb71
xor eax, eax
add dl, dl
jne 0x41cb2d
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cc0e
add dl, dl
jne 0x41cb3c
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cb47
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cb52
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cb5d
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cb67
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cb0c
mov eax, 1
add dl, dl
jne 0x41cb7f
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cb8a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cb76
sub eax, ebx
mov ebx, 1
jne 0x41cbbd
mov ecx, 1
add dl, dl
jne 0x41cba3
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cbae
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cb9a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cb0c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41cbd4
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cbdf
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cbcb
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cb0c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41cc2f
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cb0c
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41d7a8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
test dl, dl
je 0x41d7bb
add esp, 0xfffffff0
call fcn.00403da8
mov esi, ecx
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.00403b30
mov byte [ebx + 4], 0
cmp dword [esi + 0x5c], 0
jne 0x41d7e1
cmp dword [esi + 0x58], 0x40
jb 0x41d9c7
jmp 0x41d7e7
jl 0x41d9c7
lea eax, [ebx + 0xc]
mov edx, 0x40
call fcn.00406e80
push 0
push 0
push 0
push 0x40
lea edx, [ebx + 0xc]
mov eax, esi
call fcn.0041d364
cmp word [ebx + 0xc], 0x5a4d
jne 0x41d9c7
mov ecx, dword [ebx + 0x48]
test ecx, ecx
jle 0x41d9c7
cmp ecx, 0x10000
jge 0x41d9c7
mov eax, ecx
add eax, 4
add eax, 0x14
cdq
cmp edx, dword [esi + 0x5c]
jne 0x41d842
cmp eax, dword [esi + 0x58]
ja 0x41d9c7
jmp 0x41d848
jg 0x41d9c7
lea eax, [ebx + 0x4c]
mov edx, 4
call fcn.00406e80
mov eax, dword [ebx + 0x48]
cdq
push edx
push eax
push 0
push 4
lea edx, [ebx + 0x4c]
mov eax, esi
call fcn.0041d364
cmp dword [ebx + 0x4c], 0x4550
jne 0x41d9c7
lea eax, [ebx + 0x50]
mov edx, 0x14
call fcn.00406e80
mov eax, dword [ebx + 0x48]
add eax, 4
cdq
push edx
push eax
push 0
push 0x14
lea edx, [ebx + 0x50]
mov eax, esi
call fcn.0041d364
mov ax, word [ebx + 0x50]
cmp ax, 0x8664
jne 0x41d8ff
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
add eax, 0xf0
cdq
cmp edx, dword [esi + 0x5c]
jne 0x41d8c3
cmp eax, dword [esi + 0x58]
ja 0x41d950
jmp 0x41d8c9
jg 0x41d950
lea eax, [ebx + 0x144]
mov edx, 0xf0
call fcn.00406e80
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
cdq
push edx
push eax
push 0
push 0xf0
lea edx, [ebx + 0x144]
mov eax, esi
call fcn.0041d364
mov byte [ebx + 4], 1
jmp 0x41d950
cmp ax, 0x14c
jne 0x41d950
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
add eax, 0xe0
cdq
cmp edx, dword [esi + 0x5c]
jne 0x41d920
cmp eax, dword [esi + 0x58]
ja 0x41d950
jmp 0x41d922
jg 0x41d950
lea eax, [ebx + 0x64]
mov edx, 0xe0
call fcn.00406e80
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
cdq
push edx
push eax
push 0
push 0xe0
lea edx, [ebx + 0x64]
mov eax, esi
call fcn.0041d364
mov byte [ebx + 4], 1
cmp byte [ebx + 4], 0
je 0x41d9c7
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
movzx edx, word [ebx + 0x60]
add eax, edx
mov di, word [ebx + 0x52]
movzx edx, di
shl edx, 3
lea edx, [edx + edx*4]
add eax, edx
cdq
cmp edx, dword [esi + 0x5c]
jne 0x41d981
cmp eax, dword [esi + 0x58]
ja 0x41d9c7
jmp 0x41d983
jg 0x41d9c7
movzx eax, di
push eax
lea eax, [ebx + 8]
mov ecx, 1
mov edx, dword [0x30de27c]
call fcn.00405b74
add esp, 4
mov eax, dword [ebx + 0x48]
add eax, 4
add eax, 0x14
movzx edx, word [ebx + 0x60]
add eax, edx
cdq
push edx
push eax
movzx eax, word [ebx + 0x52]
shl eax, 3
lea eax, [eax + eax*4]
xor edx, edx
push edx
push eax
mov edx, dword [ebx + 8]
mov eax, esi
call fcn.0041d364
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x41d9de
call fcn.00403e00
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret