joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140006318
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x20
mov r12, rdx
mov rdi, rcx
call fcn.140018288
mov edx, 2
mov rcx, rdi
call fcn.140003890
mov ecx, 1
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rcx, qword [rdi]
xor r13d, r13d
mov dword [rdi + 8], r13d
mov word [rcx], r13w
test eax, eax
je 0x1400063a3
lea ebx, [rax + 1]
mov rcx, rdi
mov edx, ebx
call fcn.140003890
mov ecx, ebx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov r11, qword [rdi]
mov eax, r13d
cmp word [r11], r13w
je 0x14000639b
mov rcx, r11
add rcx, 2
inc eax
cmp word [rcx], r13w
jne 0x14000638f
mov dword [rdi + 8], eax
mov word [r11 + rax*2], r13w
movsxd rax, dword [rdi + 8]
mov ebx, r13d
lea esi, [rax + 0xf]
mov rbp, rax
mov edx, esi
mov rcx, rdi
call fcn.140003890
mov r8d, ebx
mov rdx, r12
lea rcx, [rax + rbp*2]
call qword [sym.imp.USER32.dll_wsprintfW]
mov r11, qword [rdi]
mov ecx, r13d
mov rax, r13
cmp word [r11], r13w
je 0x1400063e5
inc rax
inc ecx
cmp word [r11 + rax*2], r13w
jne 0x1400063d9
mov dword [rdi + 8], ecx
mov word [r11 + rax*2], r13w
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140006405
inc ebx
cmp ebx, 0xfff
jl 0x1400063b0
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rax, rdi
add rsp, 0x20
pop r13
pop r12
pop rdi
ret

