joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006d20c
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, [0x1400b4dc0]
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 0x14006d263
cmp word [rdx], r13w
jne 0x14006d263
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14006d268
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14006d38d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14006d3ae
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14006d2a1
mov rdx, r9
mov word [rbx], cx
jmp 0x14006d2c8
cmp r9, r8
jae 0x14006d2d8
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 0x14006d282
jmp 0x14006d38d
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 0x14006d382
cmp dword [rsp + 0x80], esi
je 0x14006d382
lea r8, [0x1400b4dc0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14006d35a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14006d32a
mov word [rbx], r13w
jmp 0x14006d38a
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 0x14006d337
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14006d38a
cmp word [rsp + 0x70], r13w
jne 0x14006d367
cmp rbx, r14
je 0x14006d324
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14006de74
cmp word [rsp + 0x70], r13w
je 0x14006d38d
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, [0x1400b4dc0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14006d387
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14006d38d
Function at 0x140072378
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 0x1400723a8
xor eax, eax
jmp 0x14007246b
mov rbp, rbx
cmp word [rax], si
je 0x1400723cd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400723b4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400723b0
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.14006f89c
movsxd r14, eax
test eax, eax
jne 0x14007240b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400723a1
mov rcx, r14
call fcn.14006df18
mov rdi, rax
test rax, rax
jne 0x140072424
xor ecx, ecx
call fcn.140069394
jmp 0x140072400
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.14006f89c
test eax, eax
jne 0x140072455
mov rcx, rdi
call fcn.140069394
jmp 0x14007245f
xor ecx, ecx
call fcn.140069394
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 0x140072488
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 0x14007250f
mov rsi, rbx
cmp word [rax], bp
je 0x1400724ce
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400724b8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400724b4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14006df18
mov rdi, rax
test rax, rax
je 0x1400724fc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14004e9f0
mov rbp, rdi
xor ecx, ecx
call fcn.140069394
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 0x140075ad8
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.140068fbc
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 0x140075b79
cmp ebx, dword [rsp + 0x30]
je 0x140075b72
test esi, esi
je 0x140075b72
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140075b4d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140075b5a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140075b37
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140075b5e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x140075b7b
mov eax, 1
jmp 0x140075b7b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14007a1f8
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.1400626e8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14007a282
cmp byte [rbp - 0x21], r15b
je 0x14007a27d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14007a2b8
call fcn.1400696f0
test eax, eax
jne 0x14007a2a4
cmp byte [rbp - 0x21], r15b
je 0x14007a29c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14007a2b8
cmp byte [rbp - 0x21], r15b
je 0x14007a2b5
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.140064a60
test eax, eax
jne 0x14007a358
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400626e8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14007a2f7
cmp byte [rbp - 0x21], r15b
je 0x14007a32c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14007a32c
call fcn.1400696f0
test eax, eax
jne 0x14007a318
cmp byte [rbp - 0x21], r15b
je 0x14007a311
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14007a32c
cmp byte [rbp - 0x21], r15b
je 0x14007a329
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.140064a60
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14007a358
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14007a35b
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14007a369
mov rcx, rdi
call fcn.140069394
cmp byte [rbp + 0x3f], r15b
je 0x14007a378
mov rcx, qword [rbp + 0x27]
call fcn.140069394
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 0x14007aec0
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.14006de74
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14006de74
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14007b010
cmp rax, 0xffffffffffffffff
je 0x14007b010
xor edi, edi
test rbp, rbp
jle 0x14007afbb
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14006931c
mov rbx, rax
test rax, rax
jne 0x14007af48
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14007afb1
mov edx, 0x8000
mov ecx, r14d
call fcn.140066588
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.14006c148
cmp eax, 0xffffffff
je 0x14007af91
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14007af58
mov edx, r15d
mov ecx, r14d
call fcn.140066588
jmp 0x14007afb1
cmp byte [rsi + 0x38], dil
je 0x14007afa8
cmp dword [rsi + 0x34], 5
jne 0x14007afa8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14007afb1
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140069394
jmp 0x14007b024
jns 0x14007b024
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14006de74
cmp rax, 0xffffffffffffffff
jne 0x14007afdc
cmp byte [rsi + 0x30], dil
je 0x14007b024
mov edi, dword [rsi + 0x2c]
jmp 0x14007b024
mov ecx, r14d
call fcn.140073584
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14007b024
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 0x14007b024
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14007b01d
mov eax, dword [rsi + 0x2c]
jmp 0x14007b022
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14006de74
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 0x401550
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xaf2610e1
cmp byte [rcx], 0
je 0x401582
mov r8d, 0
mov edx, 0
add r8d, 1
movzx edx, word [rcx + rdx]
mov r9d, eax
ror r9d, 8
add edx, r9d
xor eax, edx
mov edx, r8d
cmp byte [rcx + rdx], 0
jne 0x401565
ret

Function at 0x401589
Capabilities:
Access peb ldr_data
Get ntdll base address
Populate syswhispers2 syscall list
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r14d, dword [0x00408980]
mov eax, 1
test r14d, r14d
jne 0x401741
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rcx, qword [rax + 0x10]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x401752
mov r9d, 0
jmp 0x4015e0
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x401624
mov rdi, rax
movsxd r8, dword [rax + 0x3c]
mov edx, dword [rax + r8 + 0x88]
test edx, edx
je 0x4015d4
mov edx, edx
lea r9, [rax + rdx]
mov edx, dword [r9 + 0xc]
add rax, rdx
mov r8d, dword [rax]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x4015d4
mov eax, dword [rax + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
jne 0x4015d4
jmp 0x40162d
test r9, r9
je 0x401759
mov r15d, dword [r9 + 0x1c]
add r15, rdi
mov r12d, dword [r9 + 0x24]
add r12, rdi
mov eax, dword [r9 + 0x18]
lea edx, [rax - 1]
mov eax, dword [r9 + 0x20]
add rax, rdi
lea rsi, [rax + rdx*4]
lea rbx, [r12 + rdx*2]
mov r13d, r14d
lea rax, [0x00408988]
mov qword [rsp + 0x28], rax
jmp 0x401672
sub rsi, 4
lea rax, [rbx - 2]
cmp r12, rbx
je 0x4016bd
mov rbx, rax
mov ecx, dword [rsi]
add rcx, rdi
cmp word [rcx], 0x775a
jne 0x401662
mov ebp, r13d
shl rbp, 4
add rbp, qword [rsp + 0x28]
call fcn.00401550
mov dword [rbp], eax
movzx eax, word [rbx]
mov eax, dword [r15 + rax*4]
mov dword [rbp + 4], eax
mov qword [rbp + 8], 0
add r13d, 1
cmp r13d, 0x1f4
jne 0x401662
mov dword [0x00408980], 0x1f4
jmp 0x4016cf
mov dword [0x00408980], r13d
mov eax, 1
cmp r13d, 1
je 0x401741
mov r10d, r14d
lea r9, [0x00408988]
jmp 0x4016e4
add r10d, 1
cmp eax, r10d
jbe 0x40173c
mov ecx, r14d
mov eax, dword [0x00408980]
sub eax, 1
mov edx, eax
sub edx, r10d
cmp edx, ecx
jbe 0x4016db
mov edx, ecx
shl rdx, 4
add rdx, r9
mov r8d, dword [rdx + 4]
add ecx, 1
mov eax, ecx
shl rax, 4
add rax, r9
cmp r8d, dword [rax + 4]
jbe 0x4016e7
mov ebx, dword [rdx]
mov r11, qword [rdx + 8]
mov esi, dword [rax]
mov dword [rdx], esi
mov esi, dword [rax + 4]
mov dword [rdx + 4], esi
mov rsi, qword [rax + 8]
mov qword [rdx + 8], rsi
mov dword [rax], ebx
mov dword [rax + 4], r8d
mov qword [rax + 8], r11
jmp 0x4016e7
mov eax, 1
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0
jmp 0x401741
mov eax, 0
jmp 0x401741

Function at 0x40189d
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, 0xb942107
call fcn.00401760
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 0x4018df
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, 0x9d95891e
call fcn.00401760
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 0x401921
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, 0xc8270771
call fcn.00401760
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 0x401963
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, 0xd42ea52
call fcn.00401760
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 0x402390
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00408624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x402518
mov rax, qword [0x00408628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4023dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x402465
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4023c0
mov rcx, rbx
call fcn.00403030
test rax, rax
mov r12, rax
je 0x40254d
mov rax, qword [0x00408628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00403160
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00408628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402530
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40245e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4024c0
add dword [0x00408624], 1
cmp edi, 8
jae 0x402493
test dil, 4
jne 0x402504
test edi, edi
je 0x402488
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40251f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x402488
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x4024ac
jmp 0x402488
add rsi, qword [0x00408628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40245e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00403530
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x402488
xor esi, esi
jmp 0x4023e7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402488
mov rax, qword [0x00408628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00403530
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00403530
nop
nop dword [rax]

Function at 0x402ca0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004088e0]
test rbx, rbx
je 0x402cf4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x402ceb
test rsi, rsi
je 0x402ceb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402cd0
lea rcx, [0x00408900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x403030
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004053a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40309d
mov rcx, r8
call fcn.00402f10
test eax, eax
je 0x40309d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40309d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x403094
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40309f
add rax, 0x28
cmp rax, r9
jne 0x403080
xor eax, eax
add rsp, 0x28
ret

Function at 0x403530
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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.004033f0
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.004033f0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x14000c980
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
mov eax, 0x1408
call fcn.14002dc40
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1380], 0xfffffffffffffffe
mov edi, edx
mov rsi, rcx
mov rax, qword [0x14005c3b0]
movabs rcx, 0x4a1e64d7f31ffe65
movabs r14, 0xc5fc74d6c7b48092
mov rax, qword [rax + rcx]
add rax, r14
movabs rdx, 0x4a1e64d7f320007e
add rdx, qword [0x14005c3b8]
lea rbx, [0x14005f528]
mov rcx, rbx
call rax
mov rax, qword [0x14005c3b0]
movabs rcx, 0x4a1e64d7f31ffe6d
mov rax, qword [rax + rcx]
add rax, r14
lea rcx, [rbp + 0x1350]
mov rdx, rbx
call rax
mov rax, qword [0x14005c3c8]
movabs rcx, 0x4b72dbced439f941
movabs r10, 0xeacabd35557402da
add r10, qword [rax + rcx]
lea rcx, [rbp - 0x50]
mov edx, edi
mov r8d, 0xffffffff
mov r9d, 0x6c078965
call r10
mov rax, qword [0x14005c3b0]
movabs rcx, 0x4a1e64d7f31ffe75
mov rax, qword [rax + rcx]
movabs rbx, 0xc5fc74d6c7b48092
add rax, rbx
lea rdi, [rbp + 0x1350]
lea rdx, [rbp + 0x1370]
mov rcx, rdi
call rax
mov rax, qword [0x14005c3b0]
movabs rcx, 0x4a1e64d7f31ffe7d
mov rax, qword [rax + rcx]
add rax, rbx
lea rdx, [rbp + 0x1378]
mov rcx, rdi
call rax
mov rdi, qword [rbp + 0x1378]
mov rbx, qword [rbp + 0x1370]
mov rax, qword [0x14005c3d0]
movabs rcx, 0xe39dde28b594e35f
movabs r15, 0xd77cf5515877c26a
mov r8, qword [rax + rcx]
add r8, r15
lea rcx, [rbp + 0x1338]
lea rdx, [rbp - 0x50]
call r8
mov rax, qword [0x14005c3d0]
movabs rcx, 0xe39dde28b594e367
add r15, qword [rax + rcx]
lea r14, [rbp + 0x1338]
mov rcx, rdi
mov rdx, rbx
mov r8, r14
call r15
mov rax, qword [0x14005c3e8]
movabs rcx, 0xe80918466e283714
movabs rdi, 0xcfe713fc4c3547a5
mov rdx, qword [rax + rcx]
add rdx, rdi
mov rcx, r14
call rdx
mov rax, qword [0x14005c3e8]
movabs rcx, 0xe80918466e28371c
add rdi, qword [rax + rcx]
mov qword [rsp + 0x20], r14
lea rdx, [rbp + 0x1350]
mov r9d, 0x10
mov rcx, rsi
xor r8d, r8d
call rdi
mov rax, qword [0x14005c3b0]
movabs rcx, 0x4a1e64d7f31ffe85
movabs rdx, 0xc5fc74d6c7b48092
add rdx, qword [rax + rcx]
lea rcx, [rbp + 0x1350]
call rdx
mov rax, rsi
add rsp, 0x1408
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret

Function at 0x14002eebc
Capabilities:
Parse pe header

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

Function at 0x1400331f8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140033340

Function at 0x140035b70
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140035b98
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140035b98
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14003c3a8
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 0x14003c3d8
xor eax, eax
jmp 0x14003c49b
mov rbp, rbx
cmp word [rax], si
je 0x14003c3fd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14003c3e4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14003c3e0
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.14003c2c8
movsxd r14, eax
test eax, eax
jne 0x14003c43b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14003c3d1
mov rcx, r14
call fcn.140039f98
mov rdi, rax
test rax, rax
jne 0x14003c454
xor ecx, ecx
call fcn.140037518
jmp 0x14003c430
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.14003c2c8
test eax, eax
jne 0x14003c485
mov rcx, rdi
call fcn.140037518
jmp 0x14003c48f
xor ecx, ecx
call fcn.140037518
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 0x14003c4b8
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 0x14003c53f
mov rsi, rbx
cmp word [rax], bp
je 0x14003c4fe
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003c4e8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14003c4e4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140039f98
mov rdi, rax
test rax, rax
je 0x14003c52c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140030310
mov rbp, rdi
xor ecx, ecx
call fcn.140037518
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