joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001e564
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x14004eac0]
xor rax, rsp
mov qword [rbp - 8], rax
call fcn.14000871c
mov rcx, qword [0x14004f2f8]
lea rdx, [rbp - 0x18]
mov rdi, rax
call qword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [rbp - 0x10]
sub ecx, dword [rbp - 0x18]
movd xmm1, ecx
mov ecx, dword [rbp - 0xc]
sub ecx, dword [rbp - 0x14]
cvtdq2ps xmm1, xmm1
movd xmm0, ecx
lea rcx, [rbp - 0x20]
cvtdq2ps xmm0, xmm0
movss dword [rdi + 8], xmm1
movss dword [rdi + 0xc], xmm0
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp - 0x20]
xorps xmm1, xmm1
sub rax, qword [0x14004f300]
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [0x14004f308]
mov ecx, 0x11
cvtsi2ss xmm1, rax
divss xmm1, xmm0
movss dword [rdi + 0x10], xmm1
mov rax, qword [rbp - 0x20]
mov qword [0x14004f300], rax
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov bl, 1
and al, bl
mov ecx, 0x10
mov byte [rdi + 0x128], al
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov ecx, 0x12
and al, bl
mov byte [rdi + 0x129], al
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, bl
mov byte [rdi + 0x12b], 0
mov byte [rdi + 0x12a], al
call fcn.14000871c
cmp byte [rax + 0x3a7], 0
lea rbx, [rax + 0x110]
je 0x14001e68d
cvttss2si ecx, dword [rbx]
lea rdx, [rbp - 0x30]
cvttss2si eax, dword [rax + 0x114]
mov dword [rbp - 0x30], ecx
mov rcx, qword [0x14004f2f8]
mov dword [rbp - 0x2c], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [rbp - 0x2c]
mov ecx, dword [rbp - 0x30]
call qword [sym.imp.USER32.dll_SetCursorPos]
mov eax, 0xff7fffff
mov dword [rbx], eax
mov dword [rbx + 4], eax
call qword [sym.imp.USER32.dll_GetActiveWindow]
cmp rax, qword [0x14004f2f8]
jne 0x14001e6e2
lea rcx, [rbp - 0x28]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x14001e6e2
mov rcx, qword [0x14004f2f8]
lea rdx, [rbp - 0x28]
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x14001e6e2
movd xmm0, dword [rbp - 0x28]
movd xmm1, dword [rbp - 0x24]
cvtdq2ps xmm0, xmm0
cvtdq2ps xmm1, xmm1
movss dword [rbx], xmm0
movss dword [rbx + 4], xmm1
cmp byte [rdi + 0xc8], 0
je 0x14001e6f0
or eax, 0xffffffff
jmp 0x14001e6f5
call fcn.140008758
cmp dword [0x14004d138], eax
je 0x14001e708
mov dword [0x14004d138], eax
call fcn.14001e730
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14003ce10
mov rbx, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x50
pop rbp
ret

Function at 0x14002ceb0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov r9d, 0x6c078965
mov r8d, 0xffffffff
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
call fcn.14002ce6c
mov rax, qword [rsp + 0x30]
add rsp, 0x28
ret
Function at 0x14002e8a4
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0x270
jne 0x14002e8c6
mov rcx, qword [rsp + 0x40]
call fcn.140036b24
jmp 0x14002e8dd
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0x4e0
jb 0x14002e8dd
mov rcx, qword [rsp + 0x40]
call fcn.140036930
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax*4 + 4]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
inc eax
mov rcx, qword [rsp + 0x40]
mov dword [rcx], eax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shr eax, 0xb
mov rcx, qword [rsp + 0x40]
and eax, dword [rcx + 0x1384]
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shl eax, 7
and eax, 0x9d2c5680
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shl eax, 0xf
and eax, 0xefc60000
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shr eax, 0x12
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
add rsp, 0x38
ret
Function at 0x14003462c
Capabilities:
Create thread

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x88
mov rax, qword [0x14004eac0]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x30], 0
cmp dword [rsp + 0x90], 0
jl 0x140034685
cmp dword [rsp + 0x90], 0x7c
jge 0x140034685
lea r8, [rsp + 0x30]
mov edx, dword [rsp + 0x90]
lea rcx, [0x14004d740]
call fcn.14003493c
lea rcx, [rsp + 0x50]
call fcn.14002cc48
nop
cmp qword [rsp + 0x30], 0
jne 0x1400346ab
lea rdx, [0x140044858]
lea rcx, [rsp + 0x50]
call fcn.14002d7e8
jmp 0x1400346ba
mov rdx, qword [rsp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.14002d7e8
cmp dword [rsp + 0xa0], 1
jne 0x1400346d5
lea rdx, [0x140044868]
lea rcx, [rsp + 0x50]
call fcn.14002d7e8
movss xmm2, dword [0x1400438b0]
movss xmm1, dword [0x140045aac]
lea rcx, [rsp + 0x48]
call fcn.14002d160
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x50]
call fcn.1400370a4
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call fcn.140021f0c
movzx eax, al
test eax, eax
je 0x14003474a
cmp dword [rsp + 0xa0], 0
jne 0x14003474a
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop
lea rcx, [rsp + 0x50]
call fcn.14002d56c
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14003ce10
add rsp, 0x88
ret

Function at 0x14003476c
Capabilities:
Link many functions at runtime

Disassembly:
sub rsp, 0x38
lea rcx, [0x1400449c0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400449b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400347f5
lea rcx, [0x1400449d8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.NtUserSendInput
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400347f5
lea rcx, [0x1400449ec]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.SendInput
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400347f5
xor al, al
jmp 0x1400348a7
lea rcx, str.win32u
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400449f8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140034877
lea rcx, [0x140044a30]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.NtUserGetAsyncKeyState
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140034877
lea rcx, str.user32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140044a38]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140034877
xor al, al
jmp 0x1400348a7
mov r8d, 0x1e
mov rdx, qword [rsp + 0x20]
lea rcx, [0x14004f568]
call fcn.14003d99a
mov r8d, 0x1e
mov rdx, qword [rsp + 0x28]
lea rcx, [0x14004f588]
call fcn.14003d99a
mov al, 1
add rsp, 0x38
ret
Function at 0x1400354a8
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x1400354da
xor eax, eax
jmp 0x140035530
mov r8d, 0x1e
lea rdx, [0x14004f588]
mov rcx, qword [rsp + 0x28]
call fcn.14003d99a
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
call qword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r8d, 0x1000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [rsp + 0x20]
add rsp, 0x48
ret
Function at 0x140036930
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x28], 0x26f
mov qword [rsp + 0x30], 0xe3
mov qword [rsp], 0
jmp 0x140036960
mov rax, qword [rsp]
inc rax
mov qword [rsp], rax
cmp qword [rsp], 0xe3
jae 0x1400369e2
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp]
mov eax, dword [rax + rcx*4 + 0x9c4]
and eax, 0x80000000
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp]
mov ecx, dword [rcx + rdx*4 + 0x9c8]
btr ecx, 0x1f
or eax, ecx
mov dword [rsp + 0x10], eax
mov eax, dword [rsp + 0x10]
and eax, 1
test eax, eax
je 0x1400369ae
mov dword [rsp + 0x14], 0x9908b0df
jmp 0x1400369b6
mov dword [rsp + 0x14], 0
mov eax, dword [rsp + 0x10]
shr eax, 1
xor eax, dword [rsp + 0x14]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp]
xor eax, dword [rcx + rdx*4 + 0xff8]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp]
mov dword [rcx + rdx*4 + 4], eax
jmp 0x140036955
mov qword [rsp + 8], 0xe3
jmp 0x1400369fa
mov rax, qword [rsp + 8]
inc rax
mov qword [rsp + 8], rax
cmp qword [rsp + 8], 0x26f
jae 0x140036a81
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 8]
mov eax, dword [rax + rcx*4 + 0x9c4]
and eax, 0x80000000
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 8]
mov ecx, dword [rcx + rdx*4 + 0x9c8]
btr ecx, 0x1f
or eax, ecx
mov dword [rsp + 0x18], eax
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
je 0x140036a4b
mov dword [rsp + 0x1c], 0x9908b0df
jmp 0x140036a53
mov dword [rsp + 0x1c], 0
mov eax, dword [rsp + 0x18]
shr eax, 1
xor eax, dword [rsp + 0x1c]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 8]
xor eax, dword [rcx + rdx*4 - 0x388]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 8]
mov dword [rcx + rdx*4 + 4], eax
jmp 0x1400369ed
mov qword [rsp + 0x38], 0x26f
mov eax, 4
imul rax, rax, 0x4df
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax + 4]
and eax, 0x80000000
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x50]
mov ecx, dword [rdx + rcx + 4]
btr ecx, 0x1f
or eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
and eax, 1
test eax, eax
je 0x140036ad5
mov dword [rsp + 0x24], 0x9908b0df
jmp 0x140036add
mov dword [rsp + 0x24], 0
mov eax, dword [rsp + 0x20]
shr eax, 1
xor eax, dword [rsp + 0x24]
mov ecx, 4
imul rcx, rcx, 0x18c
mov rdx, qword [rsp + 0x50]
xor eax, dword [rdx + rcx + 4]
mov ecx, 4
imul rcx, rcx, 0x26f
mov rdx, qword [rsp + 0x50]
mov dword [rdx + rcx + 4], eax
mov rax, qword [rsp + 0x50]
mov dword [rax], 0
add rsp, 0x48
ret
Function at 0x140036b24
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov qword [rsp + 8], 0x270
jmp 0x140036b45
mov rax, qword [rsp + 8]
inc rax
mov qword [rsp + 8], rax
cmp qword [rsp + 8], 0x4e0
jae 0x140036bc9
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 8]
mov eax, dword [rax + rcx*4 - 0x9bc]
and eax, 0x80000000
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 8]
mov ecx, dword [rcx + rdx*4 - 0x9b8]
btr ecx, 0x1f
or eax, ecx
mov dword [rsp], eax
mov eax, dword [rsp]
and eax, 1
test eax, eax
je 0x140036b94
mov dword [rsp + 4], 0x9908b0df
jmp 0x140036b9c
mov dword [rsp + 4], 0
mov eax, dword [rsp]
shr eax, 1
xor eax, dword [rsp + 4]
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 8]
xor eax, dword [rcx + rdx*4 - 0x388]
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 8]
mov dword [rcx + rdx*4 + 4], eax
jmp 0x140036b38
add rsp, 0x18
ret
Function at 0x140039100
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x170
mov rax, qword [0x14004eac0]
xor rax, rsp
mov qword [rsp + 0x160], rax
lea rax, [rsp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, 0x130
rep stosb byte [rdi], al
xor edx, edx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0x130
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x14003919c
mov rdx, qword [rsp + 0x188]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x140039189
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x38]
jmp 0x1400391a9
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x140039161
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.14003ce10
add rsp, 0x170
pop rdi
ret
Function at 0x14003b464
Capabilities:
Create thread
Hide graphical window

