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

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140070200
lea rcx, [rsp + 0x40]
call fcn.1401029c0
movzx eax, al
test eax, eax
jne 0x140102a48
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.1401028d0
mov rax, qword [rsp + 0x70]
jmp 0x140102c19
lea rcx, [rsp + 0x40]
call fcn.140066c90
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140102970
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140066c90
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.1400feb60
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140102aee
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.1401028d0
mov rax, qword [rsp + 0x80]
jmp 0x140102c19
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.1400b63d0
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140070200
lea rcx, [rsp + 0x48]
call fcn.14009f540
movzx eax, al
test eax, eax
jne 0x140102b55
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.14009f520
lea rcx, [rsp + 0x40]
call fcn.1401028d0
mov rax, qword [rsp + 0x88]
jmp 0x140102c19
lea rcx, [rsp + 0x48]
call fcn.140066c90
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140066c90
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.1400feb60
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140102beb
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.14009f520
lea rcx, [rsp + 0x40]
call fcn.1401028d0
mov rax, qword [rsp + 0xa0]
jmp 0x140102c19
lea rcx, [rsp + 0x48]
call fcn.1400a3630
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.14009f520
lea rcx, [rsp + 0x40]
call fcn.1401028d0
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x140102c30
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x78
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140070200
lea rcx, [rsp + 0x20]
call fcn.1401028f0
movzx eax, al
test eax, eax
jne 0x140102c75
mov qword [rsp + 0x40], 0
lea rcx, [rsp + 0x20]
call fcn.1401028d0
mov rax, qword [rsp + 0x40]
jmp 0x140102d6f
lea rcx, [rsp + 0x20]
call fcn.140066c90
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x30]
call fcn.140102970
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
shl rax, 1
mov r9d, 0x40
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, rax
call fcn.1400b63d0
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140070200
lea rcx, [rsp + 0x28]
call fcn.14009f540
movzx eax, al
test eax, eax
jne 0x140102d0f
mov qword [rsp + 0x50], 0
lea rcx, [rsp + 0x28]
call fcn.14009f520
lea rcx, [rsp + 0x20]
call fcn.1401028d0
mov rax, qword [rsp + 0x50]
jmp 0x140102d6f
lea rcx, [rsp + 0x20]
call fcn.140066c90
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x28]
call fcn.140066c90
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x38]
shl rax, 1
mov r8, rax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
call fcn.1400a4630
lea rcx, [rsp + 0x28]
call fcn.1400a3630
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x28]
call fcn.14009f520
lea rcx, [rsp + 0x20]
call fcn.1401028d0
mov rax, qword [rsp + 0x68]
add rsp, 0x78
ret

Function at 0x1401044a0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x28
ret
Function at 0x140110310
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x128
lea rcx, [rsp + 0xe8]
call fcn.1400d8a00
lea rcx, [rsp + 0xb8]
call fcn.1400d8a00
lea rcx, [rsp + 0x88]
call fcn.1400d8a00
call fcn.1400e89d0
mov r8d, eax
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0x130]
call fcn.1400d88f0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x1401103b2
mov dword [rsp + 0x54], 0
lea rcx, [rsp + 0x88]
call fcn.1400d8a90
lea rcx, [rsp + 0xb8]
call fcn.1400d8a90
lea rcx, [rsp + 0xe8]
call fcn.1400d8a90
mov eax, dword [rsp + 0x54]
jmp 0x140110558
call fcn.1400e89d0
mov r8d, eax
lea rdx, [rsp + 0xb8]
mov rcx, qword [rsp + 0x138]
call fcn.1400d88f0
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
je 0x140110412
mov dword [rsp + 0x5c], 0
lea rcx, [rsp + 0x88]
call fcn.1400d8a90
lea rcx, [rsp + 0xb8]
call fcn.1400d8a90
lea rcx, [rsp + 0xe8]
call fcn.1400d8a90
mov eax, dword [rsp + 0x5c]
jmp 0x140110558
mov qword [rsp + 0x70], 0
cmp qword [rsp + 0x168], 0
je 0x140110498
call fcn.1400e89d0
mov r8d, eax
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x168]
call fcn.1400d88f0
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x140110486
mov dword [rsp + 0x64], 0
lea rcx, [rsp + 0x88]
call fcn.1400d8a90
lea rcx, [rsp + 0xb8]
call fcn.1400d8a90
lea rcx, [rsp + 0xe8]
call fcn.1400d8a90
mov eax, dword [rsp + 0x64]
jmp 0x140110558
lea rcx, [rsp + 0x88]
call fcn.1400d12f0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0xb8]
call fcn.1400d12f0
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0xe8]
call fcn.1400d12f0
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x170]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x158]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x150]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x148]
mov r8, qword [rsp + 0x140]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [rsp + 0x68], eax
lea rcx, [rsp + 0x88]
call fcn.1400d8a90
lea rcx, [rsp + 0xb8]
call fcn.1400d8a90
lea rcx, [rsp + 0xe8]
call fcn.1400d8a90
mov eax, dword [rsp + 0x68]
add rsp, 0x128
ret
Function at 0x1401147e0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.1400d8a00
lea rcx, [rsp + 0x48]
call fcn.1400d8a00
call fcn.1400e89d0
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.1400d88f0
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x14011484f
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.1400d8a90
lea rcx, [rsp + 0x78]
call fcn.1400d8a90
mov eax, dword [rsp + 0x24]
jmp 0x1401148e0
call fcn.1400e89d0
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.1400d88f0
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140114896
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.1400d8a90
lea rcx, [rsp + 0x78]
call fcn.1400d8a90
mov eax, dword [rsp + 0x2c]
jmp 0x1401148e0
lea rcx, [rsp + 0x48]
call fcn.1400d12f0
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.1400d12f0
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.1400d8a90
lea rcx, [rsp + 0x78]
call fcn.1400d8a90
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x140001000
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x38
mov ecx, 0x2d
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x14000102f
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x2d
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x140001014
mov edx, 0x64
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Beep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140001226
mov qword [rsp + 0x30], rbx
xor ebx, ebx
nop word [rax + rax]
mov edx, 0x16f
mov ecx, 0x4fc
call qword [sym.imp.USER32.dll_SetCursorPos]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_mouse_event]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call qword [sym.imp.USER32.dll_mouse_event]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140001221
mov edx, 0x69
mov ecx, 0x452
call qword [sym.imp.USER32.dll_SetCursorPos]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_mouse_event]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call qword [sym.imp.USER32.dll_mouse_event]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140001221
mov edx, 0x309
lea ecx, [rdx + 0x20]
call qword [sym.imp.USER32.dll_SetCursorPos]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_mouse_event]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call qword [sym.imp.USER32.dll_mouse_event]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140001221
mov edx, 0x258
mov ecx, 0x345
call qword [sym.imp.USER32.dll_SetCursorPos]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_mouse_event]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call qword [sym.imp.USER32.dll_mouse_event]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140001221
mov edx, 0x2b7
mov ecx, 0x343
call qword [sym.imp.USER32.dll_SetCursorPos]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_mouse_event]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call qword [sym.imp.USER32.dll_mouse_event]
mov ecx, 0x927c0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x140001060
mov rbx, qword [rsp + 0x30]
mov edx, 0x64
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Beep]
xor eax, eax
add rsp, 0x38
ret
Function at 0x1800016e4
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
add rax, 0x20
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
sub rax, 0x10
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x20], rax
je 0x180001777
mov rax, qword [rsp + 0x20]
sub rax, 0x10
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp qword [rax + 0x60], 0
je 0x180001768
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x60]
call fcn.1800010f4
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
test eax, eax
jne 0x180001768
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x30]
jmp 0x180001779
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
jmp 0x18000171d
xor eax, eax
add rsp, 0x48
ret

Function at 0x180001780
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x20], 0
je 0x1800018b8
mov rax, qword [rsp + 0x28]
mov edx, dword [rax + 0x24]
mov rcx, qword [rsp + 0x80]
call fcn.180001214
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x28]
mov edx, dword [rax + 0x20]
mov rcx, qword [rsp + 0x80]
call fcn.180001214
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x28]
mov edx, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x80]
call fcn.180001214
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x20], 0
jmp 0x180001849
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x18]
cmp dword [rsp + 0x20], eax
jae 0x1800018b8
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
mov edx, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x80]
call fcn.180001214
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x48]
call fcn.18000109c
cmp eax, dword [rsp + 0x88]
jne 0x1800018b6
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rsp + 0x58]
mov edx, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x80]
call fcn.180001214
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
jmp 0x1800018b8
jmp 0x18000183f
add rsp, 0x78
ret
Function at 0x180001904
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x38], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 1
je 0x180001930
jmp 0x18000196a
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x1800018c0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x38], rax
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, 1
add rsp, 0x48
ret

Function at 0x180001974
Capabilities:
Create thread

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x1800018c0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x30], rax
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add rsp, 0x48
ret

Function at 0x1800019cc
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x20], 0
call fcn.180001a38
add rax, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
call fcn.180001a38
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x30], rax
jae 0x180001a12
mov rax, qword [rsp + 0x20]
inc rax
mov qword [rsp + 0x20], rax
jmp 0x1800019ed
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
sub rcx, rax
mov rax, rcx
cmp rax, 0x1388
jbe 0x180001a32
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
add rsp, 0x48
ret
Function at 0x1800091a8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1800091d8
xor eax, eax
jmp 0x18000929b
mov rbp, rbx
cmp word [rax], si
je 0x1800091fd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800091e4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800091e0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1800090f8
movsxd r14, eax
test eax, eax
jne 0x18000923b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800091d1
mov rcx, r14
call fcn.18000a430
mov rdi, rax
test rax, rax
jne 0x180009254
xor ecx, ecx
call fcn.180007760
jmp 0x180009230
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1800090f8
test eax, eax
jne 0x180009285
mov rcx, rdi
call fcn.180007760
jmp 0x18000928f
xor ecx, ecx
call fcn.180007760
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x18000ea00
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x18000ea28
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x18000ea28
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400045e0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400045f0]
mov dword [rax], 1
mov rax, qword [0x140004600]
mov dword [rax], 1
mov rax, qword [0x1400045d0]
mov dword [rax], 1
mov rax, qword [0x1400044a0]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x1400045c0]
mov dword [0x14000700c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140004580]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140004560]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140004450]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067

Function at 0x140001550
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x1a0
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, [rbp - 0x40]
lea rdx, section..rdata
mov ecx, 0x29
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
mov rdx, rsi
mov rax, rdi
movzx ecx, byte [rdx]
mov byte [rax], cl
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x149
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x118], rax
mov rax, qword [rbp + 0x118]
mov rdx, rax
lea rax, [rbp - 0x40]
mov ecx, 0x149
mov r8, qword [rax]
mov qword [rdx], r8
mov r8d, ecx
add r8, rdx
lea r9, [r8 + 8]
mov r8d, ecx
add r8, rax
add r8, 8
mov r8, qword [r8 - 0x10]
mov qword [r9 - 0x10], r8
lea r8, [rdx + 8]
and r8, 0xfffffffffffffff8
sub rdx, r8
sub rax, rdx
add ecx, edx
and ecx, 0xfffffff8
shr ecx, 3
mov edx, ecx
mov edx, edx
mov rdi, r8
mov rsi, rax
mov rcx, rdx
rep movsq qword [rdi], qword [rsi]
mov rdx, qword [rbp + 0x118]
lea rax, [rbp - 0x44]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8, rdx
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp + 0x110], rax
mov rax, qword [rbp + 0x110]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
nop
add rsp, 0x1a0
pop rsi
pop rdi
pop rbp
ret
Function at 0x140001940
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x1400019b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400070a4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140001b60
mov rax, qword [0x1400070a8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400019fc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001a87
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x1400019e0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x140001bbd
mov rax, qword [0x1400070a8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400070a8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001ba2
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001a80
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001b10
add dword [0x1400070a4], 1
cmp ebx, 8
jae 0x140001ab8
test bl, 4
jne 0x140001b70
test ebx, ebx
je 0x140001aa9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140001b90
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x140001aa9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x140001aea
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1400070a8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001a80
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x140001a07
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140001aa9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140001aa9
mov rax, qword [0x1400070a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]