joyce8/EMBER2024-capa huggingface dataset:
Function at 0x424410
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp edx, 2
je 0x4244d0
ja 0x424458
test edx, edx
je 0x4244e8
mov eax, dword [0x00429108]
test eax, eax
je 0x4245c0
mov dword [0x00429108], 1
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
ret
cmp edx, 3
jne 0x424444
mov eax, dword [0x00429108]
test eax, eax
je 0x424444
lea rcx, [0x00429120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00429100]
test rbx, rbx
je 0x4244bc
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x4245e8
test r12, r12
je 0x4245e8
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x424490
lea rcx, [0x00429120]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x424444
call sym._fpreset
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
ret
mov eax, dword [0x00429108]
test eax, eax
jne 0x424550
mov eax, dword [0x00429108]
cmp eax, 1
jne 0x424444
mov rbx, qword [0x00429100]
test rbx, rbx
je 0x424521
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call sub.msvcrt.dll_free
test rbx, rbx
jne 0x424510
lea rcx, [0x00429120]
mov qword [0x00429100], 0
mov dword [0x00429108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x424444
lea rcx, [0x00429120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00429100]
test rbx, rbx
je 0x4245a4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x4245d8
test r12, r12
je 0x4245d8
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x424580
lea rcx, [0x00429120]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4244f2
lea rcx, [0x00429120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x42443a
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x424580
jmp 0x4245a4
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x424490
jmp 0x4244bc

Function at 0x424600
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x424618
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x424620
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x424630
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
mov r8, rdx
lea rdx, [rax + rcx]
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x42467c
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov ecx, dword [rax + 0xc]
mov rdx, rcx
cmp rcx, r8
ja 0x424673
add edx, dword [rax + 8]
cmp rdx, r8
ja 0x42467e
add rax, 0x28
cmp rax, r9
jne 0x424660
xor eax, eax
ret
Function at 0x424680
Capabilities:
Parse pe header

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call sym.strlen
cmp rax, 8
ja 0x424710
mov rdx, qword [0x00426440]
xor r12d, r12d
cmp word [rdx], 0x5a4d
jne 0x4246fe
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x4246fe
cmp word [rax + 0x18], 0x20b
jne 0x4246fe
movzx edx, word [rax + 0x14]
lea r12, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x424710
sub eax, 1
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8 + 0x28]
jmp 0x4246e9
add r12, 0x28
cmp r12, rsi
je 0x424710
mov r8d, 8
mov rdx, rbx
mov rcx, r12
call sym.strncmp
test eax, eax
jne 0x4246e0
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret

Function at 0x424720
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r8, qword [0x00426440]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x424740
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x424748
ret
cmp word [rdx + 0x18], 0x20b
jne 0x424740
movzx eax, word [rdx + 0x14]
sub rcx, r8
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x42478d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x424784
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x424740
add rax, 0x28
cmp rax, r9
jne 0x424770
xor eax, eax
ret

Function at 0x424790
Capabilities:
Parse pe header

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

Function at 0x4247d0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x00426440]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x4247f0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x4247f8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x4247f0
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x424838
sub edx, 1
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x42482f
test rcx, rcx
je 0x4247f0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x424820
xor eax, eax
ret

Function at 0x424840
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x00426440]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x424860
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x424868
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x424880
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rax, qword [0x00426440]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x4248a0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x4248a8
mov eax, r8d
ret
cmp word [rdx + 0x18], 0x20b
jne 0x4248a0
sub rcx, rax
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x4248a0
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x4248e4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4248f8
add rax, 0x28
cmp r9, rax
jne 0x4248d0
xor r8d, r8d
mov eax, r8d
ret
mov r8d, dword [rax + 0x24]
not r8d
shr r8d, 0x1f
mov eax, r8d
ret

Function at 0x424910
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x00426440]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x424934
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
cmp dword [rcx], 0x4550
je 0x424940
mov rax, r9
ret
cmp word [rcx + 0x18], 0x20b
jne 0x424934
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x424934
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x424934
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x424984
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x424998
add rdx, 0x28
cmp r10, rdx
jne 0x424970
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x4249a8
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x4249b6
mov edx, dword [rax + 0xc]
test edx, edx
je 0x42498d
test r8d, r8d
jg 0x4249a0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x14001137a
Capabilities:
Terminate process

Disassembly:
jmp 0x140017fd0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x28
ret

Function at 0x140011460
Capabilities:
Parse pe header

Disassembly:
jmp 0x140019320
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140019340
xor al, al
jmp 0x1400193c1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140019353
xor al, al
jmp 0x1400193c1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001937d
xor al, al
jmp 0x1400193c1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140019391
xor al, al
jmp 0x1400193c1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400193a3
xor al, al
jmp 0x1400193c1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x1400193bf
xor al, al
jmp 0x1400193c1
mov al, 1
add rsp, 0x38
ret
Function at 0x140017120
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.14001167c
movzx eax, al
test eax, eax
jne 0x140017140
mov ecx, 7
call fcn.140011541
nop
mov byte [rsp + 0x20], 0
call fcn.140011582
mov byte [rsp + 0x21], al
cmp dword [0x140024b78], 1
jne 0x140017164
mov ecx, 7
call fcn.140011541
nop
jmp 0x1400171bc
cmp dword [0x140024b78], 0
jne 0x1400171b7
mov dword [0x140024b78], 1
lea rdx, [0x14001f660]
lea rcx, [0x14001f330]
call fcn.1400112ee
test eax, eax
je 0x140017198
mov eax, 0xff
jmp 0x1400172c1
lea rdx, [0x14001f220]
lea rcx, [section..rdata]
call fcn.140011569
mov dword [0x140024b78], 2
jmp 0x1400171bc
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.14001152d
call fcn.140011488
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x140017219
mov rcx, qword [rsp + 0x30]
call fcn.140011258
movzx eax, al
test eax, eax
je 0x140017219
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x14002b020]
nop
call fcn.1400114d3
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x14001724d
mov rcx, qword [rsp + 0x38]
call fcn.140011258
movzx eax, al
test eax, eax
je 0x14001724d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.14001161d
nop
call fcn.140017370
mov dword [rsp + 0x28], eax
call fcn.140011460
movzx eax, al
test eax, eax
jne 0x14001726c
mov ecx, dword [rsp + 0x28]
call fcn.140011087
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x14001727b
call fcn.14001162c
nop
xor edx, edx
mov cl, 1
call fcn.140011230
mov eax, dword [rsp + 0x28]
jmp 0x1400172c1
add rsp, 0x68
ret
Function at 0x1400012dc
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x140003638], rbx
je 0x140001328
cmp rax, rbx
jne 0x14000131b
mov ebx, 1
mov esi, ebx
jmp 0x14000132d
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x140001300
mov ebx, 1
mov eax, dword [0x140003640]
cmp eax, ebx
jne 0x140001343
mov ecx, 0x1f
call sub.msvcrt.dll__amsg_exit
jmp 0x1400013a8
mov eax, dword [0x140003640]
test eax, eax
jne 0x1400013a2
mov dword [0x140003640], ebx
lea r15, [0x1400022c0]
lea rdi, [0x1400022a8]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x140001394
test eax, eax
jne 0x140001398
cmp qword [rdi], 0
je 0x140001389
mov rax, qword [rdi]
mov rcx, qword [0x140002288]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x14000136a
test eax, eax
je 0x1400013a8
mov eax, 0xff
jmp 0x140001484
mov dword [0x140003044], ebx
mov eax, dword [0x140003640]
cmp eax, ebx
jne 0x1400013cf
lea rdx, [0x1400022a0]
lea rcx, [0x140002290]
call sub.msvcrt.dll__initterm
mov dword [0x140003640], 2
test esi, esi
jne 0x1400013dc
xor eax, eax
xchg qword [0x140003638], rax
cmp qword [0x140003648], 0
je 0x140001410
lea rcx, [0x140003648]
call fcn.140001650
test eax, eax
je 0x140001410
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140003648]
mov r9, qword [0x140002288]
call r9
mov r8, qword [0x140003058]
mov rdx, qword [0x140003050]
mov ecx, dword [0x140003048]
call fcn.14000119c
mov dword [0x140003040], eax
cmp dword [0x140003060], 0
jne 0x140001440
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140003044], 0
jne 0x140001455
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140003040]
jmp 0x140001484
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
sub rsp, 0x28
call fcn.140154000
add rsp, 0x28
jmp 0x1400012dc

Function at 0x140001550
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000159c
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140001594
cmp dword [rcx + 0x3c], edx
jl 0x140001594
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140001594
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 0x14000159c
mov rax, rdx
add rsp, 0x18
ret
Function at 0x1800042c8
Capabilities:
Enumerate files on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0xb8]
sub rsp, 0x1a0
mov r14, qword [rcx + 0x10]
mov rdi, rcx
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r14
cmp rax, 2
jb 0x180004526
cmp qword [rdi + 0x18], 0xf
jbe 0x180004315
mov rdi, qword [rdi]
lea r15, [r14 + 2]
mov ebx, 0xf
lea rsi, [rsp + 0x20]
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [rsp + 0x20], xmm0
movdqu xmmword [rsp + 0x30], xmm1
cmp r15, rbx
jbe 0x18000438a
mov rbx, r15
or rbx, 0xf
cmp rbx, rcx
jbe 0x180004354
mov rbx, rcx
movabs rcx, 0x8000000000000000
jmp 0x180004376
mov eax, 0x16
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x18000436d
xor esi, esi
jmp 0x180004385
cmp rcx, 0x1000
jb 0x18000437d
call fcn.18001369c
jmp 0x180004382
call fcn.18003a240
mov rsi, rax
mov qword [rsp + 0x20], rsi
mov r8, r14
mov qword [rsp + 0x30], r15
mov rdx, rdi
mov qword [rsp + 0x38], rbx
mov rcx, rsi
call fcn.1800548f0
mov word [rsi + r14], 0x2a5c
lea rcx, [rsp + 0x20]
mov byte [rsi + r15], 0
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x38], 0xf
cmova rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdx, qword [rsp + 0x38]
mov rdi, rax
cmp rdx, 0xf
jbe 0x18000440a
mov rcx, qword [rsp + 0x20]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004405
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000451a
call fcn.18003a154
movdqa xmm0, xmmword [0x180063860]
mov byte [rsp + 0x20], 0
movdqu xmmword [rsp + 0x30], xmm0
cmp rdi, 0xffffffffffffffff
jne 0x18000442a
xor eax, eax
jmp 0x1800044fd
xor ebx, ebx
test byte [rsp + 0x60], 0x10
je 0x1800044dc
and qword [rsp + 0x50], 0
lea rax, [rbp - 0x74]
and qword [rsp + 0x58], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180004453
lea rdx, [rbp - 0x74]
lea rcx, [rsp + 0x40]
call fcn.18000b50c
mov rdx, qword [rsp + 0x58]
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x40]
cmp rdx, 0xf
cmova rax, rcx
cmp qword [rsp + 0x50], 1
jne 0x18000448f
cmp byte [rax], 0x2e
je 0x1800044ad
cmp rdx, 0xf
lea rax, [rsp + 0x40]
cmova rax, rcx
cmp qword [rsp + 0x50], 2
jne 0x1800044ab
cmp word [rax], 0x2e2e
je 0x1800044ad
inc ebx
cmp rdx, 0xf
jbe 0x1800044dc
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800044d7
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004520
call fcn.18003a154
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x18000442c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
lea r11, [rsp + 0x1a0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.18004206c
int3
call fcn.18004206c
int3
call fcn.180001380
int3
Function at 0x180014994
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov r9, qword [rcx]
mov ebx, 0x270
mov ecx, dword [r9]
cmp ecx, ebx
jne 0x1800149ff
lea r8, [r9 + 8]
mov r10d, 0x7fffffff
mov r11d, 0x9908b0df
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
and edx, r10d
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub rbx, 1
jne 0x1800149c2
mov ecx, dword [r9]
jmp 0x180014ad5
cmp ecx, 0x4e0
jb 0x180014ad5
lea rbx, [r9 + 0x9c4]
mov esi, 0xe3
mov edi, dword [rbx]
mov r10d, 0x7fffffff
mov r11d, 0x9908b0df
mov eax, edi
mov r8, rbx
mov edx, eax
add rbx, 4
mov edi, dword [rbx]
xor edx, edi
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rsi, 1
jne 0x180014a25
lea rbx, [r9 + 0xd50]
mov esi, 0x18c
mov edi, dword [rbx]
mov eax, edi
mov r8, rbx
mov edx, eax
add rbx, 4
mov edi, dword [rbx]
xor edx, edi
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rsi, 1
jne 0x180014a6a
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
ret
Function at 0x180043690
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 0x1800436ff
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1800436ff
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1800436ff
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1800436ff
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1800436ff
cmp dword [rcx + 0x84], 0xe
jbe 0x1800436ff
cmp dword [rcx + 0xf8], 0
je 0x1800436ff
mov ecx, ebx
call fcn.1800437b0
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.18004358c
nop
cmp dword [rbp + 0x20], 0
je 0x18004374d
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.180043758
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x180043690

Function at 0x1800452ac
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1800452c2
mov al, 1
jmp 0x180045322
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1800452d3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x180045320
mov ecx, dword [rcx + 0x18]
nop
call fcn.18004f66c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180045320
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180045320
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180045320
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x180045322
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x180049cf4
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.18003ad00
sub rsp, rax
mov rax, qword [0x180075080]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.18004518c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x180049d43
mov rax, rbp
jmp 0x180049e4b
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 + 0xc3120]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.18004b070
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0xc3120]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180049e47
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 0x180049e47
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.18004b070
test rax, rax
js 0x180049e47
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180049e47
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180049e39
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180049e39
cmp byte [rcx], 0xd
jne 0x180049e1f
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x180049e2e
cmp byte [rcx + 1], 0xa
jne 0x180049e2e
inc rcx
jmp 0x180049e2e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x754b0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x180049e01
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180049e4b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.18003aa00
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 0x18004a410
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, [0x1800c3120]
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 0x18004a467
cmp word [rdx], r13w
jne 0x18004a467
or byte [rax + rdi*8 + 0x38], cl
jmp 0x18004a46c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x18004a591
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x18004a5b2
lea r9, [rdx + 2]
cmp cx, r11w
je 0x18004a4a5
mov rdx, r9
mov word [rbx], cx
jmp 0x18004a4cc
cmp r9, r8
jae 0x18004a4dc
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 0x18004a486
jmp 0x18004a591
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 0x18004a586
cmp dword [rsp + 0x80], esi
je 0x18004a586
lea r8, [0x1800c3120]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x18004a55e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x18004a52e
mov word [rbx], r13w
jmp 0x18004a58e
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 0x18004a53b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x18004a58e
cmp word [rsp + 0x70], r13w
jne 0x18004a56b
cmp rbx, r14
je 0x18004a528
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.18004b078
cmp word [rsp + 0x70], r13w
je 0x18004a591
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, [0x1800c3120]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x18004a58b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x18004a591