joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4672d0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x24
mov eax, dword [0x4a6eb0]
xor eax, esp
mov dword [esp + 0x20], eax
push 0x493908
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x4672fc
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004764f6
add esp, 0x24
ret
push esi
push 0x4938ec
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x46731f
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004764f6
add esp, 0x24
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebp
push edi
lea eax, [esp + 0x10]
push eax
push 0x40
push 5
push esi
mov dword [esp + 0x20], 0
call ebx
lea edx, [esp + 0x14]
push edx
mov edi, eax
push 5
mov ecx, method.ATL::CComObject_class_CDeviceManager_.2.virtual_304
lea eax, [esp + 0x24]
sub ecx, esi
push eax
sub ecx, 5
push esi
mov byte [esp + 0x2c], 0xe9
mov dword [esp + 0x2d], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebp, eax
test edi, edi
je 0x467380
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push edx
push 5
push esi
call ebx
mov ecx, dword [esp + 0x30]
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.004764f6
add esp, 0x24
ret

Function at 0x4673a0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x1c
push edi
mov edi, dword [esp + 0x24]
push 0x1c
lea eax, [esp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x4673bf
pop edi
add esp, 0x1c
ret
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0xc]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4673df
pop esi
pop edi
add esp, 0x1c
ret
mov eax, dword [esi + 0x3c]
movzx ecx, word [eax + esi + 0x14]
add eax, esi
push ebx
push ebp
movzx ebp, word [eax + 6]
sub edi, esi
xor ebx, ebx
lea ecx, [ecx + eax + 0x18]
test ebp, ebp
jbe 0x467420
lea eax, [ecx + 0x10]
mov edi, edi
mov ecx, dword [eax]
mov edx, dword [eax - 8]
mov esi, dword [eax - 4]
cmp ecx, edx
ja 0x46740e
mov ecx, edx
cmp edi, esi
jb 0x467418
add ecx, esi
cmp edi, ecx
jbe 0x46742a
inc ebx
add eax, 0x28
cmp ebx, ebp
jb 0x467400
pop ebp
pop ebx
pop esi
xor eax, eax
pop edi
add esp, 0x1c
ret
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
inc ebx
pop ebp
mov dword [edx], ebx
sub edi, esi
pop ebx
mov dword [eax], edi
pop esi
mov eax, 1
pop edi
add esp, 0x1c
ret
Function at 0x4681e2
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4a7458], 0
push esi
jne 0x468155
call fcn.0046807b
test eax, eax
je 0x468198
mov eax, dword [0x4a7458]
cmp eax, 1
jne 0x468176
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x468198
pop esi
ret
push eax
call dword [0x4a7460]
test eax, eax
jne 0x4681e0
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x46819c
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4a7458]
call dword [0x4a7460]
mov edi, eax
test edi, edi
je 0x4681c1
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4681dd
mov edi, esi
add esi, 0xff0
push edi
push dword [0x4a7458]
call dword [0x4a745c]
add edi, 0x10
cmp edi, esi
jb 0x4681c9
mov eax, edi
pop edi
pop esi
ret
jmp 0x468142

