joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035cb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00402524
and dword [ebp - 0x14], 0
cmp dword [0x40984c], 0
mov dword [ebp - 0x18], eax
jne 0x40367e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x403726
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x403726
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x40984c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x409850], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x409854], eax
call edi
push eax
call esi
mov dword [0x40985c], eax
test eax, eax
je 0x40367e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x409858], eax
mov eax, dword [0x409858]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4036d7
cmp dword [0x40985c], ecx
je 0x4036d7
push eax
call esi
push dword [0x40985c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4036d7
test ebx, ebx
je 0x4036d7
call edi
test eax, eax
je 0x4036ce
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4036ce
test byte [ebp - 8], 1
jne 0x4036d7
or dword [ebp + 0x10], 0x200000
jmp 0x40370a
mov eax, dword [0x409850]
cmp eax, dword [ebp - 0x18]
je 0x40370a
push eax
call esi
test eax, eax
je 0x40370a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40370a
mov eax, dword [0x409854]
cmp eax, dword [ebp - 0x18]
je 0x40370a
push eax
call esi
test eax, eax
je 0x40370a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x40984c]
call esi
test eax, eax
je 0x403726
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x403728
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004015cd
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40104d
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, 0x1fe
push esi
mov word [ebp - 0x428], ax
xor ebx, ebx
lea eax, [ebp - 0x426]
push ebx
push eax
call fcn.00475a50
xor eax, eax
push esi
mov word [ebp - 0x228], ax
lea eax, [ebp - 0x226]
push ebx
push eax
mov dword [ebp - 0x42c], ebx
call fcn.00475a50
push 8
pop ecx
mov esi, 0x4a9228
lea edi, [ebp - 0x28]
rep movsd dword es:[edi], dword [esi]
push 0x4a91d8
movsw word es:[edi], word [esi]
push 0x4a924c
mov esi, 0x100
lea eax, [ebp - 0x228]
push esi
push eax
call fcn.00477494
lea eax, [ebp - 0x228]
push eax
push 0x4a9254
lea eax, [ebp - 0x428]
push esi
push eax
call fcn.00477494
add esp, 0x38
lea eax, [ebp - 0x42c]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x428]
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExW]
test eax, eax
je 0x40110c
xor al, al
jmp 0x401140
push 0x22
lea eax, [ebp - 0x28]
push eax
push 1
push ebx
push 0x4a9268
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.DLL_RegSetValueExW]
test eax, eax
jne 0x401108
cmp dword [ebp - 0x42c], ebx
je 0x40113e
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475a38
leave
ret

