joyce8/EMBER2024-capa huggingface dataset:
Function at 0x479028
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov edi, eax
xor eax, eax
push ebp
push 0x4790e0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x44]
lea edx, [ebp - 0x28]
mov eax, edi
call fcn.00478fc0
test al, al
je 0x4790c2
mov ecx, dword [ebp - 0x1c]
inc ecx
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00404e40
mov ebx, dword [ebp - 0x20]
dec ebx
test ebx, ebx
jl 0x4790c2
inc ebx
xor esi, esi
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 8], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
call fcn.00405210
push eax
push esi
mov eax, dword [edi + 4]
push eax
call sub.advapi32.dll_RegEnumValueA
mov eax, dword [ebp - 0xc]
call fcn.00405210
mov edx, eax
lea eax, [ebp - 0x2c]
call fcn.00404f48
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc esi
dec ebx
jne 0x47907b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4790e7
lea eax, [ebp - 0x2c]
call fcn.00404d50
lea eax, [ebp - 0xc]
call fcn.00404d50
ret

Function at 0x4791e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 4]
push eax
push 0
mov eax, esi
call fcn.00405210
push eax
mov eax, dword [ebx + 4]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x479238
mov dword [ebp - 0xc], esi
mov byte [ebp - 8], 0xb
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [0x4e818c]
mov dl, 1
mov eax, dword [0x478c68]
call fcn.0040d420
call fcn.004046c0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
call fcn.00478d70
mov edx, dword [ebp + 8]
mov byte [edx], al
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x47f898
Capabilities:
Set global application hook

Disassembly:
cmp dword [0x4e9c34], 0
jne 0x47f8bb
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x47f80c
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x4e9c34], eax
ret
Function at 0x481d08
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
lea eax, [ebp - 0x10]
mov edx, dword [0x41945c]
call fcn.00405748
xor eax, eax
push ebp
push 0x481e4c
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4e6964], 0
jne 0x481d5b
mov ecx, dword [0x4e798c]
mov dl, 1
mov eax, dword [0x4084b8]
call fcn.0040d3e4
call fcn.004046c0
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.00403594
mov eax, ebx
call fcn.004055f4
mov dword [ebp - 0x1c], eax
push esi
push edi
mov esi, 0x481e5c
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.004069bc
xor eax, eax
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00405604
test eax, eax
jle 0x481df3
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetComputerNameA
test eax, eax
je 0x481dec
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.00404fd8
mov eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x40]
mov ecx, 0x10
call fcn.00404fc0
mov eax, dword [ebp - 0x48]
pop edx
call fcn.004093c0
test eax, eax
jne 0x481dec
mov ebx, 0x15
jmp 0x481df8
mov ebx, 0x10
jmp 0x481df8
mov ebx, 0x15
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push esi
call dword [0x4e6964]
call fcn.00481b80
mov eax, dword [ebp - 8]
call fcn.00481b80
mov eax, edi
mov edx, dword [ebp - 0xc]
call fcn.004069d4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x481e53
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.00404d74
lea eax, [ebp - 0x10]
mov edx, dword [0x41945c]
call fcn.00405818
ret
Function at 0x4970c8
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x4970d0
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4972c2
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebx + 8]
lea ecx, [ebp - 0xc]
mov edx, 0x4972d8
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0xc]
lea eax, [ebx + 0xc]
call fcn.00404da4
lea ecx, [ebp - 0x10]
mov edx, 0x4972ec
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0x10]
lea eax, [ebx + 0x28]
call fcn.00404da4
lea ecx, [ebp - 0x14]
mov edx, 0x497304
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0x14]
lea eax, [ebx + 0x10]
call fcn.00404da4
lea ecx, [ebp - 0x18]
mov edx, 0x497320
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0x18]
lea eax, [ebx + 0x14]
call fcn.00404da4
lea ecx, [ebp - 0x1c]
mov edx, 0x49733c
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0x1c]
lea eax, [ebx + 0x24]
call fcn.00404da4
lea ecx, [ebp - 0x24]
mov edx, 0x497354
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x20]
call fcn.00409430
mov eax, dword [ebp - 0x20]
or edx, 0xffffffff
call fcn.004099cc
mov edi, eax
mov dword [ebx + 0x18], edi
test edi, edi
setge al
mov byte [ebx + 0x4c], al
lea ecx, [ebp - 0x28]
mov edx, 0x49736c
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x28]
call fcn.0048e8f0
fstp qword [ebx + 0x30]
wait
lea ecx, [ebp - 0x2c]
mov edx, 0x49737c
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x2c]
call fcn.0048e8f0
fstp qword [ebx + 0x40]
wait
lea ecx, [ebp - 0x30]
mov edx, 0x497394
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x30]
or edx, 0xffffffff
call fcn.004099cc
inc eax
je 0x497265
lea ecx, [ebp - 0x34]
mov edx, 0x497394
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x34]
call fcn.00409990
mov edi, eax
mov eax, edi
mov ecx, 0xe10
cdq
idiv ecx
mov dword [ebp - 8], eax
mov eax, edi
mov ecx, 0xe10
cdq
idiv ecx
mov ecx, edx
mov eax, ecx
push ecx
mov ecx, 0x3c
cdq
idiv ecx
pop ecx
mov dword [ebp - 4], eax
mov eax, ecx
mov ecx, 0x3c
cdq
idiv ecx
mov edi, edx
push 0
mov ecx, edi
mov dx, word [ebp - 4]
mov ax, word [ebp - 8]
call fcn.0040b150
fstp qword [ebp - 0x3c]
wait
call fcn.0040b4c0
fadd qword [ebp - 0x3c]
fstp qword [ebx + 0x38]
wait
jmp 0x497280
lea ecx, [ebp - 0x40]
mov edx, 0x497394
mov eax, esi
call fcn.00494f40
mov eax, dword [ebp - 0x40]
call fcn.0048e8f0
fstp qword [ebx + 0x38]
wait
lea ecx, [ebp - 0x44]
mov edx, 0x4973a4
mov eax, esi
call fcn.00494f40
mov edx, dword [ebp - 0x44]
lea eax, [ebx + 0x48]
call fcn.00404da4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4972c9
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00404d74
lea eax, [ebp - 0x34]
mov edx, 0xb
call fcn.00404d74
ret
Function at 0x4a1df4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4a1f2e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0041d2c0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x30], 2
jne 0x4a1e70
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x4a1e70
lea ecx, [ebp - 0x18]
xor edx, edx
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
call fcn.004091b8
mov edx, dword [ebp - 0x14]
mov ebx, dword [0x4e7a20]
mov ebx, dword [ebx]
mov eax, 0x4a1f44
call ebx
dec eax
jne 0x4a1e70
mov ebx, 1
jmp 0x4a1e72
xor ebx, ebx
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
sub eax, ebx
jl 0x4a1f13
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x1c]
call fcn.0049998c
test al, al
jne 0x4a1f07
mov eax, dword [ebp - 4]
call fcn.004a1de8
mov ebx, eax
lea ecx, [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov esi, dword [eax]
call dword [esi + 0xc]
mov edx, dword [ebp - 0x20]
lea eax, [ebx + 0x1c]
call fcn.00404da4
xor edx, edx
push ebp
push 0x4a1ef5
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x30]
test al, al
je 0x4a1eeb
mov edx, eax
mov ecx, ebx
mov eax, dword [ebp - 4]
call fcn.004a2208
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a1f07
inc dword [ebp - 0xc]
dec dword [ebp - 0x10]
jne 0x4a1e8a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a1f35
lea eax, [ebp - 0x20]
mov edx, 4
call fcn.00404d74
ret