Function at 0x46a6ae
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0x100]
mov byte [ebp + 0xb], cl
mov cl, byte [eax + 0x101]
mov byte [ebp - 1], cl
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x46a70e
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp + 0xc], ecx
inc byte [ebp + 0xb]
movzx ecx, byte [ebp + 0xb]
lea esi, [ecx + eax]
mov dl, byte [esi]
add byte [ebp - 1], dl
movzx ecx, byte [ebp - 1]
add ecx, eax
mov bl, byte [ecx]
mov byte [esi], bl
mov byte [ecx], dl
xor ecx, ecx
mov cl, byte [esi]
add ecx, edx
and ecx, 0xff
mov cl, byte [ecx + eax]
xor byte [edi], cl
inc edi
dec dword [ebp + 0xc]
jne 0x46a6d9
pop edi
pop esi
pop ebx
mov cl, byte [ebp + 0xb]
mov byte [eax + 0x100], cl
mov cl, byte [ebp - 1]
mov byte [eax + 0x101], cl
leave
ret
Function at 0x46a80b
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x98
cmp dword [0x4a8170], 0
mov eax, dword [0x4a6eb0]
mov dword [ebp - 4], eax
jne 0x46a8f9
push edi
push 0x25
pop ecx
xor eax, eax
lea edi, [ebp - 0x98]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x46a8ee
xor eax, eax
cmp dword [ebp - 0x88], 2
push esi
sete al
test eax, eax
mov dword [0x4a6e8c], eax
je 0x46a8bc
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x46a8ed
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtQuerySystemInformation
push edi
call esi
test eax, eax
mov dword [0x4a815c], eax
je 0x46a8a0
mov dword [0x4a6e88], 0x4000
push str.NtOpenFile
push edi
call esi
push str.RtlInitUnicodeString
push edi
mov dword [0x4a8160], eax
call esi
mov dword [0x4a8164], eax
jmp 0x46a8ed
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x46a8ed
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetCursorPos
push edi
call esi
push str.GetMessageTime
push edi
mov dword [0x4a8154], eax
call esi
mov dword [0x4a8158], eax
pop esi
mov dword [0x4a8170], 1
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [0x4a6e8c]
call fcn.004764f6
leave
ret
Function at 0x46b4d3
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
xor eax, eax
test esi, esi
je 0x46b520
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push edi
mov edi, dword [ebp + 8]
sub edi, edx
sub ecx, edx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], esi
mov esi, dword [edi + edx]
mov ecx, dword [edx]
lea ebx, [ecx + esi]
add eax, ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebx + edx], eax
mov ebx, ecx
xor ebx, esi
and ebx, eax
or ecx, esi
xor ebx, ecx
shr ebx, 0x1f
add edx, 4
dec dword [ebp + 0x14]
mov eax, ebx
jne 0x46b4f7
pop edi
pop ebx
pop esi
pop ebp
ret 0x10

Function at 0x46b6ff
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x14]
xor eax, eax
test edx, edx
je 0x46b74c
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
sub ebx, esi
sub ecx, esi
push edi
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], edx
mov edi, dword [ebx + esi]
mov edx, dword [esi]
mov ecx, edi
sub ecx, edx
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax + esi], ecx
xor ecx, edi
xor edx, edi
or ecx, edx
xor ecx, edi
shr ecx, 0x1f
add esi, 4
dec dword [ebp + 0x14]
mov eax, ecx
jne 0x46b723
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x470b56
Capabilities:
Encode data using xor
Hash data using sha1

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x170
push esi
xor esi, esi
push edi
inc ecx
movzx edi, byte [ecx + 1]
xor edx, edx
mov dh, byte [ecx - 1]
mov dl, byte [ecx]
add ecx, 4
shl edx, 8
or edx, edi
movzx edi, byte [ecx - 2]
shl edx, 8
or edx, edi
mov dword [ebp + esi*4 - 0x170], edx
inc esi
cmp esi, 0x10
jb 0x470b66
push 5
pop ecx
mov esi, eax
lea edi, [ebp - 0x30]
push 0x40
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x168]
pop esi
mov ecx, dword [edx + 0x2c]
xor ecx, dword [edx + 0x18]
xor ecx, dword [edx - 8]
xor ecx, dword [edx]
add edx, 4
mov edi, ecx
shr edi, 0x1f
add ecx, ecx
or edi, ecx
dec esi
mov dword [edx + 0x34], edi
jne 0x470ba2
mov ecx, dword [eax]
mov edi, dword [eax + 8]
and dword [ebp - 4], 0
mov esi, dword [eax + 0xc]
mov edx, dword [eax + 4]
and dword [ebp - 8], 0
push ebx
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x10], ebx
lea ebx, [ebp - 0x170]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ebx
mov ebx, ecx
shl ecx, 5
shr ebx, 0x1b
or ebx, ecx
mov ecx, dword [ebp - 8]
cmp ecx, 0x3c
mov dword [ebp - 0x1c], ebx
jge 0x470c11
cmp ecx, 0x28
jl 0x470c0c
mov ecx, esi
or ecx, edi
and ecx, edx
mov ebx, esi
jmp 0x470c25
cmp ecx, 0x14
jl 0x470c19
mov ecx, edx
xor ecx, esi
xor ecx, edi
jmp 0x470c2d
test ecx, ecx
jl 0x470c2b
mov ecx, edx
not ecx
and ecx, esi
mov ebx, edx
and ebx, edi
or ecx, ebx
jmp 0x470c2d
xor ecx, ecx
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
add edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x1c]
add edi, ecx
mov ecx, dword [ebp - 4]
add ebx, edi
cmp cx, 0x3c
jl 0x470c4c
mov ecx, 0xca62c1d6
jmp 0x470c74
cmp cx, 0x28
jl 0x470c59
mov ecx, 0x8f1bbcdc
jmp 0x470c74
cmp cx, 0x14
jl 0x470c66
mov ecx, 0x6ed9eba1
jmp 0x470c74
test cx, cx
jl 0x470c72
mov ecx, 0x5a827999
jmp 0x470c74
xor ecx, ecx
add dword [ebp - 0xc], 4
mov edi, edx
shr edx, 2
shl edi, 0x1e
or edi, edx
mov edx, dword [ebp - 0x18]
add ecx, ebx
inc dword [ebp - 4]
inc dword [ebp - 8]
cmp word [ebp - 4], 0x50
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
jl 0x470be8
mov dword [eax], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x10], ecx
mov dword [eax + 0xc], esi
mov dword [eax + 4], edx
lea ecx, [ebp - 0x30]
mov esi, ecx
mov edx, eax
push 5
sub edx, esi
pop esi
mov dword [eax + 8], edi
pop ebx
mov edi, dword [edx + ecx]
add dword [ecx], edi
add ecx, 4
dec esi
jne 0x470cc2
push 5
pop ecx
lea esi, [ebp - 0x30]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
leave
ret

