joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404e90
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41119f
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
lea edi, [ebp + 8]
mov eax, dword fs:[0x2c]
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x11c], 0x3f5644c
cmovae edi, dword [ebp + 8]
mov ebx, dword [eax]
mov dword [ebp - 0x118], 0x59a56dc2
mov byte [ebp - 0x114], 0x69
mov eax, dword [ebx + 0x69c]
test al, 1
jne 0x404f5c
or eax, 1
mov dword [ebx + 0x69c], eax
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movlpd qword [ebp - 0x124], xmm0
mov edx, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x124]
mov byte [ebx + 0x56d], 1
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x11c]
mov byte [ecx + ebx + 0x564], al
add ecx, 1
adc edx, 0
jne 0x404f4b
cmp ecx, 9
jb 0x404f30
push 0x413100
call fcn.0040fe53
add esp, 4
mov byte [ebp - 4], 0
lea esi, [ebx + 0x564]
mov ecx, esi
call fcn.0040d470
push edi
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.00401070
add esp, 0xc
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x268], eax
lea esi, [ebx + 0x204]
mov dword [ebp - 0x124], 0x245cb878
mov byte [ebp - 0x120], 0x5d
nop dword [eax + eax]
cmp dword [ebp + 0x1c], 0x10
lea edi, [ebp + 8]
mov eax, dword [ebx + 0x2c0]
cmovae edi, dword [ebp + 8]
test al, 1
jne 0x405018
or eax, 1
mov dword [ebx + 0x2c0], eax
mov byte [ebp - 4], 2
xorps xmm0, xmm0
movlpd qword [ebp - 0x11c], xmm0
mov edx, dword [ebp - 0x118]
mov eax, dword [ebp - 0x11c]
mov byte [esi + 5], 1
nop dword [eax]
mov cl, byte [ebp + eax - 0x124]
mov byte [eax + esi], cl
add eax, 1
adc edx, 0
jne 0x405007
cmp eax, 5
jb 0x404ff0
push 0x4130c0
call fcn.0040fe53
add esp, 4
mov byte [ebp - 4], 0
mov ecx, esi
call fcn.0040d410
lea eax, [ebp - 0x238]
push eax
push edi
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.00401070
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [ebp - 0x268]
lea eax, [ebp - 0x264]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404fb0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40509d
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405093
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405093
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040fd9c
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
Function at 0x405980
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
lea ecx, [ebp - 8]
mov eax, edx
push ecx
push 0x40
push 5
push eax
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push 5
push esi
mov esi, dword [ebp - 0xc]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 5
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret

Function at 0x4059e0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0x1c]
push str.ntdll.dll
mov dword [ebp - 0xc], edx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x405a83
push ebx
push str.RtlGetFullPathName_U
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x405a82
mov eax, 0x4197c0
mov dword [esi], ebx
sub eax, ebx
mov esi, ebx
mov ebx, dword [ebp - 0xc]
push edi
mov dword [ebp - 8], eax
mov edi, 5
push 0
push 1
add eax, esi
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov eax, dword [ebp - 8]
inc esi
sub edi, 1
jne 0x405a33
mov ebx, dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push eax
push 0x40
push 5
push ebx
push edi
call esi
push 0
push 5
push 0x41444c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 5
push ebx
push edi
call esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
Function at 0x40a9b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40a9dc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x40a9fe
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x40aa00
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x40aa85
jg 0x40aa15
test esi, esi
je 0x40aa85
test ecx, ecx
jl 0x40aa68
jg 0x40aa1f
test eax, eax
je 0x40aa68
cmp edi, ecx
jg 0x40aa33
jl 0x40aa29
cmp esi, eax
jae 0x40aa33
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov eax, dword [ebx + 0x30]
sub esi, ecx
mov edx, dword [ebp + 8]
sbb edi, dword [esp + 0x10]
add edx, ecx
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x40aa85
jg 0x40aa6b
test esi, esi
je 0x40aa85
jmp 0x40aa6b
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40aa85
push eax
push esi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40aaa0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x40aacc
jl 0x40aac0
test esi, esi
jne 0x40aacc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40aae5
push eax
push esi
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, esi
mov edx, dword [eax]
test edx, edx
je 0x40ab1f
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x40ab1f
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
mov edx, edi
je 0x40aba0
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40ab48
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, edi
mov ecx, dword [ebp - 4]
cmp edi, 0xfff
jbe 0x40ab8c
nop word [eax + eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp - 4]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x40abb3
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x40ab60
test edx, edx
je 0x40aba0
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, edi
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40af10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40af40
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x40af70
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x40af70
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x40b046
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40af99
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40afa5
movsx eax, bl
jmp 0x40afdd
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x40b007
sub eax, 1
je 0x40b007
sub eax, 2
jne 0x40b046
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40b025
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40b046
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x40b046
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret 4
Function at 0x40d530
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40d5ec
cmp byte [esi + 0x3d], 0
je 0x40d5ec
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40d5da
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x40d5a1
sub eax, 1
je 0x40d5a5
sub eax, 2
jne 0x40d5da
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40d5c3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40d5da
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
Function at 0x40f820
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41268d
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp - 0x84]
push dword [ebp + 0x18]
cmovae eax, dword [ebp + 8]
push eax
mov byte [ebp - 0x84], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0x67452301
mov dword [ebp - 0x34], 0xefcdab89
mov dword [ebp - 0x30], 0x98badcfe
mov dword [ebp - 0x2c], 0x10325476
call fcn.0040f6b0
cmp byte [ebp - 0x84], 0
jne 0x40f971
xor edx, edx
lea ecx, [ebp - 0x3f]
movzx eax, byte [ecx - 1]
lea ecx, [ecx + 4]
mov byte [ebp + edx - 0x18], al
movzx eax, byte [ecx - 4]
mov byte [ebp + edx - 0x17], al
movzx eax, byte [ecx - 3]
mov byte [ebp + edx - 0x16], al
movzx eax, byte [ecx - 2]
mov byte [ebp + edx - 0x15], al
add edx, 4
cmp edx, 8
jb 0x40f8b5
mov edx, dword [ebp - 0x40]
mov ecx, 0x78
shr edx, 3
mov eax, 0x38
and edx, 0x3f
sub ecx, edx
sub eax, edx
cmp edx, 0x38
cmovae eax, ecx
lea ecx, [ebp - 0x84]
push eax
push 0x419018
call fcn.0040f6b0
push 8
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x84]
call fcn.0040f6b0
xor edx, edx
lea ecx, [ebp - 0x37]
movzx eax, byte [ecx - 1]
lea ecx, [ecx + 4]
mov byte [ebp + edx - 0x28], al
movzx eax, byte [ecx - 4]
mov byte [ebp + edx - 0x27], al
movzx eax, byte [ecx - 3]
mov byte [ebp + edx - 0x26], al
movzx eax, byte [ecx - 2]
mov byte [ebp + edx - 0x25], al
add edx, 4
cmp edx, 0x10
jb 0x40f924
push 0x40
lea eax, [ebp - 0x83]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
mov byte [ebp - 0x84], 1
add esp, 0xc
movq qword [ebp - 0x40], xmm0
push esi
lea ecx, [ebp - 0x84]
call fcn.0040f760
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40f9b3
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f9a9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f9a9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040fd9c
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fb0d
mov esp, ebp
pop ebp
ret
Function at 0x100c855
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x102e77c]
push ebx
push esi
push edi
push 4
pop edi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x210]
push eax
push 1
xor esi, esi
push esi
push 0x1001808
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x210], esi
xor ebx, ebx
mov dword [ebp - 0x21c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100c945
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x214]
push eax
push esi
push 0x10017f8
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100c8e0
cmp dword [ebp - 0x214], edi
jne 0x100c8de
cmp dword [ebp - 0x218], esi
je 0x100c8de
inc ebx
jmp 0x100c8e0
xor ebx, ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, esi
je 0x100c945
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x10017bc
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x100c945
push 2
pop edi
push esi
push 0x80000080
push 2
push esi
push 1
push 0xc0000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x102e060], eax
jne 0x100c945
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec edi
cmp edi, esi
jg 0x100c90e
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0102222e
leave
ret

Function at 0x100c9d4
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
cmp dword [0x102e060], 0xffffffff
mov eax, dword [0x102e77c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
je 0x100ca53
push dword [ebp + 0xc]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
pop ecx
pop ecx
inc eax
push eax
push 0x1001858
lea eax, [ebp - 0x2c]
push 0x28
push eax
call fcn.0100c96e
add esp, 0x14
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x34], eax
je 0x100ca53
lea eax, [ebp - 0x2c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100ca23
push 0
lea ecx, [ebp - 0x30]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [0x102e060]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x2c]
push eax
push 0x1001854
call sub.ntdll.dll_DbgPrint
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
call fcn.0102222e
leave
ret 8
Function at 0x100ca64
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x410
cmp dword [0x102e060], 0xffffffff
mov eax, dword [0x102e77c]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
je 0x100cb1a
push eax
push 0x1001868
lea eax, [ebp - 0x40c]
push 9
push eax
call fcn.0100c96e
add esp, 0x10
test eax, eax
jne 0x100cb1a
push edi
push esi
mov esi, 0x400
push esi
lea eax, [ebp - 0x404]
push eax
call fcn.0100c7c7
test eax, eax
jne 0x100cb1a
push 0x1001864
push esi
lea eax, [ebp - 0x40c]
push eax
call fcn.0100c99c
test eax, eax
jne 0x100cb1a
lea eax, [ebp - 0x40c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100cae1
push 0
lea ecx, [ebp - 0x410]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x40c]
push eax
push dword [0x102e060]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x40c]
push eax
push 0x1001854
call sub.ntdll.dll_DbgPrint
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0102222e
leave
ret 0xc
Function at 0x1010661
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
lea eax, [ebp - 8]
push eax
xor ebx, ebx
push 1
push ebx
push 0x1002aa8
push reloc.WS2_32.dll_bind
mov byte [ebp - 1], bl
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10106b3
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push 0x1002a70
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10106b3
cmp dword [ebp - 0xc], 4
jbe 0x10106b3
mov byte [ebp - 1], 1
cmp dword [ebp - 8], ebx
pop ebx
je 0x10106c2
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 1]
leave
ret

Function at 0x101088a
Capabilities:
Shutdown system

Disassembly:
mov eax, 0x1027d07
call fcn.01022df8
sub esp, 0x18
push ebx
push esi
push edi
xor eax, eax
xor esi, esi
mov dword [ebp - 0x24], esi
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
push eax
push 0x28
mov ebx, ecx
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10108e3
push 0x1e1
push 0x1002ba0
call fcn.0100c9d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002d94
jmp 0x10109b2
lea eax, [ebp - 0x20]
push eax
push 0x1002d6c
push esi
mov dword [ebp - 0x24], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1010915
push 0x1f1
push 0x1002ba0
call fcn.0100c9d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x101094a
push esi
push esi
push esi
lea eax, [ebp - 0x24]
push eax
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x18], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x1010952
push 0x202
push 0x1002ba0
call fcn.0100c9d4
call edi
push eax
push 0x1002d48
jmp 0x10109b2
mov ecx, dword [ebx + 0xc4]
push 0x4ea4
lea eax, [ebp - 0x14]
push eax
call fcn.0100cd2b
push 0x80020004
push 1
push esi
push 0x1e
push esi
mov ecx, eax
mov dword [ebp - 4], esi
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownExW]
mov ebx, eax
neg ebx
sbb bl, bl
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
inc bl
call sub.MFC42u.DLL_CString::CString
test bl, bl
je 0x10109b9
push 0x216
push 0x1002ba0
call fcn.0100c9d4
call edi
push eax
push 0x1002d24
call fcn.0100cb4a
pop ecx
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x10109d6
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x102e77c]
push esi
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
jbe 0x1010aa8
push edi
push 0x10
pop ecx
xor eax, eax
lea edi, [ebp - 0x25c]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x21c], esi
lea edi, [ebp - 0x218]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x260]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
mov dword [ebp - 0x260], 0x44
mov dword [ebp - 0x234], 1
mov word [ebp - 0x230], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
pop edi
je 0x1010a86
push dword [ebp - 0x21c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x218]
call esi
jmp 0x1010aa8
push 0x250
push 0x1002ba0
call fcn.0100c9d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002db4
call fcn.0100cb2d
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop esi
call fcn.0102222e
leave
ret

Function at 0x101179a
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x102e77c]
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
xor esi, esi
push eax
inc esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x101180c
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push ebx
call sub.ADVAPI32.dll_CheckTokenMembership
test eax, eax
je 0x1011803
cmp dword [ebp - 0x14], ebx
je 0x1011803
xor esi, esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
call fcn.0102222e
leave
ret