Function at 0x140006424
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
xor ebx, ebx
cmp dword [0x14002bbf8], ebx
jle 0x14000648e
mov edi, ebx
mov rax, qword [0x14002bbf0]
lea rcx, [rsp + 0x20]
mov rdx, qword [rdi + rax]
add rdx, 0x10
call fcn.1400182c0
lea rcx, [rsp + 0x20]
call fcn.140005080
mov r11, qword [0x14002bbf0]
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rdi + r11]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
inc ebx
add rdi, 8
cmp ebx, dword [0x14002bbf8]
jl 0x14000643a
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x1400065b4
Capabilities:
Create process on windows
Get disk information
Self delete
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
mov rbp, rsp
sub rsp, 0x70
mov rdi, rcx
mov rcx, qword [rcx]
mov edx, 0x3a
cmp word [rcx + 2], dx
jne 0x14000679a
lea r8d, [rdx + 0x22]
cmp word [rcx + 4], r8w
je 0x1400065f4
cmp word [rcx + 4], 0x2f
jne 0x14000679a
movzx eax, word [rcx]
lea rcx, [rbp + 0x28]
xor r12d, r12d
mov dword [rbp + 0x2a], 0x5c003a
mov word [rbp + 0x2e], r12w
mov word [rbp + 0x28], ax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x140006797
lea rdx, str.7ZSfx_03x.cmd
lea rcx, [rbp - 0x20]
call fcn.140006318
mov rcx, qword [rbp - 0x20]
mov qword [rsp + 0x30], r12
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14000678e
lea rcx, [rbp - 0x30]
call fcn.140018288
lea rdx, str.:Repeat_r_n
lea rcx, [rbp - 0x30]
call fcn.140018880
lea rdx, str.del__
lea rcx, [rbp - 0x30]
call fcn.140018910
lea rcx, [rbp - 0x30]
mov rdx, rdi
call fcn.140018380
lea rdx, [0x1400260d0]
lea rcx, [rbp - 0x30]
call fcn.140018910
lea rdx, str.if_exist__
lea rcx, [rbp - 0x30]
call fcn.140018910
lea rcx, [rbp - 0x30]
mov rdx, rdi
call fcn.140018380
lea rdx, str.__goto_Repeat_r_n
lea rcx, [rbp - 0x30]
call fcn.140018910
lea rdx, str.del__
lea rcx, [rbp - 0x30]
call fcn.140018910
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x30]
call fcn.140018380
lea rdx, [0x1400260d0]
lea rcx, [rbp - 0x30]
call fcn.140018910
mov ebx, dword [rbp - 0x28]
lea r8d, [r12 + 1]
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x10]
call fcn.14000398c
lea r9, [rbp + 0x20]
mov r8d, ebx
mov rdx, qword [rax]
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp - 0x10]
mov ebx, eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x14000677c
mov eax, dword [rbp - 0x28]
cmp dword [rbp + 0x20], eax
jne 0x14000677c
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov r8, qword [rbp - 0x20]
lea rdx, str.open
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
jmp 0x140006785
mov rcx, qword [rbp - 0x20]
call fcn.140003310
mov rcx, qword [rbp - 0x30]
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp - 0x20]
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rdi]
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret
Function at 0x1400089cc
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x40]
mov r9, r8
mov rbx, rcx
mov r8, rdx
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov rcx, rax
mov qword [rbx], rax
call fcn.140008938
add rsp, 0x30
pop rbx
ret
Function at 0x14000ad38
Capabilities:
Get common file path
Get file system object information

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x510
mov rdi, rcx
mov rcx, qword [rcx + 8]
mov edx, 0x4b6
call qword [sym.imp.USER32.dll_GetDlgItem]
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.140002688
mov r11d, dword [rsp + 0x3c]
mov ebx, 1
sub r11d, dword [rsp + 0x34]
mov r8d, ebx
mov edx, 0x4b6
add r11d, 2
mov rcx, rdi
mov dword [rdi + 0x80], r11d
call fcn.140008e80
mov r8d, ebx
mov ebx, 0x4b7
mov rcx, rdi
mov edx, ebx
call fcn.140008e80
and qword [rsp + 0x40], 0
lea rcx, [rsp + 0x48]
xor edx, edx
mov r8d, 0x2b0
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x300]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x300]
mov r9d, 0x2b8
xor edx, edx
mov dword [rsp + 0x20], 0x103
call qword [sym.imp.SHELL32.dll_SHGetFileInfoW]
mov r11, qword [rsp + 0x40]
mov rcx, qword [rdi + 8]
mov edx, ebx
mov qword [rdi + 0x70], r11
call qword [sym.imp.USER32.dll_GetDlgItem]
lea r8, [0x140009714]
mov edx, 0xfffffffc
mov rcx, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
mov rcx, rdi
mov qword [rdi + 0x78], rax
call fcn.14000a8c0
mov rcx, rdi
mov ebx, eax
call fcn.140009fd8
mov eax, ebx
mov rbx, qword [rsp + 0x520]
add rsp, 0x510
pop rdi
ret
Function at 0x14000d5e0
Capabilities:
Hash data using sha256

Disassembly:
mov dword [rcx], 0x6a09e667
mov dword [rcx + 4], 0xbb67ae85
mov dword [rcx + 8], 0x3c6ef372
mov dword [rcx + 0xc], 0xa54ff53a
mov dword [rcx + 0x10], 0x510e527f
mov dword [rcx + 0x14], 0x9b05688c
mov dword [rcx + 0x18], 0x1f83d9ab
mov dword [rcx + 0x1c], 0x5be0cd19
mov qword [rcx + 0x20], 0
ret

