joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140024080
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
mov rsi, rcx
cmp qword [rcx + 8], 0
je 0x1400241d3
xor edi, edi
cmp qword [rcx + 0xe0], rdi
je 0x1400241a7
cmp qword [rcx + 0xe8], rdi
je 0x1400240c2
mov edi, 0xc80000
jmp 0x140024182
call fcn.1400013b0
mov rcx, rax
test rax, rax
je 0x1400241e6
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea ebp, [rax + 1]
test ebp, ebp
js 0x1400241f1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, ebp
or eax, ecx
jge 0x140024119
mov edx, ebp
lea rcx, [rsp + 0x40]
call fcn.140024500
mov rbx, qword [rsp + 0x40]
mov r8d, ebp
mov rdx, rbx
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, 0xffffffff
jne 0x14002413a
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140030dac
test eax, eax
js 0x1400241f1
cmp eax, dword [rbx - 0xc]
jg 0x1400241f1
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], di
cmp dword [rbx - 0x10], 0
je 0x140024166
mov eax, 0xc00000
cmp word [rbx], 0
cmovne edi, eax
lea rdx, [rbx - 0x18]
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140024182
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, 0x410000
mov ecx, 0x400000
cmp qword [rsi + 0xf0], 0
cmove eax, ecx
or edi, eax
cmp qword [rsi + 0xf8], 0
je 0x1400241a7
bts edi, 0x11
mov edx, 0xfffffff0
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_GetWindowLongW]
and eax, 0xcb0000
cmp eax, edi
je 0x1400241d3
mov r9d, 0x37
mov r8d, edi
mov edx, eax
lea rcx, [rsi + 8]
call fcn.140014ad0
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
mov ecx, 0x80004005
call fcn.140001260
nop
mov ecx, 0x80070057
call fcn.140001260
int3

Function at 0x1400266d0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002671a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002671a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002671a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002671a
cmp dword [rcx + 0x84], 0xe
jbe 0x14002671a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14002671c
xor al, al
add rsp, 0x28
ret
Function at 0x14002c5a8
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 0x14002c413
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002c413
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002c413
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002c413
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002c413
cmp dword [rcx + 0x84], 0xe
jbe 0x14002c413
cmp dword [rcx + 0xf8], 0
je 0x14002c413
mov ecx, ebx
call fcn.14002c4c4
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.14002c2a0
nop
cmp dword [rbp + 0x20], 0
je 0x14002c461
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14002c46c
int3
xor r8d, r8d
xor edx, edx
jmp 0x14002c3a4
Function at 0x140034a68
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140034a7e
mov al, 1
jmp 0x140034ade
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140034a8f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140034adc
mov ecx, dword [rcx + 0x18]
nop
call fcn.140038a88
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140034adc
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140034adc
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140034adc
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140034ade
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x140036090
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, [0x14005e920]
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 0x1400360e7
cmp word [rdx], r13w
jne 0x1400360e7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400360ec
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140036211
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140036232
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140036125
mov rdx, r9
mov word [rbx], cx
jmp 0x14003614c
cmp r9, r8
jae 0x14003615c
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 0x140036106
jmp 0x140036211
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 0x140036206
cmp dword [rsp + 0x80], esi
je 0x140036206
lea r8, [0x14005e920]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400361de
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400361ae
mov word [rbx], r13w
jmp 0x14003620e
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 0x1400361bb
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14003620e
cmp word [rsp + 0x70], r13w
jne 0x1400361eb
cmp rbx, r14
je 0x1400361a8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140033990
cmp word [rsp + 0x70], r13w
je 0x140036211
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, [0x14005e920]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14003620b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140036211
Function at 0x140038128
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 0x1400381af
mov rsi, rbx
cmp word [rax], bp
je 0x14003816e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140038158
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140038154
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140034d04
mov rdi, rax
test rax, rax
je 0x14003819c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140027b50
mov rbp, rdi
xor ecx, ecx
call fcn.1400321f8
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 0x14003ca70
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.140033990
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140033990
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14003cbc0
cmp rax, 0xffffffffffffffff
je 0x14003cbc0
xor edi, edi
test rbp, rbp
jle 0x14003cb6b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140036e78
mov rbx, rax
test rax, rax
jne 0x14003caf8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14003cb61
mov edx, 0x8000
mov ecx, r14d
call fcn.140031f00
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.140034668
cmp eax, 0xffffffff
je 0x14003cb41
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14003cb08
mov edx, r15d
mov ecx, r14d
call fcn.140031f00
jmp 0x14003cb61
cmp byte [rsi + 0x38], dil
je 0x14003cb58
cmp dword [rsi + 0x34], 5
jne 0x14003cb58
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14003cb61
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1400321f8
jmp 0x14003cbd4
jns 0x14003cbd4
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140033990
cmp rax, 0xffffffffffffffff
jne 0x14003cb8c
cmp byte [rsi + 0x30], dil
je 0x14003cbd4
mov edi, dword [rsi + 0x2c]
jmp 0x14003cbd4
mov ecx, r14d
call fcn.140038a88
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14003cbd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x14003cbd4
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14003cbcd
mov eax, dword [rsi + 0x2c]
jmp 0x14003cbd2
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140033990
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 0x4020e3
Capabilities:
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rdi, qword [fcn.004161c0]
xor r12d, r12d
mov rsi, rcx
lea rbp, [rdx - 1]
lea r13, [rsp + 0x28]
mov rbx, rdx
cmp r12, rbx
jl 0x40214f
mov ecx, 1
call rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x0041815c]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rdi
mov rcx, rax
call fcn.00416120
nop
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
jb 0x40215c
mov rdx, rbp
mov rcx, r12
call fcn.004050fe
mov r14, qword [rsi + r12*8]
mov ecx, 1
call rdi
xor r8d, r8d
mov rcx, rax
mov rdx, r14
call fcn.00401fc9
mov r8, r13
mov edx, 1
mov rcx, r12
call fcn.00401ef0
test al, al
je 0x40218e
call fcn.00403dc8
mov r12, qword [rsp + 0x28]
jmp 0x40210a