Function at 0x4bbe98
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, eax
push 0x104
lea eax, [ebp - 0x104]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
lea eax, [ebp - 0x104]
call fcn.004bbe60
mov eax, dword [ebx]
call fcn.00405010
mov edx, dword [ebx]
cmp byte [edx + eax - 1], 0x5c
je 0x4bbede
mov eax, ebx
mov edx, 0x4bbeec
call fcn.00405018
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4bbef0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, eax
push 0x104
lea eax, [ebp - 0x104]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, ebx
lea eax, [ebp - 0x104]
call fcn.004bbe60
mov eax, dword [ebx]
call fcn.00405010
mov edx, dword [ebx]
cmp byte [edx + eax - 1], 0x5c
je 0x4bbf36
mov eax, ebx
mov edx, 0x4bbf44
call fcn.00405018
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4bec3c
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
mov eax, esp
mov edx, 0x94
call fcn.00407e8c
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
cmp dword [esp + 4], 5
jb 0x4bec70
cmp dword [esp + 8], 1
jb 0x4bec70
cmp dword [esp + 0x10], 2
je 0x4bec74
xor eax, eax
jmp 0x4bec76
mov al, 1
add esp, 0x94
ret

Function at 0x4c3c5c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2c]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
dec ecx
js 0x4c3cad
lea eax, [ebp - 0x2c]
cmp word [eax + 0x20], 3
je 0x4c3c94
mov eax, dword [edx + ecx*4]
bswap eax
shr eax, 8
mov dword [edx + ecx*4], eax
dec ecx
jns 0x4c3c84
jmp 0x4c3cad
push ebx
xor ebx, ebx
mov eax, dword [edx + ecx*4]
mov bh, al
mov bl, ah
shr eax, 0x10
shl ebx, 8
mov bl, al
mov dword [edx + ecx*4], ebx
dec ecx
jns 0x4c3c95
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40cac0
Capabilities:
Parse pe header