Function at 0x14000dc00
Capabilities:
Hash data using sha256

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ebx, dword [rcx + 0x20]
mov rsi, rdx
mov rdi, rcx
and ebx, 0x3f
mov byte [rbx + rcx + 0x28], 0x80
inc ebx
cmp ebx, 0x38
je 0x14000dc40
and ebx, 0x3f
jne 0x14000dc34
mov rcx, rdi
call fcn.14000d620
mov byte [rbx + rdi + 0x28], 0
inc ebx
cmp ebx, 0x38
jne 0x14000dc27
mov rcx, qword [rdi + 0x20]
shl rcx, 3
mov rax, rcx
bswap ecx
shr rax, 0x20
mov dword [rdi + 0x64], ecx
mov rcx, rdi
bswap eax
mov dword [rdi + 0x60], eax
call fcn.14000d620
mov r11, rdi
mov edx, 4
nop dword [rax]
mov ecx, dword [r11 + 4]
mov eax, dword [r11]
add rsi, 8
bswap eax
bswap ecx
add r11, 8
dec rdx
mov dword [rsi - 8], eax
mov dword [rsi - 4], ecx
jne 0x14000dc70
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov dword [rdi], 0x6a09e667
mov dword [rdi + 4], 0xbb67ae85
mov dword [rdi + 8], 0x3c6ef372
mov dword [rdi + 0xc], 0xa54ff53a
mov dword [rdi + 0x10], 0x510e527f
mov dword [rdi + 0x14], 0x9b05688c
mov dword [rdi + 0x18], 0x1f83d9ab
mov dword [rdi + 0x1c], 0x5be0cd19
mov qword [rdi + 0x20], rdx
add rsp, 0x20
pop rdi
ret
Function at 0x14000ee30
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r13
mov r10d, dword [r9]
xor esi, esi
mov r13, r9
and r10d, 7
mov r12d, r8d
mov rdi, rcx
mov r11d, esi
cmp rdx, 5
jae 0x14000ee6a
xor eax, eax
mov rsi, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
pop r13
pop r12
ret
mov qword [rsp + 0x20], rbp
mov ebp, dword [rsp + 0x38]
lea r9, [rcx + rdx - 4]
mov qword [rsp + 0x18], rbx
nop dword [rax]
lea rdx, [r11 + rdi]
cmp rdx, r9
jae 0x14000eea1
nop dword [rax]
movzx eax, byte [rdx]
and al, 0xfe
cmp al, 0xe8
je 0x14000eea1
inc rdx
cmp rdx, r9
jb 0x14000ee90
mov rax, rdx
sub rax, r11
mov r11, rdx
sub r11, rdi
sub rax, rdi
cmp rdx, r9
jae 0x14000ef9c
cmp rax, 2
jbe 0x14000ef02
mov r10d, esi
movzx r8d, byte [rdx + 4]
lea eax, [r8 + 1]
test al, 0xfe
jne 0x14000ef2a
movzx eax, byte [rdx + 3]
shl r8d, 8
lea ebx, [r11 + r12 + 5]
or r8d, eax
movzx eax, byte [rdx + 2]
add r11, 5
shl r8d, 8
or r8d, eax
movzx eax, byte [rdx + 1]
shl r8d, 8
or r8d, eax
test ebp, ebp
je 0x14000ef39
add r8d, ebx
jmp 0x14000ef3c
mov ecx, eax
shr r10d, cl
test r10d, r10d
je 0x14000eec2
cmp r10d, 4
ja 0x14000ef2a
cmp r10d, 3
je 0x14000ef2a
mov eax, r10d
shr eax, 1
inc eax
movzx ecx, byte [rax + rdx]
inc ecx
test cl, 0xfe
jne 0x14000eec2
or r10d, 8
shr r10d, 1
inc r11
jmp 0x14000ee80
sub r8d, ebx
test r10d, r10d
je 0x14000ef72
and r10d, 6
mov eax, r8d
shl r10d, 2
mov ecx, r10d
shr eax, cl
inc eax
test al, 0xfe
jne 0x14000ef6f
mov eax, 0x100
shl eax, cl
dec eax
xor r8d, eax
test ebp, ebp
je 0x14000ef6c
add r8d, ebx
jmp 0x14000ef6f
sub r8d, ebx
mov r10d, esi
mov eax, r8d
mov byte [rdx + 1], r8b
shr eax, 8
mov byte [rdx + 2], al
mov eax, r8d
shr r8d, 0x18
shr eax, 0x10
and r8b, 1
neg r8b
mov byte [rdx + 3], al
mov byte [rdx + 4], r8b
jmp 0x14000ee80
mov rbp, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x18]
cmp rax, 2
ja 0x14000efb4
mov ecx, eax
shr r10d, cl
mov esi, r10d
mov rdi, qword [rsp + 0x30]
mov dword [r13], esi
mov rsi, qword [rsp + 0x28]
mov rax, r11
pop r13
pop r12
ret

Function at 0x1400179a4
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rcx, qword [rcx]
mov rdi, rdx
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x1400179d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1400179d4
xor al, al
jmp 0x1400179e7
mov ecx, dword [rsp + 0x40]
mov rax, rbx
mov al, 1
shl rcx, 0x20
add rcx, rbx
mov qword [rdi], rcx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140017b04
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
and dword [rsp + 0x58], 0
and qword [rsp + 0x20], 0
mov rbx, r9
lea r9, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x58]
test eax, eax
mov dword [rbx], ecx
setne al
add rsp, 0x30
pop rbx
ret
mov eax, dword [0x14002b98c]
cmp r8d, eax
cmova r8d, eax
jmp 0x140017b04
Function at 0x140017b38
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
and dword [rsp + 0x58], 0
and qword [rsp + 0x20], 0
mov rbx, r9
lea r9, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x58]
test eax, eax
mov dword [rbx], ecx
setne al
add rsp, 0x30
pop rbx
ret
mov eax, dword [0x14002b98c]
cmp r8d, eax
cmova r8d, eax
jmp 0x140017b04

Function at 0x140017b9c
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x14002b98c]
mov rcx, qword [rcx]
mov rbx, r9
cmp r8d, eax
lea r9, [rsp + 0x50]
cmova r8d, eax
and dword [rsp + 0x50], 0
and qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [rsp + 0x50]
test eax, eax
mov dword [rbx], ecx
setne al
add rsp, 0x30
pop rbx
ret

Function at 0x140017c4c
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdi, rdx
mov rsi, rcx
call fcn.1400179f4
test al, al
jne 0x140017c76
xor al, al
jmp 0x140017c8b
cmp qword [rsp + 0x40], rdi
jne 0x140017c72
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
setne al
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x1400220e0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push rbx
sub rsp, 0x20
lea r10, [0x14002e1a0]
xor edx, edx
mov r8, r10
mov ecx, edx
mov eax, edx
inc edx
shr eax, 1
and ecx, 1
add r8, 4
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov dword [r8 - 4], eax
cmp edx, 0x100
jb 0x1400220f2
mov eax, 0x800
movsxd rcx, edx
cmp edx, eax
jae 0x1400221e0
sub eax, edx
lea r8, [r10 + rcx*4]
mov r9d, eax
nop word [rax + rax]
mov edx, dword [r8 - 0x400]
add r8, 4
movzx ecx, dl
shr edx, 8
mov eax, dword [r10 + rcx*4]
xor eax, edx
dec r9
mov dword [r8 - 4], eax
jne 0x1400221c0
lea rax, [0x140022540]
lea rbx, [0x140022450]
mov qword [0x14002e188], rax
mov qword [0x1400301a0], rax
mov qword [0x14002e180], rbx
call fcn.140022310
mov rcx, qword [0x1400301a0]
test eax, eax
cmove rcx, rbx
mov qword [0x1400301a0], rcx
add rsp, 0x20
pop rbx
ret
Function at 0x140022b20
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rsi
mov qword [rsp + 0x10], rdi
push r12
sub rsp, 0xb0
and dword [rsp + 0x20], 0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x1400301b0], rdi
je 0x140022b79
cmp rax, rdi
jne 0x140022b6c
mov esi, 1
jmp 0x140022b79
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140022b53
mov eax, dword [0x1400301a8]
cmp eax, 1
jne 0x140022b8e
lea ecx, [rax + 0x1e]
call sub.msvcrt.dll__amsg_exit
jmp 0x140022bf3
mov eax, dword [0x1400301a8]
test eax, eax
jne 0x140022be9
mov dword [0x1400301a8], 1
lea r12, [0x140024868]
lea rdi, [0x140024850]
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], eax
cmp rdi, r12
jae 0x140022bdb
test eax, eax
jne 0x140022bdb
mov rcx, qword [rdi]
test rcx, rcx
je 0x140022bd0
call rcx
mov dword [rsp + 0x30], eax
add rdi, 8
mov qword [rsp + 0x38], rdi
jmp 0x140022bb9
test eax, eax
je 0x140022bf3
mov eax, 0xff
jmp 0x140022d3d
mov dword [0x14002e16c], 1
mov eax, dword [0x1400301a8]
cmp eax, 1
jne 0x140022c1b
lea rdx, [0x140024848]
lea rcx, [0x140024760]
call sub.msvcrt.dll__initterm
mov dword [0x1400301a8], 2
test esi, esi
jne 0x140022c28
xor eax, eax
xchg qword [0x1400301b0], rax
cmp qword [0x1400301b8], 0
je 0x140022c51
lea rcx, [0x1400301b8]
call fcn.140022f38
test eax, eax
je 0x140022c51
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x1400301b8]
mov rax, qword [sym.imp.msvcrt.dll__acmdln]
mov rdi, qword [rax]
mov qword [rsp + 0x28], rdi
mov esi, dword [rsp + 0x20]
cmp byte [rdi], 0x20
ja 0x140022cdc
cmp byte [rdi], 0
je 0x140022c72
test esi, esi
jne 0x140022cdc
cmp byte [rdi], 0
je 0x140022c86
cmp byte [rdi], 0x20
ja 0x140022c86
inc rdi
mov qword [rsp + 0x28], rdi
jmp 0x140022c72
test byte [rsp + 0x7c], 1
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rdi
xor edx, edx
lea rcx, [0x140000000]
call fcn.140008918
mov dword [0x14002e168], eax
cmp dword [0x14002e14c], 0
jne 0x140022cc5
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x14002e16c], 0
jne 0x140022cda
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14002e168]
jmp 0x140022d3d
cmp byte [rdi], 0x22
jne 0x140022cee
xor eax, eax
test esi, esi
sete al
mov esi, eax
mov dword [rsp + 0x20], eax
movzx ecx, byte [rdi]
call qword [sym.imp.msvcrt.dll__ismbblead]
test eax, eax
je 0x140022d03
inc rdi
mov qword [rsp + 0x28], rdi
inc rdi
mov qword [rsp + 0x28], rdi
jmp 0x140022c64
lea r11, [rsp + 0xb0]
mov rsi, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop r12
ret
sub rsp, 0x28
call fcn.14002302c
add rsp, 0x28
jmp 0x140022b20
Function at 0x140022f8c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
cmp rcx, rdx
je 0x140022fd9
cmp rcx, 0xffffffffffffffff
je 0x140022fd9
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140022fd1
cmp dword [rcx + 0x3c], edx
jl 0x140022fd1
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140022fd1
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140022fd9
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140003020
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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.140004c60
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140004c60
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140003090
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000a0a4]
mov rbx, rcx
test esi, esi
jle 0x1400031c0
mov rax, qword [0x14000a0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400030db
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003165
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400030c0
mov rcx, rbx
call fcn.140003ae0
mov rdi, rax
test rax, rax
je 0x1400031e2
mov rax, qword [0x14000a0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003c20
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400031c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000315e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003170
add dword [0x14000a0a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14000a0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000315e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140003020
nop dword [rax]
xor esi, esi
jmp 0x1400030e8
mov rax, qword [0x14000a0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140003020
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140003020
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003750
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000a100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x1400037ac
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x1400037a3
test rsi, rsi
je 0x1400037a3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003788
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140003ae0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140006b20]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003b00
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003b08
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003b00
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140003b5d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140003b54
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003b00
add rax, 0x28
cmp rax, r9
jne 0x140003b40
xor eax, eax
ret

Function at 0x140003b60
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006b20]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140003b7f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003b88
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003b7f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140003c20
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006b20]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003c3f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003c48
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400099f0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140009a00]
mov dword [rax], 1
mov rax, qword [0x140009a10]
mov dword [rax], 1
mov rax, qword [0x1400099a0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400099e0]
mov dword [0x14000c00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140009ac0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140009aa0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140009950]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400014a4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call dbg.__main
lea rax, str.This_is_just_a_random_stringgggg__n
mov rcx, rax
call sym.printf
mov rax, qword [section..data]
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
mov rdx, qword [section..data]
mov rax, qword [rbp - 8]
mov r8, rdx
lea rdx, section..rdata
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 8]
call rax
mov eax, 0
add rsp, 0x30
pop rbp
ret

Function at 0x1400017e0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]