joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e05e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x34
push 0x421180
call fcn.004208d8
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], ecx
or eax, 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x38]
push ecx
push 3
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ntdll.dll_LdrFindResource_U]
jmp 0x40e0b7
push 0xfffffffffffffffe
mov dword [ebp - 0x2c], eax
pop esi
mov dword [ebp - 4], esi
test eax, eax
js 0x40e141
mov dword [ebp - 4], 1
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x34]
call dword [sym.imp.ntdll.dll_LdrAccessResource]
jmp 0x40e0f0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], esi
test eax, eax
js 0x40e141
mov dword [ebp - 4], 2
cmp dword [ebp - 0x44], 0x5c
jb 0x40e12e
push 0x404b30
mov eax, dword [ebp - 0x30]
add eax, 6
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40e12e
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], esi
jmp 0x40e141
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
call fcn.00420920
ret 4

Function at 0x40e3c8
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
xor ecx, ecx
mov dword [ebp - 4], ecx
test esi, esi
je 0x40e453
mov edx, dword [ebp + 8]
test edx, edx
je 0x40e453
push ebx
lea eax, [esi + edx]
lea ebx, [esi + 0x10040]
mov dword [ebp - 8], eax
cmp ebx, eax
jbe 0x40e3f2
mov ebx, eax
push edi
mov edi, esi
lea eax, [esi + 0x40]
jmp 0x40e44d
mov ecx, dword [eax - 4]
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x40e444
lea eax, [edi + 0xf8]
add eax, ecx
cmp eax, dword [ebp - 8]
jae 0x40e444
cmp dword [ecx + edi], 0x4550
jne 0x40e444
mov eax, 0x14c
cmp word [ecx + edi + 4], ax
jne 0x40e444
mov eax, esi
sub eax, edi
add eax, edx
push eax
push edi
call fcn.0040e45e
mov ecx, eax
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x40e451
mov edx, dword [ebp + 8]
jmp 0x40e447
mov ecx, dword [ebp - 4]
add edi, dword [ebp + 0xc]
lea eax, [edi + 0x40]
cmp eax, ebx
jb 0x40e3fa
pop edi
pop ebx
mov eax, ecx
leave
ret 8
Function at 0x40e67f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push esi
xor esi, esi
test ecx, ecx
je 0x40e71f
cmp dword [ebp + 8], esi
je 0x40e71f
push ebx
push edi
xor ebx, ebx
call fcn.0040f23b
mov edi, eax
test edi, edi
je 0x40e6dc
mov ecx, dword [ebp + 8]
call fcn.0040f23b
mov esi, eax
test esi, esi
je 0x40e6dc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e6cd
mov ecx, esi
call fcn.0040eda2
mov eax, dword [ebp + 0xc]
push edi
mov ecx, esi
call fcn.0040e733
mov ebx, eax
jmp 0x40e6df
mov ebx, dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
test edi, edi
je 0x40e6fc
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x40e710
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, ebx
pop ebx
jmp 0x40e729
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 8
Function at 0x40e733
Capabilities:
Copy file
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 8], 0
push esi
mov esi, eax
xor eax, eax
push edi
mov edi, ecx
mov dword [ebp - 4], eax
test esi, 0xfffffff0
je 0x40e761
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40e8ce
test esi, 1
je 0x40e76f
xor eax, eax
inc eax
mov dword [ebp - 4], eax
test esi, 8
je 0x40e77f
or eax, 0x1000
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push ebx
xor ebx, ebx
call fcn.0040f23b
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40e8ca
mov ecx, edi
call fcn.0040f23b
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40e8a5
and dword [ebp - 0xc], ebx
push dword [ebp - 4]
and dword [ebp - 0x10], 0
push 0
push 0
push 0
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
mov ebx, eax
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x40e829
test esi, 2
je 0x40e8a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xc]
lea edx, [ebp - 0x10]
inc ecx
push edx
push ecx
mov ebx, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], ecx
call fcn.0040ece0
test eax, eax
je 0x40e8a5
mov ebx, dword [ebp - 0x10]
push ebx
push dword [ebp - 0x14]
push edi
push dword [ebp + 8]
push 0x404c28
push 0x4000000
push 0x422710
call fcn.0040e49c
add esp, 0x1c
test ebx, ebx
je 0x40e7aa
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e7aa
test esi, 4
je 0x40e8a5
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x40e8a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0x1f
pop ebx
test esi, esi
jne 0x40e855
mov esi, ebx
push esi
push edi
push 0x404cc0
push 0x2000000
push 0x422710
call fcn.0040e49c
add esp, 0x14
mov ecx, edi
call fcn.0040eda2
test eax, eax
jne 0x40e89e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40e885
mov ebx, eax
push ebx
push edi
push 0x404d60
push 0x2000000
push 0x422710
call fcn.0040e49c
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40e8ca
push eax
push 0
call esi
push eax
call edi
mov eax, dword [ebp - 8]
pop ebx
pop edi
pop esi
leave
ret 4
Function at 0x40f0ce
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push edi
xor edi, edi
test ecx, ecx
je 0x40f13a
xor eax, eax
cmp ax, word [ecx]
je 0x40f13a
push ebx
xor ebx, ebx
call fcn.0040f23b
mov ebx, eax
test ebx, ebx
je 0x40f135
push esi
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f102
test al, 0x10
je 0x40f102
inc edi
jmp 0x40f11d
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x40f115
mov esi, 0x10b
cmp esi, 2
jne 0x40f11d
push 3
pop esi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
ret

Function at 0x40f14b
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
push ebx
push esi
xor esi, esi
push edi
test ecx, ecx
je 0x40f227
xor eax, eax
cmp ax, word [ecx]
je 0x40f227
xor ebx, ebx
call fcn.0040f23b
mov edi, eax
test edi, edi
je 0x40f22f
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f203
test eax, 0x800
je 0x40f1fa
mov ebx, 0x80
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40f203
push esi
push ebx
push 3
push esi
push 7
push 0xc0010000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40f203
xor ecx, ecx
push ecx
lea eax, [ebp - 0xc]
push eax
push ecx
push ecx
push 2
lea eax, [ebp - 8]
push eax
push 0x9c040
push ebx
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40f1e9
mov dword [ebp - 4], 1
jmp 0x40f1f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f20b
mov dword [ebp - 4], 1
jmp 0x40f20b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
jmp 0x40f231
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40f42a
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
test esi, esi
je 0x40f5ae
cmp ax, word [esi]
je 0x40f5ae
push ebx
lea ebx, [ebp - 4]
mov ecx, esi
call fcn.0040f23b
mov ebx, eax
test ebx, ebx
je 0x40f599
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
mov eax, ebx
call fcn.0040f69d
test eax, eax
js 0x40f55b
cmp dword [ebp - 8], 1
push 0x5c
pop ecx
jne 0x40f4fb
mov edx, dword [ebp - 0xc]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x14]
jne 0x40f498
mov eax, dword [ebp - 4]
sub ecx, esi
sar ecx, 1
lea esi, [eax + ecx*2]
test edx, edx
je 0x40f4c3
push edx
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x5c
pop ecx
xor edi, edi
push ecx
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
mov esi, eax
pop ecx
mov ecx, ebx
test esi, esi
je 0x40f529
xor eax, eax
mov word [esi], ax
call fcn.0040f0ce
test eax, eax
jne 0x40f4f0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
pop ecx
mov word [esi], cx
add esi, 2
jmp 0x40f4c8
mov esi, dword [ebp - 4]
movzx eax, word [esi]
cmp eax, 0x61
jb 0x40f50b
cmp eax, 0x7a
jbe 0x40f515
cmp eax, 0x41
jb 0x40f4c6
cmp eax, 0x5a
ja 0x40f4c6
push 0x3a
pop eax
cmp ax, word [esi + 2]
jne 0x40f4c6
cmp cx, word [esi + 4]
jne 0x40f4c6
add esi, 8
jmp 0x40f4c6
call fcn.0040f0ce
xor esi, esi
inc esi
cmp eax, esi
je 0x40f556
xor eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, esi
je 0x40f556
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp + 8]
push 0x4050c0
jmp 0x40f574
mov dword [ebp - 0x10], esi
jmp 0x40f586
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x405120
push 0x3000000
push 0x422710
call fcn.0040e49c
add esp, 0x14
push ebx
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40f5a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x10]
pop ebx
jmp 0x40f5b8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
leave
ret 4
Function at 0x40fbf0
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
mov dword [eax], ecx
lea eax, [esp + 0xc]
push eax
push 0x20019
push 0x4209b8
push esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ecx
call fcn.00414572
mov ebx, eax
test ebx, ebx
js 0x40fccf
push edi
lea edx, [esp + 0x20]
call fcn.0040ff12
test al, al
je 0x40fc97
mov eax, dword [esp + 0x1c]
dec eax
je 0x40fc6e
dec eax
je 0x40fc60
mov ebx, 0xc000000d
jmp 0x40fc91
push esi
lea ecx, [esp + 0x24]
call fcn.0040ff5a
mov ebx, eax
jmp 0x40fc91
push 0
push 0x20
lea eax, [esp + 0x38]
push eax
push 0x5a
call dword [sym.imp.ntdll.dll_ZwQuerySystemInformation]
mov ebx, eax
test ebx, ebx
js 0x40fccf
lea esi, [esp + 0x30]
lea edi, [esp + 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
test ebx, ebx
js 0x40fccf
jmp 0x40fca1
mov esi, edi
lea edi, [esp + 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.ntdll.dll_RtlStringFromGUID]
mov ebx, eax
test ebx, ebx
js 0x40fccf
push dword [esp + 0x18]
push 0xf003f
push dword [esp + 0x1c]
push dword [esp + 0x18]
call fcn.00414572
mov ebx, eax
cmp dword [esp + 0x14], 0
je 0x40fce1
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
cmp dword [esp + 0xc], 0
je 0x40fcf1
push dword [esp + 0xc]
call fcn.00414312
mov ecx, dword [esp + 0x54]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0041b8aa
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4120ea
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call fcn.00411c70
mov esi, eax
test esi, esi
js 0x41219d
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x412117
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
sub ecx, edx
sar ecx, 1
add eax, 0xc
lea ebx, [ecx*2 + 2]
add eax, ebx
push eax
mov dword [ebp + 0xc], eax
mov eax, dword fs:[0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
test esi, esi
jne 0x41215c
mov esi, 0xc000009a
xor ebx, ebx
jmp 0x41219d
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov dword [esi], 1
mov dword [esi + 8], 5
mov eax, dword [ebp - 4]
push dword [eax + 8]
push eax
lea eax, [esi + 0xc]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push ebx
push dword [ebp + 0x10]
add eax, 0xc
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x18
xor ebx, ebx
mov dword [edi], esi
mov esi, ebx
cmp dword [ebp - 4], 0
je 0x4121b6
push dword [ebp - 4]
mov eax, dword fs:[0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
Function at 0x412b38
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor edx, edx
mov esi, 0x420b1e
push edi
mov ebx, eax
mov dword [ebp - 4], edx
mov edi, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x412b54
sub esi, ecx
sar esi, 1
push esi
push 0x420b1e
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x412cf8
lea eax, [ebx + esi*2]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], esi
test esi, esi
je 0x412cf8
sub eax, ebx
sar eax, 1
add eax, eax
mov dword [ebp - 8], eax
add eax, 2
push eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x412bc6
mov edi, 0xc000009a
jmp 0x412cfd
push dword [ebp - 8]
push ebx
mov ebx, dword [ebp - 0xc]
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0xc
xor ecx, ecx
mov word [eax + ebx], cx
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x412be4
sub ecx, edx
mov edx, esi
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 4]
jne 0x412bf9
sub edx, esi
sar edx, 1
lea eax, [edx*2 + 0x2e]
mov dword [ebp - 8], eax
lea eax, [eax + ecx*2]
add eax, 0x16
push eax
mov dword [ebp - 0xc], eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
test esi, esi
jne 0x412c3f
mov edi, 0xc000009a
jmp 0x412cca
push dword [ebp - 0xc]
xor eax, eax
push eax
push esi
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, edx
mov dword [esi + 0x14], eax
lea eax, [ecx + 2]
add esp, 0xc
mov dword [esi], 3
mov dword [ebp - 0x10], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x412c65
sub ecx, dword [ebp - 0x10]
push edx
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [esi + 0x18]
push eax
call fcn.0041bcf9
mov edx, dword [ebp - 8]
mov ecx, ebx
lea eax, [ecx + 2]
add esp, 0xc
mov dword [edx + esi], 2
mov dword [ebp - 0x10], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x412c99
sub ecx, dword [ebp - 0x10]
push ebx
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [edx + 0x14]
add eax, esi
push eax
call fcn.0041bcf9
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [ecx], eax
push ebx
mov ebx, dword [sym.imp.ntdll.dll_RtlFreeHeap]
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call ebx
test edi, edi
jns 0x412cfd
test esi, esi
je 0x412cfd
push esi
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call ebx
jmp 0x412cfd
mov edi, 0xc000000d
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x413e10
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
lea eax, [ebp - 4]
push eax
xor edi, edi
push edi
push edi
push 0x62
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
cmp esi, 0xc0000023
je 0x413e3d
test esi, esi
js 0x413eab
mov esi, 0xc0000001
jmp 0x413eab
push dword [ebp - 4]
mov eax, dword fs:[0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
test edi, edi
jne 0x413e5d
mov esi, 0xc000009a
jmp 0x413eab
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push 0x62
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
test esi, esi
js 0x413e99
movzx eax, word [edi]
mov ecx, dword [ebp + 0x10]
add eax, 2
mov dword [ecx], eax
cmp eax, dword [ebp + 0xc]
jbe 0x413e8a
mov esi, 0xc0000023
jmp 0x413e99
push eax
push dword [edi + 4]
push dword [ebp + 8]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword fs:[0x30]
push edi
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
leave
ret 0xc

Function at 0x4144da
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
push ebx
push edi
push dword [ebp + 8]
lea edx, [ebp - 0xc]
lea ecx, [ebp - 4]
call fcn.00414768
mov ebx, dword [ebp - 4]
test eax, eax
js 0x414536
xor edi, edi
cmp dword [ebp - 0xc], edi
jbe 0x414536
lea eax, [ebp - 8]
push eax
push 0xf003f
push dword [ebx + edi*4]
push dword [ebp + 8]
call fcn.00414572
test eax, eax
js 0x414530
push dword [ebp - 8]
call fcn.004144da
test eax, eax
jns 0x414530
push dword [ebp - 8]
call fcn.00414312
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x414504
test ebx, ebx
je 0x41454c
mov eax, dword fs:[0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_ZwDeleteKey]
mov edi, eax
test edi, edi
js 0x414564
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_ZwClose]
mov eax, edi
pop edi
pop ebx
leave
ret 4
Function at 0x414a00
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Query or enumerate registry key

Disassembly:
push 0x18
push 0x4212f8
call fcn.0041c48c
xor edi, edi
mov dword [ebp - 0x24], edi
mov ebx, edi
mov dword [ebp - 0x20], edi
lea eax, [ebp - 0x20]
push eax
push edi
push edi
push edi
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_ZwQueryKey]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, 0xc0000023
je 0x414a45
test esi, esi
js 0x414ac3
mov esi, 0xc000000d
mov dword [ebp - 0x1c], esi
jmp 0x414ac3
push dword [ebp - 0x20]
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
jne 0x414a65
mov esi, 0xc000009a
jmp 0x414a40
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x20]
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_ZwQueryKey]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
js 0x414ac3
mov eax, dword [ebx + 0xc]
add eax, 2
push eax
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ecx, eax
mov dword [ebp - 0x28], ecx
test ecx, ecx
je 0x414a5e
push dword [ebx + 0xc]
lea eax, [ebx + 0x10]
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebx + 0xc]
shr eax, 1
xor edx, edx
mov ecx, dword [ebp - 0x28]
mov word [ecx + eax*2], dx
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
test ebx, ebx
je 0x414ad8
push ebx
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp esi, 0xc000017d
jne 0x414b14
mov dword [ebp - 4], edi
int3
mov eax, esi
call fcn.0041c4d1
ret 8
Function at 0x414c08
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x28
push 0x4212d8
call fcn.0041c48c
xor edi, edi
mov dword [ebp - 0x2c], edi
mov ebx, edi
mov dword [ebp - 0x28], edi
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
mov eax, dword [ebp + 0x1c]
mov dword [eax], edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
cmp dword [ebp + 0x10], 0
je 0x414c5d
lea eax, [ebp - 0x28]
push eax
push 0x20019
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00414572
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
jns 0x414c63
jmp 0x414d1d
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x24]
push eax
push edi
push edi
push 2
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ntdll.dll_ZwQueryValueKey]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xc0000023
jne 0x414d1d
push dword [ebp - 0x24]
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
jne 0x414cac
mov esi, 0xc000009a
mov dword [ebp - 0x20], esi
jmp 0x414d1d
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x24]
push ebx
push 2
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ntdll.dll_ZwQueryValueKey]
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
js 0x414d1d
mov eax, dword [ebx + 4]
cmp eax, dword [ebp + 0x14]
je 0x414cdb
mov esi, 0xc0000024
jmp 0x414ca7
mov eax, dword [ebp - 0x24]
sub eax, 0xc
mov dword [ebp - 0x24], eax
push eax
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edx, eax
mov ecx, dword [ebp + 0x18]
mov dword [ecx], edx
test edx, edx
je 0x414ca2
push dword [ebp - 0x24]
lea eax, [ebx + 0xc]
push eax
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp + 0x1c]
mov dword [eax], ecx
mov esi, edi
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 8]
je 0x414d30
test eax, eax
je 0x414d30
push eax
call dword [sym.imp.ntdll.dll_ZwClose]
test ebx, ebx
je 0x414d45
push ebx
push edi
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp esi, 0xc000017d
jne 0x414d81
mov dword [ebp - 4], edi
int3
mov eax, esi
call fcn.0041c4d1
ret 0x18