Disassembly:
push rdi
sub rsp, 0xc0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x140035a50]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0x48
rep stosb byte [rdi], al
xor ecx, ecx
call qword [sym.imp.GDI32.dll_GetStockObject]
mov qword [rsp + 0xa0], rax
mov edx, 0x7f00
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorA]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x88], 0
lea rax, [0x140035f08]
mov qword [rsp + 0x78], rax
lea rax, [0x140044e70]
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0x70], 3
lea rcx, [rsp + 0x70]
call qword [sym.imp.USER32.dll_RegisterClassA]
movzx eax, ax
test eax, eax
jne 0x14003b51c
lea rdx, str._n_n_Notepad
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400291d8
mov ecx, 1
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [rsp + 0x60], eax
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0x80000000
xor r8d, r8d
lea rdx, str.Notepad
xor ecx, ecx
call qword [sym.imp.USER32.dll_CreateWindowExA]
mov qword [0x14004f5e0], rax
mov edx, 5
mov rcx, qword [0x14004f5e0]
call qword [sym.imp.USER32.dll_ShowWindow]
lea rdx, [0x140044e60]
mov rcx, qword [0x14004f5e0]
call qword [sym.imp.dwmapi.dll_DwmExtendFrameIntoClientArea]
mov r8d, 0x800a0
mov edx, 0xffffffec
mov rcx, qword [0x14004f5e0]
call qword [sym.imp.USER32.dll_SetWindowLongA]
mov rcx, qword [0x14004f5e0]
call qword [sym.imp.USER32.dll_UpdateWindow]
add rsp, 0xc0
pop rdi
ret
Function at 0x14003d510
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14003d55a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14003d55a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14003d55a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14003d55a
cmp dword [rcx + 0x84], 0xe
jbe 0x14003d55a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14003d55c
xor al, al
add rsp, 0x28
ret
Function at 0x140f8da14
Capabilities:
Encode data using xor

Disassembly:
jmp 0x140f8da1e
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x140f8da47
pop rbp
sub rbp, 0x33
sub rbp, 0xf8da14
sub rsp, 0x20
jmp 0x140f8da66
mov rax, 0xf8da14
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0xffffffffdd16a518
xor byte [rax], dl
inc rax
dec rcx
jne 0x140f8da85
jmp 0x140f8da9c
push rax
xchg ecx, eax
int1
xchg ebx, eax
xchg ecx, eax
and al, 0x18
sbb byte [rax], bl
push rax
cdq
fst dword [rax]
sbb dword [rax], ebx
sbb byte [rax + 0x19], dl
int1
push rax
invalid
Function at 0x4016c7
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edx, 0
cmp eax, 0xffffffff
je 0x4016e6
shr eax, 4
xor eax, 1
and eax, 1
mov edx, eax
mov eax, edx
add rsp, 0x28
ret

Function at 0x4016ed
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x458
mov rbp, rcx
mov r12, rdx
mov ebx, r8d
lea rax, [rcx + 1]
movzx edx, byte [rcx]
test dl, dl
jne 0x4017af
lea rdx, [rsp + 0x44d]
lea rax, [rsp + 0x140]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x240]
lea r8, [rsp + 0x340]
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__splitpath]
cmp byte [rsp + 0x44d], 0
jne 0x4017ba
cmp byte [rsp + 0x340], 0x5c
je 0x4017ba
test ebx, ebx
je 0x40188a
lea rdx, str..exe
mov rcx, rbp
call sub.msvcrt.dll_strstr
mov r13, rax
lea rcx, str.PATH
call sub.msvcrt.dll_getenv
mov rdi, rax
test r13, r13
sete al
movzx eax, al
shl eax, 2
mov r14d, 0x102
sub r14d, eax
lea rsi, [rsp + 0x30]
jmp 0x4017ea
add rax, 1
movzx edx, byte [rax - 1]
test dl, dl
je 0x401718
cmp dl, 0x2f
jne 0x40179f
mov byte [rax - 1], 0x5c
jmp 0x40179f
mov rcx, rbp
call fcn.00401697
jmp 0x4018e6
movsxd r8, ebx
mov rdx, rdi
mov rcx, rsi
call sub.msvcrt.dll_strncpy
mov rdi, r15
jmp 0x40183a
mov rcx, rsi
call fcn.004016c7
test eax, eax
jne 0x40187e
test rdi, rdi
je 0x40188a
mov edx, 0x3b
mov rcx, rdi
call sub.msvcrt.dll_strchr
mov r15, rax
mov rcx, rbp
call sub.msvcrt.dll_strlen
mov ebx, r14d
sub ebx, eax
test r15, r15
je 0x4017c7
mov r8, r15
sub r8, rdi
movsxd rbx, ebx
cmp r8, rbx
cmovg r8, rbx
mov ebx, r8d
movsxd r8, r8d
mov rdx, rdi
mov rcx, rsi
call sub.msvcrt.dll_memcpy
lea rdi, [r15 + 1]
movsxd rbx, ebx
mov byte [rsp + rbx + 0x30], 0
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov word [rsi + rax], 0x5c
mov rdx, rbp
mov rcx, rsi
call sub.msvcrt.dll_strcat
test r13, r13
jne 0x4017da
mov rcx, rsi
call sub.msvcrt.dll_strlen
add rax, rsi
mov dword [rax], 0x6578652e
mov byte [rax + 4], 0
jmp 0x4017da
lea rcx, [rsp + 0x30]
call fcn.00401697
jmp 0x4018e6
lea rdi, [rsp + 0x340]
lea rsi, [rsp + 0x44d]
lea rax, [rsp + 0x140]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x240]
mov r8, rdi
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.msvcrt.dll__splitpath]
lea rbx, [rsp + 0x30]
mov qword [rsp + 0x20], 0
mov r9, rbp
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__makepath]
mov rcx, rbx
call fcn.00401697
add rsp, 0x458
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x401b07
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xe8
mov rsi, rcx
mov dword [rsp + 0xdc], 0
lea rbp, [rsp + 0x50]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
lea rbx, [rsp + 0x70]
mov ecx, 0xd
mov eax, 0
mov rdi, rbx
rep stosq qword [rdi], rax
mov dword [rsp + 0x70], 0x68
mov edx, 1
lea rcx, [0x00401aee]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rsi
mov ecx, 0
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, eax
test eax, eax
je 0x401c03
mov eax, dword [rsp + 0x60]
mov dword [0x0040e040], eax
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, [rsp + 0xdc]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ebx, eax
test eax, eax
je 0x401c22
mov ebx, dword [rsp + 0xdc]
mov eax, ebx
add rsp, 0xe8
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov ecx, 2
call qword [fcn.00408530]
mov rcx, rax
mov r8, rsi
lea rdx, str.failed_to_create_process___s_._n
call fcn.00401540
jmp 0x401bf5
mov ecx, 2
call qword [fcn.00408530]
mov rcx, rax
lea rdx, str.failed_to_get_exit_code_from_process._n
call fcn.00401540
jmp 0x401bf5
Function at 0x4029e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040e120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040e100]
test rbx, rbx
je 0x402a34
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x402a2b
test r12, r12
je 0x402a2b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402a10
lea rcx, [0x0040e120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402d70
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x0040a780]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x402d90
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x402d98
ret
cmp word [r8 + 0x18], 0x20b
jne 0x402d90
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x402de5
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x402ddc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402d90
add rax, 0x28
cmp rax, r9
jne 0x402dc8
xor eax, eax
ret

Function at 0x402df0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0040a780]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x402e10
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x402e18
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x402e10
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x402ea0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0040a780]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x402ec0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x402ec8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret