joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401672d8
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.1401601c0
sub rsp, rax
mov rax, qword [0x140212080]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14017ff80
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140167327
mov rax, rbp
jmp 0x14016742f
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 + 0x2b6d00]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140180210
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x2b6d00]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x14016742b
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 0x14016742b
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140180210
test rax, rax
js 0x14016742b
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x14016742b
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x14016741d
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x14016741d
cmp byte [rcx], 0xd
jne 0x140167403
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140167412
cmp byte [rcx + 1], 0xa
jne 0x140167412
inc rcx
jmp 0x140167412
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x212460]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1401673e5
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14016742f
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140160190
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 0x140176cdc
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 0x140176b47
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140176b47
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140176b47
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140176b47
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140176b47
cmp dword [rcx + 0x84], 0xe
jbe 0x140176b47
cmp dword [rcx + 0xf8], 0
je 0x140176b47
mov ecx, ebx
call fcn.140176bf8
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.1401769d4
nop
cmp dword [rbp + 0x20], 0
je 0x140176b95
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140176ba0
int3
xor r8d, r8d
xor edx, edx
jmp 0x140176ad8
Function at 0x1401776ec
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, edx
mov rbp, rcx
test r8, r8
jne 0x140177723
call fcn.140178ac8
mov dword [rax], socket
call fcn.140174bd4
xor eax, eax
jmp 0x1401777b1
mov rdx, r9
mov rcx, r8
call fcn.140177688
mov rbx, rax
test rax, rax
je 0x1401777ae
lea rax, [rsp + 0x50]
mov rdx, rsi
mov qword [rsp + 0x28], rax
lea r8, [0x1401775b4]
mov eax, dword [rsp + 0x60]
mov r9, rbx
mov rcx, rbp
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
test rax, rax
jne 0x14017779b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140178a3c
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140177782
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140177791
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call fcn.140181678
jmp 0x1401777ae
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1401777ab
mov eax, dword [rsp + 0x50]
mov dword [rcx], eax
mov rdi, rdx
mov rax, rdi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140180994
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, [0x1402b6d00]
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 0x1401809eb
cmp word [rdx], r13w
jne 0x1401809eb
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1401809f0
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140180b15
mov r11d, recv
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140180b36
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140180a29
mov rdx, r9
mov word [rbx], cx
jmp 0x140180a50
cmp r9, r8
jae 0x140180a60
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 0x140180a0a
jmp 0x140180b15
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 0x140180b0a
cmp dword [rsp + 0x80], esi
je 0x140180b0a
lea r8, [0x1402b6d00]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140180ae2
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140180ab2
mov word [rbx], r13w
jmp 0x140180b12
mov ecx, recv
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 0x140180abf
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140180b12
cmp word [rsp + 0x70], r13w
jne 0x140180aef
cmp rbx, r14
je 0x140180aac
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140180218
cmp word [rsp + 0x70], r13w
je 0x140180b15
mov ecx, recv
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, [0x1402b6d00]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140180b0f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140180b15
Function at 0x14018518c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1401851a2
mov al, 1
jmp 0x140185202
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1401851b3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140185200
mov ecx, dword [rcx + 0x18]
nop
call fcn.14018a80c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140185200
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140185200
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140185200
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140185202
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140189710
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 0x140189740
xor eax, eax
jmp 0x140189803
mov rbp, rbx
cmp word [rax], si
je 0x140189765
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14018974c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140189748
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.1401863b8
movsxd r14, eax
test eax, eax
jne 0x1401897a3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140189739
mov rcx, r14
call fcn.1401839a0
mov rdi, rax
test rax, rax
jne 0x1401897bc
xor ecx, ecx
call fcn.140181678
jmp 0x140189798
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.1401863b8
test eax, eax
jne 0x1401897ed
mov rcx, rdi
call fcn.140181678
jmp 0x1401897f7
xor ecx, ecx
call fcn.140181678
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 0x140189820
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1401898a7
mov rsi, rbx
cmp word [rax], bp
je 0x140189866
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140189850
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14018984c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1401839a0
mov rdi, rax
test rax, rax
je 0x140189894
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140198080
mov rbp, rdi
xor ecx, ecx
call fcn.140181678
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14018cc68
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.140180634
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 0x14018cd09
cmp ebx, dword [rsp + 0x30]
je 0x14018cd02
test esi, esi
je 0x14018cd02
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14018ccdd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14018ccea
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14018ccc7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14018ccee
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14018cd0b
mov eax, 1
jmp 0x14018cd0b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1401907dc
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.140170e14
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140190866
cmp byte [rbp - 0x21], r15b
je 0x140190861
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14019089c
call fcn.140181a84
test eax, eax
jne 0x140190888
cmp byte [rbp - 0x21], r15b
je 0x140190880
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14019089c
cmp byte [rbp - 0x21], r15b
je 0x140190899
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.140179ce0
test eax, eax
jne 0x14019093c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140170e14
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1401908db
cmp byte [rbp - 0x21], r15b
je 0x140190910
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140190910
call fcn.140181a84
test eax, eax
jne 0x1401908fc
cmp byte [rbp - 0x21], r15b
je 0x1401908f5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140190910
cmp byte [rbp - 0x21], r15b
je 0x14019090d
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.140179ce0
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14019093c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14019093f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14019094d
mov rcx, rdi
call fcn.140181678
cmp byte [rbp + 0x3f], r15b
je 0x14019095c
mov rcx, qword [rbp + 0x27]
call fcn.140181678
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 0x140191510
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140180218
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140180218
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140191660
cmp rax, 0xffffffffffffffff
je 0x140191660
xor edi, edi
test rbp, rbp
jle 0x14019160b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140181600
mov rbx, rax
test rax, rax
jne 0x140191598
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140191601
mov edx, 0x8000
mov ecx, r14d
call fcn.14017dc0c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140183294
cmp eax, 0xffffffff
je 0x1401915e1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1401915a8
mov edx, r15d
mov ecx, r14d
call fcn.14017dc0c
jmp 0x140191601
cmp byte [rsi + 0x38], dil
je 0x1401915f8
cmp dword [rsi + 0x34], 5
jne 0x1401915f8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
cmp byte [rsi + 0x30], dil
je 0x140191601
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140181678
jmp 0x140191674
jns 0x140191674
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140180218
cmp rax, 0xffffffffffffffff
jne 0x14019162c
cmp byte [rsi + 0x30], dil
je 0x140191674
mov edi, dword [rsi + 0x2c]
jmp 0x140191674
mov ecx, r14d
call fcn.14018a80c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140191674
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, recv
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
jmp 0x140191674
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14019166d
mov eax, dword [rsi + 0x2c]
jmp 0x140191672
mov eax, socket
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140180218
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x1401920a0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1401920c8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1401920c8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x401820
Capabilities:
Get file size
Print debug messages
Read file on windows

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x158
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov rsi, rdx
mov rbx, r8
mov edx, 0x80000000
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r8d, r8d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x401960
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4018d0
mov rcx, qword [rsp + 0x48]
mov qword [rbx], rcx
call sub.libstdc_6.dll_operator_new___unsigned_long_long_
xor r9d, r9d
mov r8d, dword [rbx]
mov rcx, r12
mov qword [rsi], rax
mov rdx, rax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401910
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
add rsp, 0x158
pop rbx
pop rsi
pop r12
pop r13
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r13, [rsp + 0x50]
lea rdx, str.Failed_to_get_file_size:__lu_n
mov r8d, eax
mov rcx, r13
call fcn.00408240
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x158
pop rbx
pop rsi
pop r12
pop r13
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r13, [rsp + 0x50]
lea rdx, str.Failed_to_read_file:__lu_n
mov r8d, eax
mov rcx, r13
call fcn.00408240
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rcx, r13
call sub.libstdc_6.dll_operator_delete___void_
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x158
pop rbx
pop rsi
pop r12
pop r13
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r12, [rsp + 0x50]
lea rdx, str.Failed_to_open_file:__lu_n
mov r8d, eax
mov rcx, r12
call fcn.00408240
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
add rsp, 0x158
pop rbx
pop rsi
pop r12
pop r13
ret