Function at 0x401617
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateEventW]
mov dword [0x4c8098], eax
cmp eax, esi
jne 0x401635
xor eax, eax
jmp 0x401662
push edi
lea eax, [ebp - 4]
push eax
push esi
push 0x4c8068
push 0x401665
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov edi, eax
cmp edi, esi
jne 0x40165f
push dword [0x4c8098]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x402e03
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 4]
push ecx
push dword [edi]
xor esi, esi
or eax, 0x2001f
lea ebx, [ebp - 0x218]
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x210], esi
call fcn.00402db1
mov ebx, eax
cmp ebx, esi
je 0x402e6f
cmp dword [ebp - 0x218], esi
je 0x402e68
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov eax, ebx
jmp 0x402f07
mov ebx, dword [sym.imp.ADVAPI32.DLL_RegEnumKeyExW]
jmp 0x402e97
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x218]
call fcn.00402e03
mov dword [ebp - 0x224], eax
cmp eax, esi
jne 0x402f18
lea eax, [ebp - 0x22c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
push dword [ebp - 0x218]
mov dword [ebp - 0x21c], 0x100
call ebx
test eax, eax
je 0x402e77
mov ebx, dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
cmp dword [ebp - 0x218], esi
je 0x402ee2
push dword [ebp - 0x218]
call ebx
mov dword [ebp - 0x218], esi
push dword [ebp - 0x220]
mov dword [ebp - 0x214], esi
call fcn.00402fd2
mov edi, eax
cmp dword [ebp - 0x218], esi
je 0x402f05
push dword [ebp - 0x218]
call ebx
mov eax, edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475a38
leave
ret 4
cmp dword [ebp - 0x218], esi
je 0x402f2c
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov eax, dword [ebp - 0x224]
jmp 0x402f07
Function at 0x4038ff
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x49edfd
call fcn.0047bb83
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor esi, esi
mov edi, edx
mov dword [ebp - 0x430], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x418], esi
push 2
push esi
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
mov dword [ebp - 0x41c], eax
cmp eax, esi
jne 0x403957
call fcn.004022ef
mov esi, eax
jmp 0x403a61
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov edi, eax
cmp edi, esi
jne 0x403970
call fcn.004022ef
jmp 0x403a53
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov dword [ebp - 0x420], eax
cmp eax, esi
je 0x403966
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
mov dword [ebp - 0x424], edi
cmp eax, edi
jae 0x4039ad
mov esi, 0x8007000e
jmp 0x403a55
xor ecx, ecx
shld ecx, eax, 1
add eax, eax
mov byte [ebp - 4], 2
cmp ecx, esi
ja 0x4039c2
cmp eax, 0xffffffff
jbe 0x4039cc
push 0x80070216
call fcn.00402c76
cmp eax, 0x400
jbe 0x4039f9
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.00402840
jmp 0x403a05
lea eax, [ebp - 0x414]
mov dword [ebp - 0x418], eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x418], esi
je 0x4039a3
push edi
push dword [ebp - 0x418]
push edi
push dword [ebp - 0x420]
push esi
push 3
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
cmp eax, esi
je 0x403966
mov edx, dword [ebp - 0x418]
push dword [ebp + 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
mov ecx, dword [ebp - 0x418]
lea edx, [ebp - 0x42c]
call fcn.0040379f
mov esi, eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x403a7a
lea eax, [ebp - 0x418]
call fcn.004022d9
mov eax, esi
call fcn.0047bbdf
ret 0xc
Function at 0x4042ec
Capabilities:
Get file version info

Disassembly:
push 0x468
mov eax, 0x49dc33
call fcn.0047bb4d
mov ebx, dword [ebp + 8]
xor esi, esi
xor edi, edi
inc esi
push 0x4a9b94
lea eax, [ebp - 0x434]
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov dword [ebx + 8], edi
call fcn.00404c61
push 0xffffffffffffffff
lea ecx, [ebx + 0xc]
push edi
lea eax, [ebp - 0x434]
mov dword [ebp - 4], edi
mov dword [ebp - 0x46c], ecx
call fcn.00404d40
or dword [ebp - 4], 0xffffffff
push esi
lea esi, [ebp - 0x434]
call fcn.00404dda
call fcn.00403eb2
mov dword [ebx + 0x30], eax
lea eax, [ebp - 0x468]
push eax
push fcn.004042ec
push 6
mov dword [ebx + 0x34], edx
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleExW]
test eax, eax
je 0x40451e
push 0x104
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x468]
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
test eax, eax
je 0x40451e
lea eax, [ebp - 0x474]
push eax
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.VERSION.DLL_GetFileVersionInfoSizeW]
mov esi, eax
test esi, esi
je 0x40451e
push esi
call fcn.00474de9
mov edi, eax
pop ecx
mov dword [ebp - 0x45c], edi
test edi, edi
je 0x40451e
push edi
push esi
push 0
lea eax, [ebp - 0x418]
push eax
mov dword [ebp - 0x454], 4
call dword [sym.imp.VERSION.DLL_GetFileVersionInfoW]
test eax, eax
je 0x404517
mov esi, dword [sym.imp.VERSION.DLL_VerQueryValueW]
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp - 0x460]
push eax
push 0x4a9bc8
push edi
call esi
test eax, eax
je 0x404517
mov eax, dword [ebp - 0x460]
movzx ecx, word [eax + 0xa]
mov dword [ebx], ecx
mov ecx, dword [eax + 8]
and ecx, 0xffff
mov dword [ebx + 4], ecx
movzx eax, word [eax + 0xe]
mov dword [ebx + 8], eax
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp - 0x464]
push eax
push 0x4a9bcc
push edi
call esi
xor eax, eax
push 0x1fe
mov word [ebp - 0x210], ax
xor ebx, ebx
lea eax, [ebp - 0x20e]
push ebx
push eax
call fcn.00475a50
mov eax, dword [ebp - 0x454]
shr eax, 2
add esp, 0xc
test eax, eax
jle 0x40450c
mov eax, dword [ebp - 0x464]
lea eax, [eax + ebx*4]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x210]
push 0x4a9c00
push eax
call fcn.00405605
and dword [ebp - 0x458], 0
add esp, 0x10
lea eax, [ebp - 0x470]
push eax
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x210]
push eax
push edi
call esi
cmp dword [ebp - 0x458], 0
jne 0x4044cc
mov eax, dword [ebp - 0x454]
inc ebx
shr eax, 2
cmp ebx, eax
jl 0x40446e
jmp 0x40450c
push dword [ebp - 0x458]
lea eax, [ebp - 0x450]
call fcn.00404c61
mov ecx, dword [ebp - 0x46c]
xor esi, esi
push 0xffffffffffffffff
inc esi
push 0
lea eax, [ebp - 0x450]
mov dword [ebp - 4], esi
call fcn.00404d40
push esi
xor edi, edi
lea esi, [ebp - 0x450]
call fcn.00404dda
mov edi, dword [ebp - 0x45c]
push edi
call fcn.00477120
pop ecx
mov al, 1
jmp 0x404520
push edi
call fcn.00477120
pop ecx
xor al, al
call fcn.0047bbd0
ret
Function at 0x406338
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
lea eax, [ebp - 8]
push eax
xor esi, esi
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push 0x4a9ef8
push esi
push dword [ebp + 8]
mov dword [ebp - 8], esi
push SysReAllocString
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.DLL_RegCreateKeyExW]
mov edi, eax
cmp edi, esi
jne 0x40638e
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.DLL_GetSecurityDescriptorLength]
push eax
push dword [ebp + 0x10]
push 3
push esi
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.DLL_RegSetValueExW]
mov edi, eax
cmp dword [ebp - 4], esi
je 0x40639c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x4063a2
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
cmp esi, ebx
jne 0x4063c2
mov eax, 0xa0
jmp 0x40647c
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4063cb
mov dword [eax], ebx
push edi
lea eax, [ebp - 4]
push eax
push 0xf003f
push ebx
push dword [ebp + 8]
mov dword [esi], ebx
push SysReAllocString
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExW]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x4063f7
cmp eax, 2
je 0x40643b
jmp 0x40647b
mov edi, dword [sym.imp.ADVAPI32.DLL_RegQueryValueExW]
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp - 4]
call edi
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x40641b
cmp eax, 0x7a
jne 0x40643b
push dword [ebp - 0xc]
call fcn.004771f8
pop ecx
lea ecx, [ebp - 0xc]
push ecx
push eax
mov dword [esi], eax
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp - 4]
call edi
mov dword [ebp - 8], eax
cmp dword [ebp - 8], ebx
je 0x40646a
mov eax, dword [esi]
cmp eax, ebx
je 0x40644d
push eax
call fcn.00477095
pop ecx
mov edi, dword [ebp + 0x10]
mov dword [esi], ebx
cmp edi, ebx
je 0x40646a
mov ecx, esi
call fcn.00405efa
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x40646a
mov dword [edi], 1
cmp dword [ebp - 4], ebx
je 0x406478
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov eax, dword [ebp - 8]
pop edi
pop ebx
leave
ret
Function at 0x4069d5
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
xor eax, eax
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x14], ecx
push 2
pop ebx
lea edx, [ebp - 0x14]
mov ecx, 0x4a9274
mov dword [ebp - 0x20], esi
stosd dword es:[edi], eax
call fcn.00406d8f
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406aeb
push ebx
push 0xc
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.DLL_GetAclInformation]
test eax, eax
je 0x406ae2
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x18], eax
js 0x406aeb
mov edi, dword [sym.imp.ADVAPI32.DLL_EqualSid]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.DLL_GetAce]
test eax, eax
je 0x406ae2
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x24]
test ecx, ecx
je 0x406a6a
cmp ecx, 0xffffffff
jne 0x406a6f
cmp byte [eax], 0
je 0x406a8d
cmp ecx, 1
je 0x406a79
cmp ecx, 0xffffffff
jne 0x406a7e
cmp byte [eax], 1
je 0x406a8d
cmp ecx, 2
je 0x406a88
cmp ecx, 0xffffffff
jne 0x406ad7
cmp byte [eax], 2
jne 0x406ad7
mov esi, eax
add eax, 8
push eax
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x406ad7
mov ecx, dword [esi + 4]
test cx, cx
je 0x406acf
mov eax, dword [ebp + 8]
not eax
and eax, ecx
mov dword [esi + 4], eax
test al, 0x1e
je 0x406aba
or eax, 1
mov dword [esi + 4], eax
jmp 0x406ad5
movzx eax, ax
test eax, eax
jne 0x406ad5
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.DLL_DeleteAce]
jmp 0x406ad5
or ecx, dword [ebp + 8]
mov dword [esi + 4], ecx
xor ebx, ebx
dec dword [ebp - 0x18]
jns 0x406a43
jmp 0x406aeb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x14], 0
je 0x406afa
push dword [ebp - 0x14]
call fcn.00477095
pop ecx
cmp dword [ebp - 0x1c], 0
jne 0x406b03
mov dword [ebp - 0x1c], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475a38
leave
ret
Function at 0x406b15
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
xor eax, eax
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
mov esi, ecx
stosd dword es:[edi], eax
push 2
pop edi
lea edx, [ebp - 0x14]
mov ecx, 0x4a9274
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], edi
call fcn.00406d8f
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jne 0x406c07
push edi
push 0xc
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.DLL_GetAclInformation]
test eax, eax
je 0x406bfe
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x18], eax
cmp eax, ebx
jl 0x406c07
mov edi, dword [sym.imp.ADVAPI32.DLL_EqualSid]
mov ebx, dword [sym.imp.ADVAPI32.DLL_DeleteAce]
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.DLL_GetAce]
test eax, eax
je 0x406bfe
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x28]
test ecx, ecx
je 0x406bb1
cmp ecx, 0xffffffff
jne 0x406bb6
cmp byte [eax], 0
je 0x406bd4
cmp ecx, 1
je 0x406bc0
cmp ecx, 0xffffffff
jne 0x406bc5
cmp byte [eax], 1
je 0x406bd4
cmp ecx, 2
je 0x406bcf
cmp ecx, 0xffffffff
jne 0x406bf7
cmp byte [eax], 2
jne 0x406bf7
mov esi, eax
add eax, 8
push eax
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x406bf7
movzx eax, word [esi + 4]
test eax, eax
je 0x406bf3
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call ebx
and dword [ebp - 0x24], 0
dec dword [ebp - 0x18]
jns 0x406b8e
jmp 0x406c07
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x14], 0
pop edi
pop esi
pop ebx
je 0x406c19
push dword [ebp - 0x14]
call fcn.00477095
pop ecx
cmp dword [ebp - 0x1c], 0
jne 0x406c25
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00475a38
leave
ret
Function at 0x406d8f
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
push 0x1fe
push eax
mov word [ebp - 0x204], ax
lea eax, [ebp - 0x202]
mov esi, ecx
push eax
mov dword [ebp - 0x218], esi
mov edi, edx
call fcn.00475a50
and dword [ebp - 0x20c], 0
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x210], 0xff
call fcn.00406c34
test eax, eax
je 0x406def
xor eax, eax
jmp 0x406e85
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [edi]
push esi
mov esi, dword [sym.imp.ADVAPI32.DLL_LookupAccountNameW]
push 0
call esi
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x208], eax
cmp eax, 0x7a
jne 0x406e7f
push dword [ebp - 0x20c]
and dword [ebp - 0x208], 0
call fcn.004771f8
pop ecx
lea ecx, [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp - 0x204]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
push eax
push dword [ebp - 0x218]
mov dword [edi], eax
push 0
mov dword [ebp - 0x210], 0xff
call esi
test eax, eax
jne 0x406e7f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x208], eax
mov eax, dword [ebp - 0x208]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00475a38
leave
ret