Function at 0x4024c2
Capabilities:
Write file on windows

Disassembly:
push r12
push rdi
sub rsp, 0x28
xor r8d, r8d
mov r12, rcx
mov r10, rdx
test rdx, rdx
je 0x4024e9
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r10
mov r9, r12
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, r12
add rsp, 0x28
pop rdi
pop r12
jmp fcn.00416120
Function at 0x406938
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x50
movups xmmword [rsp + 0x40], xmm6
mov rbx, rcx
mov rsi, rdx
mov r13, r8
test rcx, rcx
je 0x406b6c
mov rdx, qword [rcx]
cmp r8, rdx
jge 0x406b7e
jb 0x406977
dec rdx
mov rcx, r13
call fcn.004050fe
cmp byte [rbx + r13 + 0x10], 0x2b
jne 0x406b7e
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, r13
call fcn.00406900
test al, al
je 0x40699e
call fcn.00403dc8
mov r12, qword [rsp + 0x38]
mov rdx, qword [rbx]
cmp rdx, r12
jg 0x4069b2
xor eax, eax
jmp 0x406b86
cmp r12, rdx
jb 0x4069c2
dec rdx
mov rcx, r12
call fcn.004050fe
mov al, byte [rbx + r12 + 0x10]
sub eax, 0x30
cmp al, 9
ja 0x4069ab
mov qword [rsi], 0
movq xmm6, qword [0x00418c30]
mov rdx, qword [rbx]
cmp r12, rdx
jl 0x406a07
lea r8, [rsp + 0x38]
mov rdx, r13
mov rcx, r12
call fcn.0040691b
test al, al
je 0x406b65
call fcn.00403dc8
jmp 0x406b65
jb 0x406a14
dec rdx
mov rcx, r12
call fcn.004050fe
mov al, byte [rbx + r12 + 0x10]
sub eax, 0x30
cmp al, 9
ja 0x4069e5
mov rdx, qword [rbx]
cmp r12, rdx
jb 0x406a33
dec rdx
mov rcx, r12
call fcn.004050fe
movzx ecx, byte [rbx + r12 + 0x10]
lea r8, [rsp + 0x28]
mov edx, 0x30
call fcn.0040691b
test al, al
je 0x406a51
call fcn.00403dc8
mov r14, qword [rsp + 0x28]
lea rdi, [rsp + 0x30]
movabs rcx, 0x7fffffffffffffff
mov r8, rdi
mov rdx, r14
call fcn.0040691b
test al, al
je 0x406a79
call fcn.00403dc8
mov rax, qword [rsp + 0x30]
mov r8d, 0xa
mov rcx, qword [rsi]
cqo
idiv r8
cmp rcx, rax
jle 0x406a9d
movabs rax, 0x7fffffffffffffff
jmp 0x406afa
imul r15, rcx, 0xa
cvtsi2sd xmm0, rcx
mulsd xmm0, qword [0x00418c20]
cvtsi2sd xmm1, r15
ucomisd xmm0, xmm1
jp 0x406abb
je 0x406adc
subsd xmm1, xmm0
movupd xmm2, xmm0
andps xmm2, xmm6
andps xmm1, xmm6
mulsd xmm1, qword [0x00418c40]
comisd xmm2, xmm1
jae 0x406adc
call fcn.00403dc8
lea r8, [rsp + 0x38]
mov rdx, r14
mov rcx, r15
call fcn.00406900
test al, al
je 0x406af5
call fcn.00403dc8
mov rax, qword [rsp + 0x38]
mov qword [rsi], rax
mov r8, rdi
mov edx, 1
mov rcx, r12
call fcn.00406900
test al, al
je 0x406b16
call fcn.00403dc8
mov r12, qword [rsp + 0x30]
lea rdi, [rsp + 0x38]
mov rdx, qword [rbx]
cmp r12, rdx
jge 0x4069dd
jb 0x406b39
dec rdx
mov rcx, r12
call fcn.004050fe
cmp byte [rbx + r12 + 0x10], 0x5f
jne 0x4069dd
mov r8, rdi
mov edx, 1
mov rcx, r12
call fcn.00406900
test al, al
je 0x406b5e
call fcn.00403dc8
mov r12, qword [rsp + 0x38]
jmp 0x406b20
mov rax, qword [rsp + 0x38]
jmp 0x406b86
or rdx, 0xffffffffffffffff
test r8, r8
js 0x40696f
jmp 0x4069ab
mov r12, r13
jmp 0x4069a3
movups xmm6, xmmword [rsp + 0x40]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x414fe0
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.004161c0
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.004161c0
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 0x415050
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00431314]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x4151f8
mov rax, qword [0x00431318]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x41509c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x415127
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x415080
mov rcx, r12
call fcn.00415db0
mov rbp, rax
test rax, rax
je 0x415232
mov rax, qword [0x00431318]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00415ee0
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00431318]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x415241
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x415120
sub eax, 4
and eax, 0xfffffffb
jne 0x4151b0
add dword [0x00431314], 1
cmp ebx, 8
jae 0x415158
test bl, 4
jne 0x415200
test ebx, ebx
je 0x415149
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x415220
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 0x415149
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 0x41518a
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 [0x00431318]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x415120
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00414fe0
nop dword [rax]
xor edi, edi
jmp 0x4150a7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x415149
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x415149
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00414fe0
mov rax, qword [0x00431318]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00414fe0
nop
nop dword [rax]
Function at 0x415a20
Capabilities:
Get thread local storage value

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

