joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401aa0
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x420], 0x208
push esi
lea edx, [ebp - 0x41c]
mov dword [ebp - 0x418], eax
lea ecx, [ebp - 0x418]
mov dword [ebp - 0x41c], eax
call fcn.00401979
mov esi, eax
test esi, esi
jne 0x401bf0
mov edx, dword [ebp - 0x41c]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x414]
push eax
push ecx
push ecx
mov ecx, dword [ebp - 0x418]
call fcn.00401a21
mov esi, eax
test esi, esi
jne 0x401bc6
mov esi, 0x104
lea eax, [ebp - 0x20c]
push esi
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x401b3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x401bc6
cmp eax, esi
jbe 0x401b48
push 0x7a
pop esi
jmp 0x401bc6
push edi
lea edi, [ebp - 0x20c]
xor edx, edx
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, dx
jne 0x401b54
push ecx
sub edi, ecx
mov edx, 0x4011ec
push esi
lea ecx, [ebp - 0x20c]
sar edi, 1
call fcn.00402336
test eax, eax
je 0x401bbd
lea ecx, [ebp - 0x20c]
call fcn.0040254c
mov esi, eax
test esi, esi
jne 0x401bc5
add edi, edi
cmp edi, 0x208
jae 0x401c0b
xor edx, edx
mov word [ebp + edi - 0x20c], ax
inc edx
lea ecx, [ebp - 0x20c]
call fcn.00402730
test eax, eax
je 0x401bbd
lea ecx, [ebp - 0x20c]
call fcn.00402807
test eax, eax
jne 0x401bc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
pop edi
cmp dword [ebp - 0x418], 0
je 0x401bdb
push dword [ebp - 0x418]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0x41c], 0
je 0x401bf0
push dword [ebp - 0x41c]
call dword [sym.imp.ntdll.dll_NtClose]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop esi
sete al
xor ecx, ebp
call fcn.00402cb0
leave
ret
call fcn.004031eb
int3

Function at 0x401f87
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
mov word [ebp - 8], 0x500
push ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
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]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401ff8
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x401ff8
cmp dword [ebp - 0x14], ebx
jne 0x402009
mov ebx, 0x529
jmp 0x402009
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x402009
mov ebx, 0x507
cmp dword [ebp - 0x10], 0
je 0x402018
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
pop ebx
sete al
xor ecx, ebp
call fcn.00402cb0
leave
ret
Function at 0x4021f5
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x20], ecx
xor edi, edi
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x402242
mov ebx, dword [eax]
add ebx, 0xf
mov ecx, ebx
call fcn.004028a4
mov esi, eax
test esi, esi
jne 0x402248
push 0xe
pop edi
jmp 0x4022c7
push 0x10
lea esi, [ebp - 0x14]
pop ebx
push dword [ebp - 0x1c]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x2c]
push eax
push ebx
push esi
push 2
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
test eax, eax
jns 0x402280
cmp eax, 0x80000005
je 0x402280
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov edi, eax
jmp 0x4022b5
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x18]
test ecx, ecx
je 0x4022a4
mov eax, dword [esi + 8]
cmp dword [ebx], eax
jb 0x4022a1
push eax
lea eax, [esi + 0xc]
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x4022a4
push 0x7a
pop edi
mov ecx, dword [ebp - 0x28]
mov eax, dword [esi + 8]
mov dword [ebx], eax
test ecx, ecx
je 0x4022b5
mov eax, dword [esi + 4]
mov dword [ecx], eax
test esi, esi
je 0x4022c7
lea eax, [ebp - 0x14]
cmp esi, eax
je 0x4022c7
mov ecx, esi
call fcn.004028e3
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402cb0
leave
ret 0xc
Function at 0x40254c
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x214]
mov esi, 0x104
push eax
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, esi
jae 0x402663
test eax, eax
jne 0x402598
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x402666
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x402663
lea ecx, [ebp - 0x210]
cmp eax, ecx
je 0x402663
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x210]
push 0x5c
pop esi
cmp cx, 0x41
jb 0x4025ce
cmp cx, 0x5a
jbe 0x4025d7
lea eax, [ecx - 0x61]
cmp ax, 0x19
ja 0x4025f0
cmp word [ebp - 0x20e], 0x3a
jne 0x4025f0
cmp word [ebp - 0x20c], si
jne 0x402663
lea ebx, [ebp - 0x20c]
cmp cx, si
jne 0x402625
cmp word [ebp - 0x20e], si
jne 0x402625
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x402663
add eax, 2
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x402663
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402643
test al, 0x10
je 0x4026c3
xor eax, eax
jmp 0x402666
mov edi, dword [ebp - 0x214]
lea eax, [ebp - 0x210]
cmp edi, eax
jne 0x402657
mov edi, eax
jmp 0x40265a
add edi, 0xfffffffe
cmp edi, ebx
je 0x402663
cmp word [edi], si
je 0x4026b9
push 0x7b
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402cb0
leave
ret
xor eax, eax
mov dword [ebp - 0x218], edi
mov word [edi], ax
lea eax, [ebp - 0x210]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x402663
movzx esi, word [edi + 2]
xor eax, eax
mov word [edi + 2], ax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov word [edi + 2], si
cmp eax, 0xffffffff
jne 0x4026bf
push 0x5c
pop esi
cmp edi, ebx
ja 0x402675
jmp 0x402663
test al, 0x10
jne 0x4026ca
mov eax, 0x10b
jmp 0x402666
mov esi, dword [ebp - 0x218]
cmp esi, ebx
jbe 0x402663
xor ebx, ebx
lea eax, [ebp - 0x210]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40258d
push 0x5c
pop edi
cmp word [esi + 2], bx
je 0x40263f
mov ecx, esi
mov word [esi], di
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x402701
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ebx
push eax
lea esi, [esi + ecx*2]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4026ef
jmp 0x40258d
Function at 0x10033ab0
Capabilities:
Packed with generic packer

Disassembly:
cmp byte [esp + 8], 1
jne 0x10033c74
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2a000]
push edi
jmp 0x10033ada
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x10033ae1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x10033ad0
mov eax, 1
add ebx, ebx
jne 0x10033af3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x10033ae8
jne 0x10033b04
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x10033ae8
xor ecx, ecx
sub eax, 3
jb 0x10033b18
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x10033b8a
mov ebp, eax
add ebx, ebx
jne 0x10033b23
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x10033b30
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x10033b54
inc ecx
add ebx, ebx
jne 0x10033b40
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x10033b35
jne 0x10033b51
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x10033b35
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x10033b74
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x10033b65
jmp 0x10033ad6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x10033b74
add edi, ecx
jmp 0x10033ad6
pop esi
mov edi, esi
mov ecx, 0x576
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x10033b92
cmp byte [edi], 2
jne 0x10033b92
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x10033b97
lea edi, [esi + 0x30000]
mov eax, dword [edi]
or eax, eax
je 0x10033c06
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x33000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x330a0]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x10033bc4
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x330a4]
or eax, eax
je 0x10033c00
mov dword [ebx], eax
add ebx, 4
jmp 0x10033be1
popal
xor eax, eax
ret 0xc
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x10033c37
cmp al, 0xef
ja 0x10033c2a
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x10033c0c
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x10033c19
mov ebp, dword [esi + 0x330a8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x10033c6b
sub esp, 0xffffff80
jmp 0x1000f23f
Function at 0x401b00
Capabilities:
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x48
push ebx
mov ebx, dword [esp + 0x54]
push esi
push edi
push eax
lea ecx, [esp + 0x1c]
xor esi, esi
push ecx
mov dword [esp + 0x64], esi
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push esi
push esi
push 0x860
push 1
push 1
push 0x80
push esi
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
lea edx, [esp + 0x38]
push ecx
mov dword [esp + 0x4c], edx
push 0xc0000004
lea edx, [esp + 0x84]
push edx
mov dword [esp + 0x4c], 0x18
mov dword [esp + 0x50], esi
mov dword [esp + 0x58], 0x240
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
test eax, eax
jge 0x401b7d
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x48
ret 8
mov edx, dword [esp + 0x5c]
push 5
push 0x18
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov ecx, dword [esp + 0x58]
push esi
lea eax, [esp + 0x44]
push eax
mov eax, dword [esp + 0x64]
push ebx
push ecx
lea edx, [esp + 0x20]
push edx
push esi
push esi
push esi
push eax
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov edi, eax
mov eax, dword [esp + 0x5c]
cmp eax, esi
je 0x401bc6
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, edi
neg eax
sbb eax, eax
pop edi
not eax
pop esi
and eax, ebx
pop ebx
add esp, 0x48
ret 8

Function at 0x401be0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x38
push ebx
mov ebx, dword [esp + 0x44]
push esi
push edi
xor esi, esi
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push 0x100
push esi
push esi
push esi
push esi
push 0x20
push 3
push 3
push esi
push esi
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x54]
lea edx, [esp + 0x44]
push ecx
mov dword [esp + 0x60], edx
push 0xc0000004
lea edx, [esp + 0x80]
push edx
mov dword [esp + 0x60], 0x18
mov dword [esp + 0x64], esi
mov dword [esp + 0x6c], 0x240
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
call dword [sym.imp.ntoskrnl.exe_IoCreateFile]
test eax, eax
jge 0x401c65
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x38
ret 8
mov ecx, dword [esp + 0x48]
push esi
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x54]
push ebx
push ecx
lea edx, [esp + 0x30]
push edx
push esi
push esi
push esi
push eax
call dword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov edi, eax
mov eax, dword [esp + 0x4c]
cmp eax, esi
je 0x401c95
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, edi
neg eax
sbb eax, eax
pop edi
not eax
pop esi
and eax, ebx
pop ebx
add esp, 0x38
ret 8
Function at 0x401cb0
Capabilities:
Get file attributes
Read file on windows

Disassembly:
sub esp, 0x24c
push ebx
push ebp
mov ebp, dword [esp + 0x258]
xor ebx, ebx
push edi
mov edi, ecx
mov dword [esp + 0xc], ebx
cmp ebp, ebx
je 0x401ccf
mov dword [ebp], ebx
push edi
push eax
lea ecx, [esp + 0x58]
push ecx
call sub.ntoskrnl.exe_memcpy
mov eax, edi
cdq
sub eax, edx
sar eax, 1
xor edx, edx
add esp, 0xc
mov word [esp + eax*2 + 0x50], dx
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push ebx
push ebx
push 0x860
push 1
push 1
push 0x80
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x38]
lea edx, [esp + 0x50]
push ecx
mov dword [esp + 0x44], edx
push 0x80000000
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x44], 0x18
mov dword [esp + 0x48], ebx
mov dword [esp + 0x50], 0x240
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esi], ebx
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
test eax, eax
jl 0x401d79
mov edx, dword [esp + 0xc]
push 5
push 0x18
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
test eax, eax
je 0x401d87
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x24c
ret 4
mov eax, dword [esp + 0x40]
push 0x4d6c7431
push eax
push ebx
mov dword [ebp], eax
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov dword [esi], eax
cmp eax, ebx
je 0x401d79
mov ecx, dword [esp + 0x40]
push ebx
push ebx
push ecx
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push edx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov edi, dword [sym.imp.ntoskrnl.exe_ZwClose]
test eax, eax
je 0x401dd9
mov ecx, dword [esp + 0xc]
push ecx
call edi
mov edx, dword [esi]
push ebx
push edx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov dword [esi], ebx
mov eax, dword [esp + 0xc]
push eax
call edi
mov eax, dword [ebp]
pop edi
pop ebp
pop ebx
add esp, 0x24c
ret 4
Function at 0x401df0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push eax
lea ecx, [esp + 0x2c]
push ecx
xor ebp, ebp
xor esi, esi
call edi
mov edx, dword [esp + 0x4c]
push edx
lea eax, [esp + 0x24]
push eax
call edi
push ebp
push ebp
push ebp
push ebp
lea edx, [esp + 0x40]
push edx
push 0xf003f
lea eax, [esp + 0x30]
lea ecx, [esp + 0x40]
push eax
mov dword [esp + 0x4c], 0x18
mov dword [esp + 0x50], ebp
mov dword [esp + 0x58], 0x40
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebp
call dword [sym.imp.ntoskrnl.exe_ZwCreateKey]
mov eax, dword [esp + 0x18]
mov ebx, dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
lea ecx, [esp + 0x14]
push ecx
push ebp
push ebp
push 2
lea edx, [esp + 0x30]
push edx
push eax
call ebx
mov edi, eax
cmp edi, 0xc0000023
jne 0x401ec1
mov ecx, dword [esp + 0x14]
push ecx
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov esi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push eax
push esi
push 2
lea ecx, [esp + 0x30]
push ecx
push edx
call ebx
mov edi, eax
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0x54]
ja 0x401ec1
mov ecx, dword [esp + 0x50]
push eax
lea eax, [esi + 0xc]
push eax
push ecx
call sub.ntoskrnl.exe_memcpy
mov ebx, dword [esi + 8]
add esp, 0xc
jmp 0x401ec3
mov ebx, ebp
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x401ed2
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
cmp esi, ebp
je 0x401ede
push ebp
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, edi
neg eax
pop edi
sbb eax, eax
pop esi
not eax
pop ebp
and eax, ebx
pop ebx
add esp, 0x38
ret 0xc

Function at 0x401f90
Capabilities:
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push edi
lea eax, [esp + 0x10]
push eax
xor ebp, ebp
push ebp
push ebp
push 5
mov dword [esp + 0x20], ebp
call sub.ntoskrnl.exe_NtQuerySystemInformation
mov ecx, dword [esp + 0x10]
push 0x4d6c7431
push ecx
push ebp
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov edi, eax
cmp edi, ebp
jne 0x401fca
pop edi
pop ebp
xor eax, eax
pop ebx
ret 4
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
push edx
push eax
push edi
push 5
call sub.ntoskrnl.exe_NtQuerySystemInformation
test eax, eax
jne 0x402046
push esi
mov esi, edi
cmp dword [esi + 0x44], ebp
je 0x40202f
cmp word [esi + 0x38], bp
jbe 0x40202f
mov ecx, dword [esi + 0x3c]
push ecx
call sub.ntoskrnl.exe__wcslwr
mov ecx, dword [esi + 0x3c]
add esp, 4
mov eax, ebx
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402026
test dx, dx
je 0x402022
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402026
add eax, 4
add ecx, 4
test dx, dx
jne 0x402000
xor eax, eax
jmp 0x40202b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402039
mov eax, dword [esi]
test eax, eax
je 0x40203c
add esi, eax
jmp 0x401fe3
mov ebp, dword [esi + 0x44]
push 0
push edi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
ret 4
Function at 0x402360
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x20
inc dword [0x40d6b4]
push ebx
push ebp
push edi
push 0x40
push 0x1000
mov edi, eax
xor ebp, ebp
lea eax, [esp + 0x14]
push eax
push ebp
push 0x40d6b0
mov dword [esi + 0x28], ebp
mov dword [esi + 0x20], ebp
push edi
mov dword [esp + 0x24], 0x1000
mov dword [0x40d6b0], ebp
call sub.ntoskrnl.exe_ZwAllocateVirtualMemory
mov ebx, dword [0x40d6b0]
mov eax, dword [0x40d6c0]
mov dword [0x40d6b4], ebp
mov dword [0x40d060], ebx
mov dword [esi + 0x24], edi
mov dword [esp + 0x10], ebp
cmp eax, ebp
je 0x4023d8
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x34]
push 0x15
lea edx, [esp + 0x1c]
push edx
push ecx
push edi
call eax
mov ebx, dword [0x40d060]
lea edx, [esp + 0x14]
push edx
call fcn.004015a0
push 0x4d6c7431
mov edi, eax
lea eax, [ebx + edi + 0xa]
push 0x14
mov dword [esi + 0xc], ebx
mov ebx, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
push ebp
mov dword [0x40d060], eax
call ebx
push 0x4d6c7431
push 0x14
push ebp
mov dword [esi + 0x10], eax
call ebx
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push esi
mov dword [esi + 0x14], eax
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
mov dword [esi + 0x18], edi
call fcn.00402510
pop edi
pop ebp
mov eax, esi
pop ebx
add esp, 0x20
ret 8

Function at 0x402670
Capabilities:
Complete processing asynchronous io request

Disassembly:
sub esp, 0x28
push esi
push 0
push 0
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x14], 0xfa0a1f00
mov dword [esp + 0x18], 0xffffffff
call dword [sym.imp.ntoskrnl.exe_KeInitializeEvent]
mov eax, dword [edi + 0x18]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
push 1
push 0
push 0
push 0
push 0
push eax
push 3
call dword [sym.imp.ntoskrnl.exe_IoBuildDeviceIoControlRequest]
mov esi, eax
test esi, esi
je 0x402754
mov eax, dword [esi + 0x60]
mov dword [eax - 8], 0
mov dword [eax - 4], 0
mov byte [eax - 0x21], 0
sub eax, 0x24
mov eax, dword [esi + 0x60]
sub eax, 0x24
mov byte [eax], 0xf
mov byte [eax + 1], 0xb
mov ecx, dword [edi + 0x18]
mov dword [eax + 0x14], ecx
mov edx, dword [edi + 0x14]
mov dword [eax + 0x18], edx
mov dword [eax + 4], 4
mov dword [eax + 8], 0x402770
mov dword [eax + 0xc], edi
mov eax, dword [esi + 0x60]
sub eax, 0x24
lea ecx, [esp + 0x18]
mov dword [eax + 0x1c], 0x402650
mov dword [eax + 0x20], ecx
mov byte [eax + 3], 0xe0
mov ecx, dword [edi + 0x18]
mov edx, esi
call dword [sym.imp.ntoskrnl.exe_IofCallDriver]
cmp eax, 0x103
jne 0x40273f
lea edx, [esp + 8]
push edx
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.ntoskrnl.exe_KeWaitForSingleObject]
test eax, eax
je 0x40275e
cmp eax, 0x103
je 0x40275e
xor dl, dl
mov ecx, esi
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
mov eax, 0xc0000001
pop esi
add esp, 0x28
ret
xor dl, dl
mov ecx, esi
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
xor eax, eax
pop esi
add esp, 0x28
ret
Function at 0x402c70
Capabilities:
Complete processing asynchronous io request

Disassembly:
mov eax, dword [edi]
push ebx
push ebp
mov ebp, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push esi
test eax, eax
je 0x402c84
push 0
push eax
call ebp
mov ecx, dword [edi + 0x14]
mov esi, dword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
call esi
mov ecx, dword [edi + 0x18]
call esi
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x402ca3
xor dl, dl
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
mov eax, dword [edi + 0x20]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
push 0
push 0x186a0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 1
call fcn.00401f00
lea esi, [edi + 0x40]
cmp dword [esi], esi
je 0x402ce7
lea ebx, [edi + 0x48]
push 0x53556470
mov edx, ebx
mov ecx, esi
call dword [sym.imp.ntoskrnl.exe_ExfInterlockedRemoveHeadList]
push eax
call ebp
cmp dword [esi], esi
jne 0x402cd1
push 0x53556470
push edi
call ebp
pop esi
pop ebp
mov eax, 1
pop ebx
ret