Function at 0x401e80
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 fcn.00408090
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.00408090
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x401ef0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0040d614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x402098
mov rax, qword [0x0040d618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401f3c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401fc7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401f20
mov rcx, r12
call fcn.00402c50
mov rbp, rax
test rax, rax
je 0x4020d2
mov rax, qword [0x0040d618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00402d80
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0040d618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4020e1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401fc0
sub eax, 4
and eax, 0xfffffffb
jne 0x402050
add dword [0x0040d614], 1
cmp ebx, 8
jae 0x401ff8
test bl, 4
jne 0x4020a0
test ebx, ebx
je 0x401fe9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4020c0
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 0x401fe9
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 0x40202a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x0040d618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401fc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00401e80
nop dword [rax]
xor edi, edi
jmp 0x401f47
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401fe9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401fe9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00401e80
mov rax, qword [0x0040d618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00401e80
nop
nop dword [rax]
Function at 0x4028c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040d900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040d8e0]
test rbx, rbx
je 0x402914
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 0x40290b
test r12, r12
je 0x40290b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4028f0
lea rcx, [0x0040d900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402c50
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x0040a8e0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402cc9
mov rcx, r10
call fcn.00402b20
test eax, eax
je 0x402cc9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x402cc6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x402cbd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402cc9
add r8, 0x28
cmp r8, r9
jne 0x402ca8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x408270
Capabilities:
Print debug messages

Disassembly:
push r12
sub rsp, 0x130
call fcn.00401a80
lea rdx, [rsp + 0x20]
lea r8, [rsp + 0x28]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
lea rcx, str.shellcode.bin
call fcn.00401820
test al, al
je 0x408302
lea r12, [rsp + 0x30]
mov r8, qword [rsp + 0x28]
lea rdx, str.Shellcode_loaded_successfully._Size:__zu_bytes_n
mov rcx, r12
call fcn.00408240
mov rcx, r12
mov r12, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call r12
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
call fcn.00401560
test al, al
je 0x408317
mov rcx, qword [rsp + 0x20]
xor r12d, r12d
test rcx, rcx
je 0x4082f5
call sub.libstdc_6.dll_operator_delete___void_
mov eax, r12d
add rsp, 0x130
pop r12
ret
lea rcx, str.Failed_to_load_shellcode_from_file._n
mov r12d, 1
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4082f5
lea rcx, str.Shellcode_injection_failed._n
call r12
mov rcx, qword [rsp + 0x20]
mov r12d, 1
test rcx, rcx
jne 0x4082f0
jmp 0x4082f5