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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
lea eax, [ebp - 4]
mov dword [ebp - 8], edx
push eax
xor edi, edi
mov ebx, ecx
push edi
push edi
push 3
push ebx
call dword [sym.imp.ntdll.dll_NtQueryKey]
mov esi, eax
cmp esi, 0xc0000023
jne 0x10005c4f
lea esp, [esp]
mov edx, dword [ebp - 4]
push ecx
mov ecx, edi
lea edx, [edx + 2]
call fcn.1000ac20
mov edi, eax
test edi, edi
je 0x10005c85
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push 3
push ebx
call dword [sym.imp.ntdll.dll_NtQueryKey]
mov esi, eax
cmp esi, 0xc0000023
je 0x10005c20
test esi, esi
js 0x10005c75
lea ecx, [edi + 4]
xor edx, edx
mov eax, ecx
add eax, dword [edi]
push ecx
push dword [ebp - 8]
mov word [eax], dx
call dword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
xor ecx, ecx
mov esi, 0xc0000017
test al, al
cmovne esi, ecx
mov ecx, edi
call fcn.1000acb0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edi
mov esi, 0xc0000017
call fcn.1000acb0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100091a0
Capabilities:
Get system information on windows

Disassembly:
push ebx
mov ebx, ecx
xor eax, eax
push esi
push edi
mov edi, ebx
mov ecx, 0x62
rep stosd dword es:[edi], eax
xor al, al
lea edi, [ebx + 0x188]
xor ecx, ecx
lea esi, [ebx + 0x54]
rep stosb byte es:[edi], al
mov dword [ebx], 0x3a4
mov dword [ebx + 4], 0x3a4
mov dword [ebx + 8], 0x411
mov dword [ebx + 0xc], pe_nt_image_headers32
mov dword [ebx + 0x10], 0
mov eax, dword [0x10001a40]
mov dword [ebx + 0x14], eax
mov eax, dword [0x10001a44]
mov dword [ebx + 0x18], eax
mov eax, dword [0x10001a48]
push 0
mov dword [ebx + 0x1c], eax
mov eax, dword [0x10001a4c]
push 0xac
mov dword [ebx + 0x20], eax
mov eax, dword [0x10001a50]
push esi
push 0x2c
mov dword [ebx + 0x24], eax
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov dword [esi], 0xfffffde4
lea edi, [ebx + 0x58]
mov ecx, 8
mov esi, 0x10001a74
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0xac]
mov ecx, 8
mov esi, 0x10001a54
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
ret
Function at 0x1000a3a0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x205c
call fcn.1000eac0
push ebx
push esi
push edi
push 0
push 0x2c
lea eax, [ebp - 0x58]
mov dword [ebp - 4], ecx
push eax
push 0
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
test eax, eax
js 0x1000a48c
xor esi, esi
or edi, 0xffffffff
cmp dword [ebp - 0x38], esi
jbe 0x1000a48c
mov ebx, dword [sym.imp.ntdll.dll_NtQueryVirtualMemory]
nop
push 0
push 0x1c
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x20], 0x1000
push eax
push 0
push esi
push 0xffffffffffffffff
call ebx
test eax, eax
js 0x1000a480
cmp dword [ebp - 0x14], 0x1000000
mov esi, dword [ebp - 0x2c]
jne 0x1000a480
mov eax, dword [ebp - 0x28]
cmp eax, edi
je 0x1000a480
push 0
push 0x2000
mov edi, eax
lea eax, [ebp - 0x2058]
push eax
push 2
push esi
push 0xffffffffffffffff
call ebx
test eax, eax
js 0x1000a480
cmp word [ebp - 0x2058], 0
je 0x1000a480
lea edx, [ebp - 0x2058]
lea ecx, [ebp - 0x10]
call fcn.1000dd30
test eax, eax
lea edx, [ebp - 0x2058]
lea ecx, [ebp - 0x10]
cmovs ecx, edx
lea eax, [ebp - 8]
push ecx
push esi
push 0x1000200c
push eax
call fcn.1000a7d0
mov ecx, dword [ebp - 4]
add esp, 0x10
push eax
call fcn.1000a7f0
lea ecx, [ebp - 8]
call fcn.10006c20
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
add esi, dword [ebp - 0x20]
cmp esi, dword [ebp - 0x38]
jb 0x1000a3e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1000ad40
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword fs:[0x30]
push ebx
push esi
push edi
mov eax, dword [ecx + 0xc]
mov ebx, edx
mov esi, dword [ecx + 8]
mov eax, dword [eax + 0xc]
mov edi, eax
jmp 0x1000ad60
mov edx, dword [eax + 0x18]
cmp esi, edx
jb 0x1000ad70
mov ecx, dword [eax + 0x20]
add ecx, edx
cmp esi, ecx
jb 0x1000ad81
mov eax, dword [eax]
cmp eax, edi
jne 0x1000ad60
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea esi, [eax + 0x24]
sub esp, 8
mov edx, ebx
mov ecx, esi
call fcn.1000acd0
movzx ecx, word [esi]
and ecx, 0xfffffffe
cmp ecx, 0x440
jae 0x1000ad78
pop edi
xor ecx, ecx
pop esi
mov word [ebx + 0x440], cx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1000adf0
Capabilities:
Create process memory minidump

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x488
push esi
push edi
push 0
push 0x20
lea eax, [esp + 0x38]
mov dword [esp + 0x20], 0
push eax
push 4
push 0xffffffffffffffff
mov edi, ecx
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
push ecx
lea edx, [esp + 0x54]
call fcn.1000ad40
push dword [esp + 0x34]
lea ecx, [esp + 0x54]
push dword [esp + 0x34]
push 0x100020b4
call fcn.1000aed0
push eax
call dword [sym.imp.ntdll.dll_swprintf]
add esp, 0x10
lea eax, [esp + 0x50]
push 0x4000
push ecx
push 5
push 0x40000000
push ecx
push 0
push eax
lea ecx, [esp + 0x34]
call fcn.1000b6f0
mov esi, eax
test esi, esi
js 0x1000aeb4
mov eax, dword fs:[0x18]
lea ecx, [esp + 0xc]
push 0
push 0
push ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edi
mov eax, dword [eax + 0x24]
mov dword [esp + 0x18], eax
mov eax, dword fs:[0x18]
push 0
push dword [esp + 0x28]
push dword [eax + 0x20]
push 0xffffffffffffffff
call dword [sym.imp.dbghelp.dll_MiniDumpWriteDump]
mov esi, eax
neg esi
sbb esi, esi
and esi, 0x3fffffff
add esi, 0xc0000001
lea ecx, [esp + 0x18]
call fcn.1000b6d0
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x1000b0a0
Capabilities:
Parse pe header

Disassembly:
push ebx
push esi
mov esi, ecx
mov eax, 0x5a4d
mov ebx, edx
cmp word [esi], ax
je 0x1000b0b5
pop esi
xor eax, eax
pop ebx
ret
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x1000b0b0
test ebx, ebx
jne 0x1000b0cc
pop esi
lea eax, [ebx + 1]
pop ebx
ret
movzx ecx, word [eax + 0x18]
push edi
cmp ecx, 0x10b
je 0x1000b0e9
cmp ecx, 0x20b
jne 0x1000b144
lea edi, [eax + 0x88]
jmp 0x1000b0ec
lea edi, [eax + 0x78]
mov edx, dword [eax + 0x50]
test bl, 2
je 0x1000b10a
lea ecx, [edi + 8]
call fcn.1000b050
test eax, eax
je 0x1000b144
mov eax, dword [edi + 8]
cmp dword [eax + esi + 0xc], 0
je 0x1000b144
test bl, 1
je 0x1000b122
mov ecx, edi
call fcn.1000b050
test eax, eax
je 0x1000b144
mov eax, dword [edi]
cmp dword [eax + esi + 0x1c], edx
jae 0x1000b144
test bl, 8
je 0x1000b133
lea ecx, [edi + 0x28]
call fcn.1000b050
test eax, eax
je 0x1000b144
test bl, 4
je 0x1000b14a
lea ecx, [edi + 0x10]
call fcn.1000b050
test eax, eax
jne 0x1000b14a
pop edi
pop esi
xor eax, eax
pop ebx
ret
pop edi
pop esi
mov eax, 1
pop ebx
ret
Function at 0x1000b160
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], edx
mov edx, 2
mov dword [ebp - 4], ecx
call fcn.1000b0a0
test eax, eax
jne 0x1000b181
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push ebx
push esi
push edi
mov eax, dword [edx + 0x3c]
mov ebx, dword [eax + edx + 0x80]
add ebx, edx
cmp dword [ebx + 0xc], 0
je 0x1000b1fd
lea esp, [esp]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x1000b1fd
mov ecx, dword [ebx]
lea edi, [ecx + edx]
test ecx, ecx
jne 0x1000b1b3
lea edi, [eax + edx]
lea esi, [eax + edx]
mov eax, dword [edi]
test eax, eax
je 0x1000b1f4
sub edi, esi
test eax, eax
js 0x1000b1e9
add edx, 2
add edx, eax
xor eax, eax
mov cl, byte [edx]
test cl, cl
je 0x1000b1e1
nop
rol eax, 0xd
lea edx, [edx + 1]
movzx ecx, cl
xor eax, ecx
mov cl, byte [edx]
test cl, cl
jne 0x1000b1d0
xor eax, dword [ebp - 8]
je 0x1000b207
mov edx, dword [ebp - 4]
mov eax, dword [edi + esi + 4]
add esi, 4
test eax, eax
jne 0x1000b1c0
add ebx, 0x14
cmp dword [ebx + 0xc], 0
jne 0x1000b1a0
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
sub esi, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1000b220
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], edx
push ebx
mov ebx, ecx
test edx, edx
je 0x1000b246
mov edx, 1
call fcn.1000b0a0
test eax, eax
jne 0x1000b243
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x3c]
mov ecx, 0x20b
add eax, ebx
cmp word [eax + 0x18], cx
je 0x1000b2cb
test edx, edx
jne 0x1000b262
add eax, 0x28
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x78]
mov eax, dword [ecx + ebx + 0x18]
add ecx, ebx
push esi
mov dword [ebp - 8], eax
push edi
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x20]
add eax, ebx
mov edi, dword [ecx + 0x24]
add esi, ebx
mov dword [ebp - 0xc], eax
add edi, ebx
mov edx, dword [esi]
xor eax, eax
add edx, ebx
mov cl, byte [edx]
test cl, cl
je 0x1000b2a1
mov edi, edi
rol eax, 0xd
lea edx, [edx + 1]
movzx ecx, cl
xor eax, ecx
mov cl, byte [edx]
test cl, cl
jne 0x1000b290
xor eax, dword [ebp - 4]
je 0x1000b2bb
add edi, 2
add esi, 4
sub dword [ebp - 8], 1
jne 0x1000b282
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [edi]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
lea eax, [ecx + eax*4]
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.1000b300
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1000b300
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, edx
mov edx, ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
test ebx, ebx
je 0x1000b32b
mov edx, 1
call fcn.1000b0a0
test eax, eax
jne 0x1000b328
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x3c]
add eax, edx
test ebx, ebx
jne 0x1000b33c
add eax, 0x28
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x88]
mov eax, dword [ecx + edx + 0x1c]
add ecx, edx
push esi
push edi
add eax, edx
mov esi, dword [ecx + 0x20]
mov edi, dword [ecx + 0x24]
add esi, edx
mov ebx, dword [ecx + 0x18]
add edi, edx
mov dword [ebp - 0xc], eax
lea esp, [esp]
add edx, dword [esi]
xor eax, eax
mov cl, byte [edx]
test cl, cl
je 0x1000b381
lea ebx, [ebx]
rol eax, 0xd
lea edx, [edx + 1]
movzx ecx, cl
xor eax, ecx
mov cl, byte [edx]
test cl, cl
jne 0x1000b370
xor eax, dword [ebp - 8]
je 0x1000b39d
mov edx, dword [ebp - 4]
add edi, 2
add esi, 4
sub ebx, 1
jne 0x1000b360
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [edi]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
lea eax, [ecx + eax*4]
mov esp, ebp
pop ebp
ret

Function at 0x1000b3f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov edx, dword [edi + 0x10]
test edx, edx
je 0x1000b431
mov al, byte [edx]
xor ecx, ecx
test al, al
je 0x1000b421
lea esp, [esp]
rol ecx, 0xd
lea edx, [edx + 1]
movzx eax, al
xor ecx, eax
mov al, byte [edx]
test al, al
jne 0x1000b410
mov eax, dword [esi]
cmp ecx, dword [eax]
jne 0x1000b43c
mov eax, dword [edi + 4]
mov ecx, dword [esi + 4]
mov eax, dword [eax]
mov dword [ecx], eax
pop edi
mov eax, 0xc0000273
pop esi
pop ebp
ret 4
pop edi
xor eax, eax
pop esi
pop ebp
ret 4

Function at 0x1000b620
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
mov esi, edx
test esi, esi
jne 0x1000b637
mov eax, 0xc000000d
pop esi
mov esp, ebp
pop ebp
ret
push 5
push 0x18
lea eax, [ebp - 0x20]
mov dword [esi], 0
push eax
lea eax, [ebp - 8]
mov dword [esi + 4], 0
push eax
push ecx
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov ecx, eax
test ecx, ecx
js 0x1000b66a
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], eax
mov eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x1000c420
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
lea eax, [ebp - 4]
mov dword [ebp - 8], ecx
push eax
push 0
push 0
call dword [sym.imp.ntdll.dll_LdrLockLoaderLock]
mov edx, dword fs:[0x30]
mov ebx, eax
mov ecx, dword [ebp - 8]
mov edi, dword [edx + 0xc]
add edi, 0xc
mov esi, dword [edi]
test ecx, ecx
jne 0x1000c46a
test ebx, ebx
js 0x1000c461
push dword [ebp - 4]
push 0
call dword [sym.imp.ntdll.dll_LdrUnlockLoaderLock]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, edi
je 0x1000c48a
mov edi, edi
push 1
lea eax, [esi + 0x2c]
push eax
push ecx
call dword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
jne 0x1000c452
mov esi, dword [esi]
mov ecx, dword [ebp - 8]
cmp esi, edi
jne 0x1000c470
test ebx, ebx
js 0x1000c499
push dword [ebp - 4]
push 0
call dword [sym.imp.ntdll.dll_LdrUnlockLoaderLock]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1000c4b0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ecx
test ecx, ecx
je 0x1000c4d1
lea eax, [ebp - 4]
push eax
push ecx
call dword [sym.imp.ntdll.dll_LdrFindEntryForAddress]
xor ecx, ecx
test eax, eax
cmovns ecx, dword [ebp - 4]
mov eax, ecx
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov esp, ebp
pop ebp
ret

Function at 0x1000c5c0
Capabilities:
Access pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, edx
test edi, edi
mov dword [ebp - 4], ecx
push ecx
cmove edi, ecx
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
movzx ecx, word [eax + 0x18]
cmp ecx, 0x10b
je 0x1000c607
cmp ecx, 0x20b
je 0x1000c5ff
mov eax, 0xc000007b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea edx, [eax + 0x88]
jmp 0x1000c60a
lea edx, [eax + 0x78]
mov esi, dword [edx + 0x28]
mov ecx, dword [ebp - 4]
add esi, ecx
mov eax, dword [edx + 0x2c]
cmp esi, ecx
je 0x1000c65a
test eax, eax
je 0x1000c65a
add eax, esi
mov dword [ebp + 0x10], eax
mov eax, edi
test ebx, ebx
je 0x1000c62a
mov eax, ebx
cdq
mov edi, eax
mov ebx, edx
sub edi, dword [ebp + 8]
sbb ebx, dword [ebp + 0xc]
cmp esi, dword [ebp + 0x10]
jae 0x1000c65a
lea ebx, [ebx]
cmp dword [esi + 4], 0
je 0x1000c65a
push ebx
push edi
mov edx, esi
call fcn.1000c4f0
add esi, dword [esi + 4]
mov ecx, dword [ebp - 4]
cmp esi, dword [ebp + 0x10]
jb 0x1000c640
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1000da30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, 0x80000002
push esi
push 0x10001eb8
push ecx
lea ecx, [ebp - 4]
call fcn.1000d8d0
test eax, eax
js 0x1000daac
push dword [ebp + 8]
lea eax, [ebp - 0x10]
mov dword [ebp - 8], 0
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push dword [ebp + 0x10]
push 2
push eax
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
mov esi, eax
mov eax, dword [ebp - 4]
cmp eax, 0x80000002
je 0x1000da92
test eax, eax
je 0x1000da92
push eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
jns 0x1000da9e
cmp esi, 0xc0000023
jne 0x1000daaa
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x1000daaa
mov eax, dword [ebp - 8]
mov dword [ecx], eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0x18
Function at 0x1000e7e0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x1000f0a0]
sub esp, 0x224
and eax, dword [0x1000f098]
push ebx
mov ebx, dword [0x1000f0a8]
and eax, ebx
and eax, dword [0x1000f09c]
push esi
push edi
test dword [0x1000f0a4], eax
jne 0x1000e874
mov eax, dword fs:[0x30]
mov edx, 0x8f8ed6b0
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + 8]
mov ecx, esi
call fcn.1000b2e0
mov edx, 0x3822f35a
mov dword [0x1000f0a4], eax
mov ecx, esi
call fcn.1000b2e0
mov edx, 0x2814cd62
mov dword [0x1000f09c], eax
mov ecx, esi
call fcn.1000b2e0
mov ebx, eax
mov edx, 0xc811c7b5
mov ecx, esi
mov dword [0x1000f0a8], ebx
call fcn.1000b2e0
mov edx, 0x1a12ce3
mov dword [0x1000f098], eax
mov ecx, esi
call fcn.1000b2e0
mov dword [0x1000f0a0], eax
mov edi, dword [ebp + 8]
test byte [edi], 1
jne 0x1000e88a
pop edi
pop esi
mov eax, 0xffffabcd
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [edi + 4]
add esi, 0x10000000
mov ecx, esi
call fcn.1000af70
push eax
push esi
lea eax, [ebp - 4]
push eax
push 0x208
lea eax, [ebp - 0x224]
push eax
call ebx
test eax, eax
js 0x1000e87c
mov eax, dword [ebp - 4]
xor ecx, ecx
mov word [ebp + eax - 0x224], cx
mov eax, dword [ebp - 4]
mov word [ebp - 0x14], ax
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x224]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
push ecx
push ecx
call dword [0x1000f0a4]
test eax, eax
js 0x1000e87c
push dword [ebp - 8]
push 1
call dword [0x1000f09c]
mov esi, dword [ebp + 0xc]
mov ecx, esi
sub ecx, dword [edi + 0xc]
sub ecx, 0x10000000
sar ecx, 2
lea ecx, [ecx*4 + 0x10000000]
add ecx, dword [edi + 0x10]
mov eax, dword [ecx]
test eax, eax
jns 0x1000e91a
movzx ecx, word [ecx]
xor eax, eax
jmp 0x1000e930
lea eax, [eax + 0x10000002]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [0x1000f098]
lea eax, [ebp - 0x1c]
xor ecx, ecx
lea edx, [ebp - 0xc]
push edx
push ecx
push eax
push dword [ebp - 8]
call dword [0x1000f0a0]
test eax, eax
js 0x1000e87c
mov eax, dword [ebp - 0xc]
pop edi
mov dword [esi], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402cb0
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403114
Capabilities:
Query or enumerate registry value

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

Function at 0x403e78
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4f104c], 0
je 0x403ed9
cmp word [0x4f1220], 0xd7b2
jne 0x403ea1
cmp dword [0x4f1228], 0
jbe 0x403ea1
mov eax, 0x4f121c
call dword [0x4f1238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4ed070
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 0x403f00
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4ed034], 0
jne 0x403ef5
push 0
push 0x4ed068
push 0x4ed070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40402c
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.00402784
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4f104d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x403ff4
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x4056ec
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40591c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40576f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40591c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40576f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405938
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4057f8
xor eax, eax
push ebp
push 0x4057f1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405534
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4057d6
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x405958
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4057d6
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4057f8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x405912
cmp byte [ebp - 0xd], 0
jne 0x40583f
cmp byte [ebp - 0x12], 0
je 0x405912
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405858
dec ebx
cmp byte [ebx], 0x2e
je 0x405867
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405857
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x405912
inc ebx
cmp byte [ebp - 0x12], 0
je 0x4058a4
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x405912
cmp byte [ebp - 0xd], 0
je 0x405912
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x405912
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret