joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401235
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x406160
call fcn.00401f50
mov edi, 0x94
mov eax, edi
call fcn.004020b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4086f8], ecx
mov eax, dword [esi + 4]
mov dword [0x408704], eax
mov edx, dword [esi + 8]
mov dword [0x408708], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4086fc], esi
cmp ecx, 2
je 0x401295
or esi, 0x8000
mov dword [0x4086fc], esi
shl eax, 8
add eax, edx
mov dword [0x408700], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x4012ce
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4012ce
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4012e6
cmp eax, 0x20b
je 0x4012d3
mov dword [ebp - 0x1c], edi
jmp 0x4012fa
cmp dword [ecx + 0x84], 0xe
jbe 0x4012ce
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x4012f4
cmp dword [ecx + 0x74], 0xe
jbe 0x4012ce
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00401efc
pop ecx
test eax, eax
jne 0x401326
cmp dword [0x4086e8], 2
je 0x401313
call fcn.0040170e
push 0x1c
call fcn.00401597
push 0xff
call fcn.004013fc
pop ecx
pop ecx
call fcn.00401e5a
mov dword [ebp - 4], edi
call fcn.00401caf
test eax, eax
jge 0x40133f
push 0x1b
call fcn.00401210
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x409cb4], eax
call fcn.00401b8d
mov dword [0x4086e0], eax
call fcn.00401aeb
test eax, eax
jge 0x401365
push 8
call fcn.00401210
pop ecx
call fcn.004018b8
test eax, eax
jge 0x401376
push 9
call fcn.00401210
pop ecx
push 1
call fcn.0040142c
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x40138c
push eax
call fcn.00401210
pop ecx
mov eax, dword [0x408718]
mov dword [0x40871c], eax
push eax
push dword [0x408710]
push dword [0x40870c]
call fcn.00401000
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x4013bb
push esi
call fcn.00401557
call fcn.00401579
jmp 0x4013ed
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.00401f8b
ret
Function at 0x401496
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x408738], esi
push edi
jne 0x4014b6
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x408734], esi
mov byte [0x408730], al
jne 0x40151c
mov ecx, dword [0x409ca8]
test ecx, ecx
je 0x4014fd
mov eax, dword [0x409ca4]
sub eax, 4
cmp eax, ecx
jmp 0x4014f6
mov eax, dword [eax]
test eax, eax
je 0x4014e8
call eax
mov eax, dword [0x409ca4]
sub eax, 4
cmp eax, dword [0x409ca8]
mov dword [0x409ca4], eax
jae 0x4014e0
mov eax, 0x408020
mov esi, 0x408028
cmp eax, esi
mov edi, eax
jae 0x40151c
mov eax, dword [edi]
test eax, eax
je 0x401515
call eax
add edi, 4
cmp edi, esi
jb 0x40150d
mov eax, 0x40802c
mov esi, 0x408030
cmp eax, esi
mov edi, eax
jae 0x40153b
mov eax, dword [edi]
test eax, eax
je 0x401534
call eax
add edi, 4
cmp edi, esi
jb 0x40152c
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x401555
push dword [ebp + 8]
mov dword [0x408738], 1
call fcn.004013fc
pop ebp
ret

Function at 0x401597
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x408180]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x408048]
je 0x4015cc
inc eax
cmp eax, 0x13
jb 0x4015bd
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x408048]
jne 0x4016f2
mov eax, dword [0x4086e8]
cmp eax, 1
je 0x4016ca
cmp eax, edx
jne 0x4015fc
cmp dword [0x408044], 1
je 0x4016ca
cmp ecx, 0xfc
je 0x4016f2
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401632
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004022b0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004024e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x401666
mov eax, edi
push eax
call fcn.004024e0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x406578
push edi
call fcn.004023b0
add esp, 0x10
push edi
call fcn.004024e0
push dword [esi + 0x40804c]
mov ebx, eax
call fcn.004024e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004020b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004022b0
push edi
push ebx
call fcn.004022c0
push 0x406558
push ebx
call fcn.004022c0
push dword [esi + 0x40804c]
push ebx
call fcn.004022c0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004021a9
add esp, 0x2c
jmp 0x4016f2
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40804c]
push dword [esi]
call fcn.004024e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040259c
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4021a9
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x408854], ebx
push esi
push edi
jne 0x402229
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x402264
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x408854], eax
je 0x402264
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x408858], eax
call esi
cmp dword [0x4086f8], 2
mov dword [0x40885c], eax
jne 0x402229
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x408864], eax
je 0x402229
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x408860], eax
mov eax, dword [0x408860]
test eax, eax
je 0x40226e
call eax
test eax, eax
je 0x402255
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x408864]
test eax, eax
je 0x402255
test byte [ebp - 8], 1
jne 0x40226e
cmp dword [0x408704], 4
jb 0x402268
or byte [ebp + 0x12], 0x20
jmp 0x40228d
xor eax, eax
jmp 0x40229d
or byte [ebp + 0x12], 4
jmp 0x40228d
mov eax, dword [0x408858]
test eax, eax
je 0x40228d
call eax
mov ebx, eax
test ebx, ebx
je 0x40228d
mov eax, dword [0x40885c]
test eax, eax
je 0x40228d
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x408854]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40399e
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4039cc
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4039d3
cmp ebx, dword [eax + 4]
jae 0x4039d3
xor eax, eax
jmp 0x403bc3
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4039e4
xor eax, eax
inc eax
jmp 0x403bc2
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4039fa
cmp ecx, edx
jae 0x403b3f
cmp dword [eax + 4], 0
je 0x403a03
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4039eb
cmp dword [ebp + 8], 0
je 0x403a25
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x403b3f
cmp eax, esi
jae 0x403b3f
mov eax, dword [0x408870]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x403a4a
cmp dword [esi*4 + 0x408878], edi
je 0x403b43
inc esi
cmp esi, eax
jl 0x403a38
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403bbf
cmp dword [ebp - 8], 0x1000000
jne 0x403bbf
test byte [ebp - 0xc], 0xcc
je 0x403ac8
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x403bbf
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x403bbf
cmp word [eax + 0x18], 0x10b
jne 0x403bbf
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x403bbf
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x403ac8
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x403ac8
test byte [ecx + 0x27], 0x80
jne 0x403b3f
push 1
push 0x4088b8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4039dc
mov ecx, dword [0x408870]
test ecx, ecx
mov edx, ecx
jle 0x403afc
lea eax, [ecx*4 + 0x408874]
cmp dword [eax], edi
je 0x403afc
dec edx
sub eax, 4
test edx, edx
jg 0x403af0
test edx, edx
jne 0x403b2d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x403b09
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x403b21
lea eax, [edx*4 + 0x408878]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x403b0f
cmp ecx, 0x10
jge 0x403b2d
inc ecx
mov dword [0x408870], ecx
push 0
push 0x4088b8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4039dc
xor eax, eax
jmp 0x403bc2
test esi, esi
jle 0x4039dc
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4088b8
call ebx
test eax, eax
jne 0x4039dc
cmp dword [esi*4 + 0x408878], edi
je 0x403b99
mov eax, dword [0x408870]
lea esi, [eax - 1]
test esi, esi
jl 0x403b87
cmp dword [esi*4 + 0x408878], edi
je 0x403b83
dec esi
jns 0x403b77
test esi, esi
jge 0x403b97
cmp eax, 0x10
jge 0x403b92
inc eax
mov dword [0x408870], eax
lea esi, [eax - 1]
jmp 0x403b99
je 0x403bb1
xor ecx, ecx
test esi, esi
jl 0x403bb1
lea eax, [ecx*4 + 0x408878]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x403b9f
push 0
push 0x4088b8
call ebx
jmp 0x4039dc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404a4c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004020b0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x404ae7
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4086f8]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x404ae7
cmp eax, 1
je 0x404b08
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x404ae7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x404ab4
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x404ae3
xor eax, eax
inc eax
jmp 0x404b27
cmp edi, eax
jae 0x404aeb
xor eax, eax
jmp 0x404b27
cmp eax, esi
jae 0x404af2
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4086f8]
jmp 0x404b0b
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401cf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x401d48
cmp byte [esi + ebx - 1], 0xa
je 0x401d1c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x4030f8], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret

Function at 0x401df0
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov dword [esp], 1
call sym.__configure_narrow_argv
call sym.__initialize_narrow_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___argv
mov edi, dword [eax]
call sym.__get_initial_narrow_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._main
mov dword [esp], eax
call sym._exit
nop
nop
nop
nop
nop
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x476004]
jne 0x40100a
repz ret
jmp fcn.004017db

Function at 0x406b7e
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00402504
and dword [ebp - 4], 0
cmp dword [0x477ffc], 0
mov ebx, eax
jne 0x406c2f
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x406ce0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x406ce0
push eax
call fcn.00402492
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x477ffc], eax
call esi
push eax
call fcn.00402492
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x478000], eax
call esi
push eax
call fcn.00402492
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x478004], eax
call esi
push eax
call fcn.00402492
pop ecx
mov dword [0x47800c], eax
test eax, eax
je 0x406c2f
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00402492
pop ecx
mov dword [0x478008], eax
mov eax, dword [0x478008]
cmp eax, ebx
je 0x406c87
cmp dword [0x47800c], ebx
je 0x406c87
push eax
call fcn.0040250d
push dword [0x47800c]
mov esi, eax
call fcn.0040250d
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x406c87
test edi, edi
je 0x406c87
call esi
test eax, eax
je 0x406c7e
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x406c7e
test byte [ebp - 0xc], 1
jne 0x406c87
or dword [ebp + 0x10], 0x200000
jmp 0x406cc0
mov eax, dword [0x478000]
cmp eax, ebx
je 0x406cc0
push eax
call fcn.0040250d
pop ecx
test eax, eax
je 0x406cc0
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x406cc0
mov eax, dword [0x478004]
cmp eax, ebx
je 0x406cc0
push eax
call fcn.0040250d
pop ecx
test eax, eax
je 0x406cc0
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x477ffc]
call fcn.0040250d
pop ecx
test eax, eax
je 0x406ce0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x406ce2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x46e910
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push ebp
mov ebp, dword [esp + 0x10]
push edi
cmp ebp, 0x19f
jne 0x46e931
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
xor edi, edi
test ebp, ebp
jle 0x46e986
push esi
jmp 0x46e940
lea esi, [esp + 0x10]
mov dword [esp + 0xc], 5
mov dword [esp + 0x10], 0
call fcn.0046e900
mov eax, dword [esp + 0x10]
add eax, 0x46
mov dword [esp + 0xc], eax
sub dword [esp + 0xc], 0x46
movsx eax, byte [edi + ebx]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xc]
xor dword [esp + 0x18], eax
mov cl, byte [esp + 0x18]
mov byte [edi + ebx], cl
inc edi
cmp edi, ebp
jl 0x46e940
pop esi
pop edi
cmp ebp, 0x2d
pop ebp
jne 0x46e9a1
mov dword [0x2b76218], 0xa62e7790
mov dword [0x2b7621c], 0xffffffff
add esp, 8
ret
Function at 0x1001e74
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov ebx, eax
cmp byte [0x40a5ac], 0
jne 0x1001e91
call fcn.01001788
test al, al
je 0x1001e99
cmp ebx, 0x7ffffff8
jle 0x1001ea3
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x1001ff7
xor ecx, ecx
push ebp
push 0x401ff0
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40a035], 0
je 0x1001ec4
push 0x40a5b4
call sym.imp.KERNEL32.dll_HeapReAlloc
add ebx, 7
and ebx, 0xfffffffc
cmp ebx, 0xc
jge 0x1001ed4
mov ebx, 0xc
cmp ebx, 0x1000
jg 0x1001f73
mov eax, ebx
test eax, eax
jns 0x1001ee9
add eax, 3
sar eax, 2
mov edx, dword [0x40a60c]
mov edx, dword [edx + eax*4 - 0xc]
test edx, edx
je 0x1001f73
mov esi, edx
mov eax, esi
add eax, ebx
and dword [eax], 0xfffffffe
mov eax, dword [edx + 4]
cmp edx, eax
jne 0x1001f24
mov eax, ebx
test eax, eax
jns 0x1001f13
add eax, 3
sar eax, 2
mov ecx, dword [0x40a60c]
xor edi, edi
mov dword [ecx + eax*4 - 0xc], edi
jmp 0x1001f4a
mov ecx, ebx
test ecx, ecx
jns 0x1001f2d
add ecx, 3
sar ecx, 2
mov edi, dword [0x40a60c]
mov dword [edi + ecx*4 - 0xc], eax
mov ecx, dword [edx]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, esi
mov edx, dword [edx + 8]
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40a59c]
sub ebx, 4
add dword [0x40a5a0], ebx
call fcn.01002bec
jmp 0x1001ff7
cmp ebx, dword [0x40a604]
jg 0x1001fc5
sub dword [0x40a604], ebx
cmp dword [0x40a604], 0xc
jge 0x1001f97
add ebx, dword [0x40a604]
xor eax, eax
mov dword [0x40a604], eax
mov eax, dword [0x40a608]
add dword [0x40a608], ebx
mov edx, ebx
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40a59c]
sub ebx, 4
add dword [0x40a5a0], ebx
call fcn.01002bec
jmp 0x1001ff7
mov eax, ebx
call fcn.01001d80
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x401ff7
cmp byte [0x40a035], 0
je 0x1001fef
push 0x40a5b4
call sym.imp.KERNEL32.dll_ExitProcess
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret
Function at 0x1002004
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov dword [0x40a5b0], eax
cmp byte [0x40a5ac], 0
jne 0x100203c
call fcn.01001788
test al, al
jne 0x100203c
mov dword [0x40a5b0], 8
mov dword [ebp - 4], 8
jmp 0x100219d
xor ecx, ecx
push ebp
push 0x402196
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40a035], 0
je 0x100205d
push 0x40a5b4
call sym.imp.KERNEL32.dll_HeapReAlloc
mov esi, ebx
sub esi, 4
mov ebx, dword [esi]
test bl, 2
jne 0x1002078
mov dword [0x40a5b0], 9
jmp 0x100216d
dec dword [0x40a59c]
mov eax, ebx
and eax, 0x7ffffffc
sub eax, 4
sub dword [0x40a5a0], eax
test bl, 1
je 0x10020d8
mov eax, esi
sub eax, 0xc
mov edx, dword [eax + 8]
cmp edx, 0xc
jl 0x10020a8
test edx, 0x80000003
je 0x10020b7
mov dword [0x40a5b0], 0xa
jmp 0x100216d
mov eax, esi
sub eax, edx
cmp edx, dword [eax + 8]
je 0x10020cf
mov dword [0x40a5b0], 0xa
jmp 0x100216d
add ebx, edx
mov esi, eax
call fcn.0100192c
and ebx, 0x7ffffffc
mov eax, esi
add eax, ebx
mov edi, eax
cmp edi, dword [0x40a608]
jne 0x1002118
sub dword [0x40a608], ebx
add dword [0x40a604], ebx
cmp dword [0x40a604], 0x3c00
jle 0x1002109
call fcn.01001c1c
xor eax, eax
mov dword [ebp - 4], eax
call fcn.01002bec
jmp 0x100219d
mov edx, dword [eax]
test dl, 2
je 0x100213b
and edx, 0x7ffffffc
cmp edx, 4
jge 0x1002136
mov dword [0x40a5b0], 0xb
jmp 0x100216d
or dword [eax], 1
jmp 0x1002164
mov eax, edi
cmp dword [eax + 4], 0
je 0x100214e
cmp dword [eax], 0
je 0x100214e
cmp dword [eax + 8], 0xc
jge 0x100215a
mov dword [0x40a5b0], 0xb
jmp 0x100216d
mov edx, dword [eax + 8]
add ebx, edx
call fcn.0100192c
mov edx, ebx
mov eax, esi
call fcn.01001b94
mov eax, dword [0x40a5b0]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40219d
cmp byte [0x40a035], 0
je 0x1002195
push 0x40a5b4
call sym.imp.KERNEL32.dll_ExitProcess
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

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

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

Function at 0x10035b8
Capabilities:
Get file size

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, edx
mov eax, dword [ebx]
test eax, eax
je 0x10035d0
mov dword [ebx], 0
push eax
call sym.imp.KERNEL32.dll_GetFileSize
add ebx, 4
dec esi
jne 0x10035be
pop esi
pop ebx
ret

Function at 0x1003cb4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x403d1a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sym.imp.KERNEL32.dll_GetTempPathA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.010031f4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.0100269c
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x1003d04
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403d21
lea eax, [ebp - 0x10]
call fcn.01003094
ret
Function at 0x1007080
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, dword [0x409214]
mov dword [eax], ecx
mov ebx, edx
test ebx, ebx
jle 0x10070a1
mov eax, 0xff
call fcn.01002680
xor byte [esi], al
inc esi
dec ebx
jne 0x1007091
pop esi
pop ebx
ret

Function at 0x100c23d
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
or dword [ebp - 8], 0xffffffff
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi + 0x940], edi
mov byte [ebp - 1], 0
jne 0x100c261
or eax, 0xffffffff
jmp 0x100c35c
mov eax, dword [esi + 0x93c]
cmp eax, edi
push ebx
mov ebx, 0x1001b28
je 0x100c29e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x100c285
mov byte [ebp - 1], 1
jmp 0x100c29e
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call int.01009d20
push eax
push 0x82
push ebx
call fcn.0101c3d2
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
mov dword [ebp - 0xc], edi
mov edi, 0x1001bf4
push edi
push dword [esi + 0x940]
mov dword [ebp - 0x10], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
mov dword [ebp - 0x14], eax
je 0x100c2f2
test eax, eax
jne 0x100c2d9
cmp dword [ebp - 0xc], 4
je 0x100c2f2
push 0
push eax
call int.01009d20
push eax
push 0x9d
push ebx
call fcn.0101c3d2
mov edi, dword [ebp - 0x14]
jmp 0x100c326
inc dword [ebp - 8]
push 4
lea eax, [ebp - 8]
push eax
push 4
push 0
push edi
push dword [esi + 0x940]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x100c32a
push 0
push edi
call int.01009d20
push eax
push 0x96
push ebx
call fcn.0101c3d2
or dword [ebp - 8], 0xffffffff
mov esi, dword [esi + 0x93c]
test esi, esi
je 0x100c358
cmp byte [ebp - 1], 0
je 0x100c358
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100c358
push eax
push edi
call int.01009d20
push eax
push 0xa5
push ebx
call fcn.0101c3d2
mov eax, dword [ebp - 8]
pop ebx
pop edi
pop esi
leave
ret