Function at 0x406e93
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x4c3204]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x118
xor esi, esi
lea eax, [ebp - 0x11c]
push esi
push eax
mov dword [ebp - 0x120], 0x11c
call fcn.00475a50
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x406f0e
cmp dword [ebp - 0x11c], 5
jne 0x406f09
xor eax, eax
inc eax
cmp dword [ebp - 0x118], eax
jb 0x406f05
jne 0x406ef6
cmp word [ebp - 0xc], 2
jmp 0x406f03
cmp dword [ebp - 0x118], 2
jne 0x406f0e
cmp word [ebp - 0xc], ax
jae 0x406f0e
mov esi, eax
jmp 0x406f0e
jae 0x406f0e
xor esi, esi
inc esi
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00475a38
leave
ret
Function at 0x406f1d
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push 0x7c
mov eax, 0x49db5c
call fcn.0047bb83
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x88], eax
cmp eax, edi
je 0x406faf
lea eax, [ebp - 0x6c]
push eax
push 0xf023f
push edi
push 0x4a9f48
push reloc.OLEAUT32.DLL_SysReAllocString
mov dword [ebp - 0x6c], edi
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExW]
cmp eax, edi
jne 0x406faf
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], edi
lea eax, [ebp - 0x84]
push eax
push edi
lea eax, [ebp - 0x80]
push eax
push edi
mov dword [ebp - 4], edi
mov esi, dword [sym.imp.ADVAPI32.DLL_RegQueryValueExW]
mov ebx, 0x4a9fa4
push ebx
push dword [ebp - 0x6c]
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x80], edi
call esi
mov byte [ebp - 4], 1
cmp eax, edi
jne 0x40701c
cmp dword [ebp - 0x80], 1
je 0x406fb5
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
lea esi, [ebp - 0x7c]
call fcn.00419335
call fcn.0047bbdf
ret
mov eax, dword [ebp - 0x84]
shr eax, 1
lea ecx, [ebp - 0x7c]
call fcn.00407163
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x7c]
lea eax, [ebp - 0x80]
push eax
push edi
push ebx
push dword [ebp - 0x6c]
call esi
push dword [ebp - 0x6c]
mov esi, eax
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov dword [ebp - 0x6c], edi
cmp esi, edi
jne 0x406fa7
cmp dword [ebp - 0x80], 1
jne 0x406fa7
mov ecx, dword [ebp - 0x78]
sub ecx, dword [ebp - 0x7c]
push 0x27
sar ecx, 1
pop eax
cmp ecx, eax
jbe 0x407079
lea ecx, [ebp - 0x7c]
call fcn.00407163
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x78]
sub ecx, eax
sar ecx, 1
xor edx, edx
mov word [eax + ecx*2 - 2], dx
jmp 0x407079
push 0x27
pop eax
lea ecx, [ebp - 0x7c]
call fcn.00407163
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.OLE32.DLL_CoCreateGuid]
test eax, eax
jne 0x406f9e
mov esi, dword [ebp - 0x78]
sub esi, dword [ebp - 0x7c]
lea eax, [ebp - 0x40]
sar esi, 1
push esi
push dword [ebp - 0x7c]
push eax
call dword [sym.imp.OLE32.DLL_StringFromGUID2]
lea eax, [esi + esi]
push eax
push dword [ebp - 0x7c]
push 1
push edi
push ebx
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.DLL_RegSetValueExW]
push dword [ebp - 0x6c]
mov esi, eax
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
mov dword [ebp - 0x6c], edi
cmp esi, edi
jne 0x406fa7
mov esi, 0x4a9fb0
push esi
lea eax, [ebp - 0x4c]
call fcn.00404c61
mov byte [ebp - 4], 2
push dword [ebp - 0x7c]
lea ebx, [ebp - 0x68]
lea ecx, [ebp - 0x4c]
call fcn.00407117
push esi
lea ebx, [ebp - 0x30]
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00407117
push 1
xor edi, edi
lea esi, [ebp - 0x68]
call fcn.00404dda
push 1
lea esi, [ebp - 0x4c]
call fcn.00404dda
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x4070c9
mov eax, ebx
cmp dword [ebp - 0x1c], 8
mov ecx, dword [ebp - 0x20]
lea eax, [eax + ecx*2]
mov ecx, dword [ebp - 0x30]
jae 0x4070db
lea ecx, [ebp - 0x30]
sub eax, ecx
sar eax, 1
add eax, eax
push eax
push ecx
push dword [ebp - 0x88]
call fcn.00477a90
add esp, 0xc
push 1
xor edi, edi
lea esi, [ebp - 0x30]
call fcn.00404dda
jmp 0x406fa7