Function at 0x471070
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
push 2
call fcn.00470ff9
test eax, eax
je 0x4710b1
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push 3
push 0
push str.Seed
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
leave
ret 8
Function at 0x4712b0
Capabilities:
Encode data using xor

Disassembly:
push ebx
xor edx, edx
xor ecx, ecx
push esi
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0xc]
push edi
mov edi, eax
mov ebx, dword [esp + 0x14]
push ebp
mov cl, byte [esi + 0x100]
mov ebp, ebx
mov dl, byte [esi + 0x101]
test ebx, ebx
je 0x4713eb
shr ebx, 2
and eax, 3
test ebx, ebx
je 0x4713c0
test eax, eax
jne 0x4713c0
mov eax, edi
lea edi, [edi + ebx*4]
mov dword [esp + 0x1c], edi
sub eax, 4
mov ebp, ebx
mov edi, dword [eax + 4]
inc ecx
xor eax, eax
and ecx, 0xff
mov al, byte [esi + ecx]
add edx, eax
and edx, 0xff
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
inc ecx
mov byte [esi + edx], al
add al, bl
mov al, byte [esi + eax]
xor edi, eax
and ecx, 0xff
xor eax, eax
mov al, byte [esi + ecx]
add edx, eax
and edx, 0xff
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
inc ecx
mov byte [esi + edx], al
add al, bl
mov al, byte [esi + eax]
shl eax, 8
xor edi, eax
and ecx, 0xff
xor eax, eax
mov al, byte [esi + ecx]
add edx, eax
and edx, 0xff
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
inc ecx
mov byte [esi + edx], al
add al, bl
mov al, byte [esi + eax]
shl eax, 0x10
xor edi, eax
and ecx, 0xff
xor eax, eax
mov al, byte [esi + ecx]
add edx, eax
and edx, 0xff
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
mov byte [esi + edx], al
add al, bl
mov al, byte [esi + eax]
shl eax, 0x18
lea ebx, [ebp*4]
xor edi, eax
mov eax, dword [esp + 0x1c]
sub eax, ebx
mov dword [eax], edi
dec ebp
jne 0x471300
mov ebp, dword [esp + 0x18]
and ebp, 3
test ebp, ebp
je 0x4713eb
lea edi, [eax + 4]
inc ecx
mov ebx, 0xff
and ecx, ebx
xor eax, eax
mov al, byte [esi + ecx]
add edx, eax
and edx, ebx
xor ebx, ebx
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
mov byte [esi + edx], al
add al, bl
mov bl, byte [edi]
mov al, byte [esi + eax]
xor bl, al
mov byte [edi], bl
inc edi
dec ebp
jne 0x4713c0
pop ebp
pop edi
lea eax, [esi + 0x100]
pop esi
mov byte [eax], cl
pop ebx
mov byte [eax + 1], dl
ret 0xc

Function at 0x471820
Capabilities:
Hash data with md5

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
pop ebp
ret 4
Function at 0x4764f6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4a6eb0]
jne 0x476500
repz ret
jmp fcn.00476b90

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

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x408f6c
mov ecx, 0x1dc1aa3
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
nop
mov ebx, 0x42e3d0
mov ecx, 0x5d6140d7
nop
nop
nop
test eax, eax
nop
nop
je 0x430084
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
jne 0x43006c
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x402758
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40e02c], 0x8088405
inc edx
mov dword [0x40e02c], edx
mul edx
mov eax, edx
ret

Function at 0x40535c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push esp
push 0x104
call sub.kernel32.dll_GetCurrentDirectoryA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040324c
add esp, 0x104
pop ebx
ret

Function at 0x405894
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4058cd
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.0040324c
jmp 0x4058d6
mov eax, ebx
mov edx, esi
call fcn.00403200
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4058e0
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405901
mov al, byte [esp]
jmp 0x405903
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x406fc4
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0xc], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x407049
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40702c
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.00406f40
mov eax, dword [ebp - 0xc]
call fcn.004034a4
push eax
call sub.kernel32.dll_GetFileAttributesA
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407033
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetErrorMode
ret

Function at 0x4070e4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
mov esi, eax
call sub.kernel32.dll_GetCommandLineA_1
mov ebx, eax
xor eax, eax
mov dl, byte [ebx]
sub dl, 1
jb 0x407110
sub dl, 0x1f
je 0x407108
sub dl, 2
je 0x407104
jmp 0x40710c
xor al, 1
jmp 0x40710c
test al, al
je 0x407110
inc ebx
jmp 0x4070f1
inc ebx
cmp byte [ebx], 0x20
je 0x40710f
mov eax, esi
mov edx, ebx
call fcn.00403298
pop esi
pop ebx
ret

Function at 0x407350
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00405468
add esp, 0x104
pop ebx
ret

Function at 0x40737c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00405468
add esp, 0x104
pop ebx
ret
Function at 0x4074d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x407579
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x407563
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x40751c
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x407563
cmp dword [ebp - 0xc], 2
jge 0x40752e
mov eax, dword [ebp - 4]
call fcn.0040316c
mov bl, 1
jmp 0x407563
mov edx, dword [ebp - 0xc]
dec edx
lea eax, [ebp - 0x10]
call fcn.00403610
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.004034b0
push eax
push 0
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x407563
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.004031bc
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407580
lea eax, [ebp - 0x10]
call fcn.0040316c
ret

Function at 0x407598
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff8
mov esi, edx
mov edi, eax
push 0
push 0
push 0
push 0
push esi
push edi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
sete bl
test bl, bl
je 0x40760d
test esi, esi
je 0x4075c3
cmp byte [esi], 0
jne 0x40760d
cmp dword [0x40d07c], 2
je 0x40760d
xor ebx, ebx
xor esi, esi
mov dword [esp + 4], 2
push 0
push 0
push 0
push 0
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push esi
push edi
call sub.advapi32.dll_RegEnumValueA
test eax, eax
je 0x4075fc
cmp eax, 0xea
jne 0x40760d
test eax, eax
jne 0x40760a
cmp byte [esp], 0
jne 0x40760a
mov bl, 1
jmp 0x40760d
inc esi
jmp 0x4075d0
mov eax, ebx
pop ecx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x407618
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x407708
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x40d07c], 2
jne 0x4076e9
lea eax, [ebp - 4]
push eax
push 9
push 0
push esi
push ebx
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4076e9
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryInfoKeyA
test eax, eax
jne 0x4076e0
cmp dword [ebp - 0x10], 1
jge 0x40768e
mov dword [ebp - 0x10], 1
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x10]
call fcn.00403610
xor edi, edi
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.004034a4
push eax
push edi
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegEnumKeyExA
test eax, eax
jne 0x4076e0
mov eax, dword [ebp - 8]
call fcn.004034a4
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.00407618
test eax, eax
je 0x40769b
inc edi
jmp 0x40769b
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
push esi
push ebx
call sub.advapi32.dll_RegDeleteKeyA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40770f
lea eax, [ebp - 8]
call fcn.0040316c
ret

Function at 0x407718
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
push esp
push 1
push 0
push edi
push esi
call sub.advapi32.dll_RegOpenKeyExA
mov ebx, eax
test ebx, ebx
jne 0x407787
push 0
push 0
push 0
push 0
lea eax, [esp + 0x18]
push eax
push 0
push 0
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0
mov eax, dword [esp + 0x2c]
push eax
call sub.advapi32.dll_RegQueryInfoKeyA
mov ebx, eax
mov eax, dword [esp]
push eax
call sub.advapi32.dll_RegCloseKey
test ebx, ebx
jne 0x407787
cmp dword [esp + 4], 0
jne 0x407782
cmp dword [esp + 8], 0
jne 0x407782
push edi
push esi
call sub.advapi32.dll_RegDeleteKeyA
mov ebx, eax
jmp 0x407787
mov ebx, 0x91
mov eax, ebx
add esp, 0xc
pop edi
pop esi
pop ebx
ret
Function at 0x407790
Capabilities:
Check os version
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
mov ebx, eax
cmp dword [0x40d07c], 2
je 0x4077ac
mov byte [ebp - 1], 1
jmp 0x40797b
mov byte [ebp - 1], 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push 0x20
push 2
push 0x40d158
call sub.advapi32.dll_AllocateAndInitializeSid
test eax, eax
je 0x40797b
xor eax, eax
push ebp
push 0x407974
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetVersion
and ax, 0xff
cmp ax, 5
jb 0x40780d
push 0x407984
push 0x40799c
call sub.kernel32.dll_GetModuleHandleA_1
push eax
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
test ebx, ebx
je 0x407836
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
call ebx
test eax, eax
je 0x40795d
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 1], al
jmp 0x40795d
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x10]
push eax
push 1
push 8
call sub.kernel32.dll_GetCurrentThread
push eax
call sub.advapi32.dll_OpenThreadToken
test eax, eax
jne 0x407887
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3f0
je 0x407868
call fcn.00402f28
jmp 0x40797b
lea eax, [ebp - 0x10]
push eax
push 8
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x407887
call fcn.00402f28
jmp 0x40797b
xor eax, eax
push ebp
push 0x407956
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetTokenInformation
test eax, eax
jne 0x4078ca
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
je 0x4078ca
call fcn.00402f28
call fcn.00402f28
jmp 0x40797b
mov eax, dword [ebp - 0x14]
call fcn.0040258c
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetTokenInformation
test eax, eax
jne 0x4078fc
call fcn.00402f28
call fcn.00402f28
jmp 0x40797b
mov eax, dword [ebp - 0x18]
mov esi, dword [eax]
dec esi
test esi, esi
jl 0x407937
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + ebx*8 + 4]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_EqualSid
test eax, eax
je 0x407933
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + ebx*8 + 8]
and eax, 0x14
cmp eax, 4
jne 0x407933
mov byte [ebp - 1], 1
jmp 0x407937
inc ebx
dec esi
jne 0x407909
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40795d
mov eax, dword [ebp - 0x18]
call fcn.004025a4
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40797b
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_FreeSid
ret
mov al, byte [ebp - 1]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret