joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4010d0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Manually build aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x43581c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dl, 1
lea ebx, [ebx]
movzx eax, dl
mov cl, dl
and cl, 0x80
mov byte [ebp + eax - 0x104], bl
mov byte [ebp + ebx - 0x204], dl
inc ebx
neg cl
sbb cl, cl
mov al, dl
and cl, 0x1b
add al, al
xor cl, al
xor dl, cl
cmp ebx, 0x100
jl 0x4010f0
mov cl, 1
mov edx, 0x4707a0
movzx eax, cl
shl eax, 0x18
mov dword [edx], eax
mov al, cl
and al, 0x80
add edx, 4
neg al
sbb al, al
and al, 0x1b
add cl, cl
xor cl, al
cmp edx, 0x4707c8
jl 0x401125
mov dword [0x470fe0], 0x63
mov dword [0x46e12c], 0
mov edx, 1
nop
movzx eax, byte [ebp + edx - 0x104]
lea ecx, [ebp - 0x105]
sub ecx, eax
mov al, byte [ecx]
mov cl, al
rol cl, 1
xor al, cl
rol cl, 1
xor al, cl
rol cl, 1
xor al, cl
rol cl, 1
xor cl, al
xor cl, 0x63
movzx eax, cl
mov dword [edx*4 + 0x470fe0], eax
mov dword [eax*4 + 0x46dfa0], edx
inc edx
cmp edx, 0x100
jl 0x401160
mov ebx, 0xff
xor esi, esi
mov dword [ebp - 0x20c], ebx
mov edi, edi
mov dl, byte [esi + 0x470fe0]
mov cl, dl
mov al, dl
and cl, 0x80
neg cl
sbb cl, cl
add al, al
and cl, 0x1b
xor cl, al
movzx eax, cl
movzx ecx, dl
mov edx, eax
shl edx, 8
xor edx, ecx
shl edx, 8
xor edx, ecx
shl edx, 8
xor edx, eax
mov al, byte [esi + 0x46dfa0]
xor edx, ecx
mov dword [esi + 0x46e3a0], edx
ror edx, 8
mov dword [esi + 0x46e7a0], edx
ror edx, 8
mov dword [esi + 0x46eba0], edx
ror edx, 8
mov dword [esi + 0x46efa0], edx
test al, al
je 0x401278
movzx eax, al
movzx ecx, byte [ebp + eax - 0x104]
movzx eax, byte [ebp - 0xf9]
add eax, ecx
cdq
idiv ebx
movzx eax, byte [ebp - 0xf7]
add eax, ecx
movzx edi, byte [ebp + edx - 0x204]
cdq
idiv ebx
movzx eax, byte [ebp - 0xfb]
add eax, ecx
movzx ebx, byte [ebp + edx - 0x204]
cdq
idiv dword [ebp - 0x20c]
movzx eax, byte [ebp + edx - 0x204]
mov dword [ebp - 0x208], eax
movzx eax, byte [ebp - 0xf6]
add eax, ecx
cdq
mov ecx, 0xff
idiv ecx
movzx eax, byte [ebp + edx - 0x204]
jmp 0x401284
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x208], ebx
xor eax, eax
shl eax, 8
xor eax, dword [ebp - 0x208]
add esi, 4
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, edi
mov dword [esi + 0x46f39c], eax
ror eax, 8
mov dword [esi + 0x46f79c], eax
mov ebx, 0xff
ror eax, 8
mov dword [esi + 0x4707dc], eax
ror eax, 8
mov dword [esi + 0x470bdc], eax
cmp esi, 0x400
jl 0x4011b0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041191e
mov esp, ebp
pop ebp
ret
Function at 0x4061c0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x432f28
push 0x419ba0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x43581c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0
mov word [ebp - 0x20], 0x500
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40626d
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x2c]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x28]
jmp 0x40626d
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041191e
mov esp, ebp
pop ebp
ret

Function at 0x406290
Capabilities:
Get session user name
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x432f48
push 0x419ba0
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x43581c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x120], bl
push 0x103
push ebx
lea eax, [ebp - 0x11f]
push eax
call fcn.00413f20
add esp, 0xc
mov dword [ebp - 0x12c], 0x104
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x406369
mov edx, 6
mov dword [ebp - 0x130], edx
lea esi, [ebp - 0x120]
or ecx, 0xffffffff
mov dword [ebp - 0x124], esi
mov eax, edx
dec edx
mov dword [ebp - 0x130], edx
test eax, eax
je 0x406349
movzx eax, byte [esi]
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x431778]
inc esi
jmp 0x40631f
not ecx
xor ebx, ebx
cmp ecx, 0x39b5d60d
sete bl
jmp 0x406363
mov dword [ebp - 0x128], ebx
mov dword [ebp - 4], 0xfffffffe
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041191e
mov esp, ebp
pop ebp
ret
Function at 0x4073a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4073b9
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4073f4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x4073f0
lea ebx, [ebx]
cmp esi, edx
jae 0x4073f4
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x4073e0
cmp esi, edx
jb 0x4073fb
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x40a070
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a6b8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x43581c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, edx
mov dword [ebp - 0x1c], ecx
xor ebx, ebx
mov edx, 0x436c28
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], ebx
call fcn.0040a6a0
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], ebx
je 0x40a17d
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
push ecx
push eax
push ecx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.0040a2d0
mov edi, dword [ebp - 0x28]
test eax, eax
jne 0x40a16d
test edi, edi
je 0x40a17d
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push esi
lea eax, [ebp - 0x14]
push str.__s_
push eax
mov byte [ebp - 4], 3
call fcn.004071c0
mov esi, dword [ebp - 0x14]
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a120
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 2
push 0
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb ebx, ebx
lea edx, [esi - 0x10]
or esi, 0xffffffff
inc ebx
mov byte [ebp - 4], 2
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a170
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40a170
or esi, 0xffffffff
test edi, edi
je 0x40a180
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40a180
or esi, 0xffffffff
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40a1c2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a360
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
mov eax, dword [0x43581c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x40
lea eax, [ebp - 0x66c]
push 0
push eax
call fcn.00413f20
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x640], ax
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x620], eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
xorps xmm0, xmm0
push eax
mov dword [ebp - 0x670], 0x44
movq qword [ebp - 0x628], xmm0
call fcn.00413f20
add esp, 0x18
lea eax, [ebp - 0x20c]
push 0
push 0x25
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x431d18
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
xor eax, eax
push 0x40e
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.00413f20
push esi
lea eax, [ebp - 0x20c]
push eax
push str.__s__start___s_
lea eax, [ebp - 0x61c]
push 0x208
push eax
call fcn.00412464
add esp, 0x20
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x670]
push eax
push 0
push 0
push 0x8000000
push 0
push 0
push 0
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0041191e
mov esp, ebp
pop ebp
ret
Function at 0x40a480
Capabilities:
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a6f0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x43581c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor esi, esi
xor edi, edi
mov edx, 0x437048
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], esi
call fcn.0040a6a0
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], esi
je 0x40a5b7
push 5
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x40a5b7
push 0x17
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x24], eax
test esi, esi
je 0x40a5ae
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push esi
mov dword [ebp - 0x18], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40a59a
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x11]
push ecx
push eax
push 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x30], 0
call fcn.00407ab0
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
sub eax, ebx
cmp eax, dword [ebp - 0x18]
jne 0x40a592
test ebx, ebx
je 0x40a592
lea ecx, [ebp - 0x18]
push ecx
push eax
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x40a592
cmp dword [ebx + 4], 2
je 0x40a592
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push dword [ebx + 8]
push 2
push dword [ebx]
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
lea ecx, [ebp - 0x34]
call fcn.004079b0
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor edi, edi
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a5e6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40a5e6
test esi, esi
je 0x40a5f1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x40a5fc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40be50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov dword [ebp - 0xc], ecx
push esi
mov edx, 0x437260
lea ecx, [ebp - 4]
xor ebx, ebx
call fcn.0040a6a0
mov eax, dword [ebp - 4]
cmp dword [eax - 0xc], ebx
je 0x40bf0e
xor esi, esi
push edi
lea esp, [esp]
lea edx, [ebp - 0x10]
push edx
lea edx, [ebp - 8]
push edx
push 0
xor ecx, ecx
push 2
test esi, esi
push 0
setne cl
push 0
push 0
push eax
mov dword [ebp - 8], 0
add ecx, 0x80000001
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40bf00
mov edx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
test edx, edx
jne 0x40bec1
lea eax, [edx + 0xd]
jmp 0x40beee
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40bec6
sub eax, ebx
sar eax, 1
lea eax, [eax*2 + 2]
push eax
push edx
push 1
push 0
push 0x431f04
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ebx, ebx
test eax, eax
sete bl
test edi, edi
je 0x40bf00
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 4]
inc esi
cmp esi, 2
jl 0x40be80
pop edi
lea esi, [eax - 0x10]
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40bf28
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40e0d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a7d7
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x43581c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0
mov dword [edi], 0x431ea8
mov dword [edi + 0x60], 0x431eec
mov dword [ebp - 4], 0
mov eax, dword [edi]
lea esi, [edi + 4]
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], 1
mov dword [edi + eax], 0x431ef8
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push ecx
lea eax, [ecx - 8]
mov dword [ecx + edi - 4], eax
mov eax, dword [edi]
push esi
mov ecx, dword [eax + 4]
add ecx, edi
call fcn.0040f7c0
mov dword [ebp - 4], 2
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov dword [edi + eax], 0x431e9c
mov eax, dword [edi]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ecx + edi - 4], eax
mov ecx, esi
call fcn.0040f870
lea eax, [esi + 4]
mov dword [esi + 0xc], eax
lea eax, [esi + 0x14]
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x18]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x24]
mov dword [esi + 0x2c], eax
mov dword [esi], 0x431e60
mov byte [esi + 0x4c], 0
mov byte [esi + 0x45], 0
lea ecx, [esi + 8]
mov dword [esi + 0x10], ecx
lea eax, [esi + 0x28]
mov dword [esi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov eax, dword [esi + 0x30]
mov dword [eax], 0
mov eax, dword [esi + 0xc]
mov dword [eax], 0
mov eax, dword [esi + 0x1c]
mov dword [eax], 0
mov eax, dword [esi + 0x2c]
mov dword [eax], 0
mov eax, dword [0x46cadc]
mov dword [esi + 0x48], eax
mov dword [esi + 0x50], 0
mov dword [esi + 0x40], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x40f1a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42a9c8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x43581c]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x43581c]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x40], 0
je 0x40f2f4
cmp byte [ebx + 0x45], 0
je 0x40f2f4
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
jne 0x40f200
xor al, al
jmp 0x40f2f6
mov ecx, 0xf
mov byte [esp + 0x18], 0
xorps xmm0, xmm0
movq qword [esp + 0x18], xmm0
lea eax, [esp + 0x18]
cmp ecx, 0x10
cmovae eax, dword [esp + 0x18]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], 8
mov byte [eax + 8], 0
mov dword [esp + 0x40], 0
jmp 0x40f240
cmp dword [esp + 0x2c], 0x10
mov ecx, dword [ebx + 0x40]
lea eax, [esp + 0x14]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x2c]
lea edi, [esp + 0x1c]
cmovae edi, dword [esp + 0x1c]
lea esi, [esp + 0x1c]
cmovae esi, dword [esp + 0x1c]
add eax, edi
push eax
push esi
lea eax, [ebx + 0x48]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x40f281
dec eax
je 0x40f285
sub eax, 2
je 0x40f2db
xor bl, bl
jmp 0x40f2dd
mov byte [ebx + 0x45], 0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp ecx, 0x10
lea eax, [esp + 0x18]
cmovae eax, edx
sub esi, eax
je 0x40f2bc
push dword [ebx + 0x50]
cmp ecx, 0x10
push esi
lea eax, [esp + 0x20]
cmovae eax, edx
push 1
push eax
call fcn.00412b95
add esp, 0x10
cmp esi, eax
jne 0x40f27d
cmp byte [ebx + 0x45], 0
je 0x40f2db
test esi, esi
jne 0x40f240
push esi
push 8
lea ecx, [esp + 0x20]
call fcn.0040edc0
jmp 0x40f240
mov bl, 1
cmp dword [esp + 0x2c], 0x10
jb 0x40f2f0
push dword [esp + 0x18]
call fcn.00411919
add esp, 4
mov al, bl
jmp 0x40f2f6
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0041191e
mov esp, ebp
pop ebp
ret
Function at 0x410430
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ad28
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x43581c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edx, 0x46b410
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.0040a6a0
mov edx, 0x46b3ec
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0040a6a0
mov byte [ebp - 4], 2
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov ecx, 0x6a
mov byte [ebp - 4], 3
call fcn.00407260
test eax, eax
je 0x4104b7
push 0x6a
push eax
lea ecx, [ebp - 0x1c]
call fcn.00406d30
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x410575
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], 0
je 0x410575
cmp dword [esi - 0xc], 0
je 0x410575
xor ebx, ebx
lea ecx, [ecx]
xor ecx, ecx
test ebx, ebx
setne cl
sub esp, 8
mov dword [ebp - 0x28], 0
push 2
sub esp, 8
mov dword [ebp - 0x24], 0
push eax
add ecx, 0x80000001
push ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], 0
call fcn.004103b0
test eax, eax
jne 0x41054b
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x410520
mov edi, dword [ebp - 0x28]
sub eax, edx
sar eax, 1
lea eax, [eax*2 + 2]
push eax
push esi
push 1
push 0
push dword [ebp - 0x14]
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x41054e
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x410560
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x28], 0
inc ebx
mov dword [ebp - 0x24], 0
cmp ebx, 2
jge 0x410575
mov eax, dword [ebp - 0x18]
jmp 0x4104e0
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 2
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x410595
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4105b5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4105d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410900
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
mov dword [edi], 0
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410971
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x41093f
cmp eax, 2
jne 0x41095b
mov ecx, dword [ebp + 0x10]
test esi, esi
je 0x41096b
test ecx, ecx
je 0x410966
test cl, 1
jne 0x41095b
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x41096b
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
mov dword [edi], ecx
xor eax, eax
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x421fb8
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43581c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
mov dword [ebp - 0x20], eax
call ebx
mov esi, eax
mov dword [ebp - 0x18], esi
call fcn.004166e4
mov dword [ebp - 0x14], eax
cmp dword [0x46ca18], edi
jne 0x4220a9
push 0x800
push edi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x422036
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x422189
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x422189
push str.MessageBoxW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x422189
push eax
call ebx
push str.GetActiveWindow
push esi
mov dword [0x46ca18], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push esi
mov dword [0x46ca1c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push esi
mov dword [0x46ca20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46ca28], eax
test eax, eax
je 0x4220a6
push str.GetProcessWindowStation
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46ca24], eax
mov esi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4220ce
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4220c1
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], edi
je 0x4220e3
push 4
pop eax
jmp 0x42218b
cmp dword [ebp - 0x14], edi
je 0x4220e3
push dword [0x46ca18]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4220c8
mov eax, dword [0x46ca24]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, esi
je 0x422141
cmp dword [0x46ca28], esi
je 0x422141
push eax
call ebx
push dword [0x46ca28]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x422141
test eax, eax
je 0x422141
call ecx
test eax, eax
je 0x422136
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x422136
test byte [ebp - 8], 1
jne 0x422141
mov esi, dword [ebp + 0x10]
or esi, 0x200000
jmp 0x422171
mov eax, dword [0x46ca1c]
cmp eax, esi
je 0x42216e
push eax
call ebx
test eax, eax
je 0x42216e
call eax
mov edi, eax
test edi, edi
je 0x42216e
mov eax, dword [0x46ca20]
cmp eax, esi
je 0x42216e
push eax
call ebx
test eax, eax
je 0x42216e
push edi
call eax
mov edi, eax
mov esi, dword [ebp + 0x10]
push dword [0x46ca18]
call ebx
test eax, eax
je 0x422189
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push edi
call eax
jmp 0x42218b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041191e
leave
ret