Function at 0x415db0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x0042b390]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x415e29
mov rcx, r10
call fcn.00415c80
test eax, eax
je 0x415e29
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 0x415e26
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 0x415e1d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x415e29
add r8, 0x28
cmp r8, r9
jne 0x415e08
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000ad70]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000ad80]
mov dword [rax], 1
mov rax, qword [0x14000ad90]
mov dword [rax], 1
mov rax, qword [0x14000ad60]
mov dword [rax], 1
mov rax, qword [0x14000ac20]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x14000ad50]
mov dword [0x14000e020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010c0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14000ad10]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14000acf0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14000abd0]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
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
mov rcx, qword [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 0x140001d70
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov dword [rbp + 0x20], ecx
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
mov edx, eax
mov ecx, 4
call sym.CreateToolhelp32Snapshot
mov qword [rbp - 8], rax
mov dword [rbp - 0x30], 0x1c
lea rdx, [rbp - 0x30]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.Thread32First
test eax, eax
sete al
test al, al
jne 0x140001e1f
mov ebx, dword [rbp - 0x24]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
cmp ebx, eax
jne 0x140001dd6
mov eax, dword [rbp - 0x28]
cmp dword [rbp + 0x20], eax
je 0x140001dd6
mov eax, 1
jmp 0x140001ddb
mov eax, 0
test al, al
je 0x140001e04
mov eax, dword [rbp - 0x28]
mov r8d, eax
mov edx, 0
mov ecx, 0x1fffff
mov rax, qword [sym.imp.KERNEL32.dll_OpenThread]
call rax
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SuspendThread]
call rax
lea rdx, [rbp - 0x30]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.Thread32Next
test eax, eax
setne al
test al, al
jne 0x140001db7
jmp 0x140001e20
nop
add rsp, 0x58
pop rbx
pop rbp
ret

Function at 0x140001e27
Capabilities:
Enumerate threads
Resume thread

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov dword [rbp + 0x20], ecx
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
mov edx, eax
mov ecx, 4
call sym.CreateToolhelp32Snapshot
mov qword [rbp - 8], rax
mov dword [rbp - 0x30], 0x1c
lea rdx, [rbp - 0x30]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.Thread32First
test eax, eax
sete al
test al, al
jne 0x140001ed6
mov ebx, dword [rbp - 0x24]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
cmp ebx, eax
jne 0x140001e8d
mov eax, dword [rbp - 0x28]
cmp dword [rbp + 0x20], eax
je 0x140001e8d
mov eax, 1
jmp 0x140001e92
mov eax, 0
test al, al
je 0x140001ebb
mov eax, dword [rbp - 0x28]
mov r8d, eax
mov edx, 0
mov ecx, 0x1fffff
mov rax, qword [sym.imp.KERNEL32.dll_OpenThread]
call rax
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResumeThread]
call rax
lea rdx, [rbp - 0x30]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.Thread32Next
test eax, eax
setne al
test al, al
jne 0x140001e6e
jmp 0x140001ed7
nop
add rsp, 0x58
pop rbx
pop rbp
ret
Function at 0x1400024cc
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov dword [rbp - 0xc], eax
mov eax, dword [rbp - 0xc]
mov ecx, eax
call sym.SuspendThreads_unsigned_long_
call sym.HeapEncryptDecrypt__
lea rax, [rbp - 0xc]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [sym.EncryptDecryptThread_void_]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x14000254c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_create_encrypt_decrypt_thread._Error:__lu_n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140002581
mov rax, qword [rbp - 8]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
call sym.HeapEncryptDecrypt__
mov eax, dword [rbp - 0xc]
mov ecx, eax
call sym.ResumeThreads_unsigned_long_
nop
add rsp, 0x40
pop rbp
ret

Function at 0x140002910
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]