Disassembly:
push 0x74
push 0x40ec30
call fcn.0040cff4
xor ebx, ebx
mov dword [ebp - 0x20], ebx
push ebx
mov edi, dword [0x40e03c]
call edi
cmp word [eax], 0x5a4d
jne 0x40cb00
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40cb00
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40cb18
cmp eax, 0x20b
je 0x40cb05
mov dword [ebp - 0x1c], ebx
jmp 0x40cb2c
cmp dword [ecx + 0x84], 0xe
jbe 0x40cb00
xor eax, eax
cmp dword [ecx + 0xf8], ebx
jmp 0x40cb26
cmp dword [ecx + 0x74], 0xe
jbe 0x40cb00
xor eax, eax
cmp dword [ecx + 0xe8], ebx
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
push 2
call dword [0x40e17c]
pop ecx
or dword [0x4145e8], 0xffffffff
or dword [0x4145ec], 0xffffffff
call dword [0x40e0e0]
mov ecx, dword [0x412984]
mov dword [eax], ecx
call dword [0x40e0e4]
mov ecx, dword [0x412980]
mov dword [eax], ecx
mov eax, dword [0x40e0e8]
mov eax, dword [eax]
mov dword [0x4145e4], eax
call fcn.0040ceff
call fcn.0040cfc7
cmp dword [0x412870], ebx
jne 0x40cb8c
push 0x40cfbf
call dword [0x40e0ec]
pop ecx
call fcn.0040cf9d
push 0x411010
push 0x41100c
call fcn.0040cf92
push 0x40cf48
call fcn.0040cee8
mov eax, dword [0x41297c]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x412978]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
call dword [0x40e0f4]
add esp, 0x20
mov dword [ebp - 0x3c], eax
cmp eax, ebx
jge 0x40cbe0
push 8
call fcn.0040cea6
pop ecx
push 0x411008
push 0x411000
call fcn.0040cf92
pop ecx
pop ecx
mov eax, dword [0x40e0fc]
mov esi, dword [eax]
mov dword [ebp - 0x24], esi
mov al, byte [esi]
cmp al, 0x20
ja 0x40cc5e
cmp al, bl
je 0x40cc0a
cmp dword [ebp - 0x20], ebx
jne 0x40cc5e
mov al, byte [esi]
cmp al, bl
je 0x40cc1a
cmp al, 0x20
ja 0x40cc1a
inc esi
mov dword [ebp - 0x24], esi
jmp 0x40cc0a
mov dword [ebp - 0x58], ebx
lea eax, [ebp - 0x84]
push eax
call dword [0x40e030]
test byte [ebp - 0x58], 1
je 0x40cc36
movzx eax, word [ebp - 0x54]
jmp 0x40cc39
push 0xa
pop eax
push eax
push esi
push ebx
push ebx
call edi
push eax
call fcn.004027e0
mov esi, eax
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x1c], ebx
jne 0x40cc56
push esi
call dword [0x40e100]
call dword [0x40e104]
jmp 0x40ccb3
cmp al, 0x22
jne 0x40cc6d
xor ecx, ecx
cmp dword [ebp - 0x20], ebx
sete cl
mov dword [ebp - 0x20], ecx
movzx eax, al
push eax
call dword [0x40e108]
pop ecx
test eax, eax
je 0x40cc80
inc esi
mov dword [ebp - 0x24], esi
inc esi
jmp 0x40cbf8
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.0040d02f
ret
Function at 0x401adf
Capabilities:
Create thread

Disassembly:
mov edi, edi
push esi
push 0x403014
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov esi, eax
test esi, esi
jne 0x401b25
push 4
call fcn.004014f5
pop ecx
xor ecx, ecx
push ecx
push ecx
push eax
push 0x401aaf
push ecx
push ecx
mov dword [eax], reloc.KERNEL32.dll_HeapAlloc
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x401b20
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401b25
call fcn.00401853
mov eax, esi
pop esi
ret

Function at 0x4024f7
Capabilities:
Terminate process

Disassembly:
push 0x58
push 0x402a28
call fcn.00402854
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], HeapAlloc
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
mov esi, ebx
push ebx
push edi
push 0x4036b8
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x40236c
cmp eax, edi
jne 0x40235f
xor edi, edi
inc edi
mov esi, edi
jmp 0x40236f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402343
xor edi, edi
inc edi
cmp dword [0x4036bc], edi
jne 0x402381
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x4023af
cmp dword [0x4036bc], ebx
jne 0x4023a9
mov dword [0x4036bc], edi
push 0x40101c
push 0x401010
call fcn.004022e3
pop ecx
pop ecx
test eax, eax
je 0x4023af
jmp 0x4024e0
mov dword [0x40322c], edi
cmp dword [0x4036bc], edi
jne 0x4023d2
push 0x40100c
push section..text
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x4036bc], 2
test esi, esi
jne 0x4023e2
push ebx
push 0x4036b8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x4036c0], 0
je 0x402404
push 0x4036c0
call fcn.004026c0
pop ecx
test eax, eax
je 0x402404
push ebx
push 2
push ebx
call dword [0x4036c0]
mov ecx, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [ecx], ebx
je 0x4024e0
mov ecx, dword [ecx]
mov dword [ebp - 0x20], ecx
push 0x20
pop esi
mov edx, dword [ebp - 0x1c]
movzx eax, word [ecx]
cmp ax, si
ja 0x402474
test ax, ax
je 0x40242e
test edx, edx
jne 0x402474
movzx eax, word [ecx]
test ax, ax
je 0x402443
cmp ax, si
ja 0x402443
add ecx, 2
mov dword [ebp - 0x20], ecx
jmp 0x40242e
test byte [ebp - 0x3c], 1
je 0x40244f
movzx eax, word [ebp - 0x38]
jmp 0x402452
push 0xa
pop eax
push eax
push ecx
push ebx
push 0x400000
call main
mov dword [0x403228], eax
cmp dword [0x403240], 0
jne 0x4024bc
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp eax, 0x22
jne 0x402485
xor eax, eax
test edx, edx
sete al
mov edx, eax
mov dword [ebp - 0x1c], edx
add ecx, 2
mov dword [ebp - 0x20], ecx
jmp 0x40241d
cmp dword [0x40322c], 0
jne 0x4024d0
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x403228]
mov dword [ebp - 4], HeapAlloc
jmp 0x4024ec
mov dword [ebp - 4], HeapAlloc
mov eax, 0xff
call fcn.00402899
ret
call fcn.00402781
jmp 0x40230c
Function at 0x402630
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x402646
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], reloc.KERNEL32.dll_HeapAlloc
jne 0x402661
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret

Function at 0x402670
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
movzx ebx, word [ecx + 6]
add eax, 0x18
push esi
xor edx, edx
add eax, ecx
push edi
test ebx, ebx
je 0x4026ae
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x4026a6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x4026b0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x402696
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x1006225
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
xor eax, eax
cmp byte [ecx], al
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
je 0x100625b
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x100625f
xor eax, eax
jmp 0x1006275
mov eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
push 0x400
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
leave
ret 4

Function at 0x1007528
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
mov eax, esi
shr eax, 2
test eax, eax
push edi
mov edi, dword [esp + 0x14]
jle 0x1007563
push ebx
movzx edx, byte [ecx]
xor ebx, ebx
inc ecx
mov bh, byte [ecx]
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x10
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x18
or edx, ebx
inc ecx
xor edi, edx
dec eax
jne 0x1007540
pop ebx
and esi, 3
xor eax, eax
dec esi
je 0x100757f
dec esi
je 0x1007578
dec esi
jne 0x1007584
movzx eax, byte [ecx]
shl eax, 0x10
inc ecx
xor edx, edx
mov dh, byte [ecx]
or eax, edx
inc ecx
movzx ecx, byte [ecx]
or eax, ecx
xor eax, edi
pop edi
pop esi
ret 0xc

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x403ac5
sub eax, 0x403a6b
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
jl 0x42e030
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
popal
nop
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x402acc
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004045e8
test esi, esi
jne 0x402b02
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.004046d8
jmp 0x402b20
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004029e0
mov edi, eax
test esi, esi
je 0x402b20
cmp dword [ebx], 0
je 0x402b20
dec esi
jmp 0x402b09
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403684
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x48e024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40371c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4036fc
xor eax, eax
push ebp
push 0x4036f5
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 0x403738
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 0x4036fc
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x48e024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x48e024], ax
mov esp, ebp
pop ebp
ret

Function at 0x4043e8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x49104c], 0
je 0x404449
cmp word [0x491220], 0xd7b2
jne 0x404411
cmp dword [0x491228], 0
jbe 0x404411
mov eax, 0x49121c
call dword [0x491238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x48e074
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 0x404470
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x48e034], 0
jne 0x404465
push 0
push 0x48e06c
push 0x48e074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40459c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.004027a4
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x49104d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404564
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc