joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180191250
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x78]
sub rax, 0x10000
mov rcx, rax
call fcn.180191470
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x20], rax
jbe 0x180191357
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x1801912b4
mov rax, qword [0x1802ac008]
cmp qword [rsp + 0x20], rax
ja 0x1801912b4
mov rax, qword [rsp + 0x20]
sub rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x180191276
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.1801999d0
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x1801912e3
jmp 0x180191357
cmp dword [rsp + 0x50], 0x10000
jne 0x18019133a
cmp qword [rsp + 0x48], 0x10000
jb 0x18019133a
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x180191328
mov rax, qword [rsp + 0x28]
jmp 0x180191359
mov rax, qword [rsp + 0x20]
sub rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x180191352
mov rax, qword [rsp + 0x38]
sub rax, 0x10000
mov rcx, rax
call fcn.180191470
mov qword [rsp + 0x20], rax
jmp 0x180191276
xor eax, eax
add rsp, 0x68
ret

Function at 0x180191360
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rcx, qword [rsp + 0x70]
call fcn.1801914b0
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x20], rax
jae 0x180191463
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x1801913bb
mov rax, qword [0x1802ac008]
cmp qword [rsp + 0x20], rax
ja 0x1801913bb
mov rax, qword [rsp + 0x20]
add rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x18019137d
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.1801999d0
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x1801913ea
jmp 0x180191463
cmp dword [rsp + 0x50], 0x10000
jne 0x180191441
cmp qword [rsp + 0x48], 0x10000
jb 0x180191441
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x18019142f
mov rax, qword [rsp + 0x28]
jmp 0x180191465
mov rax, qword [rsp + 0x20]
add rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x18019145e
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.1801914b0
mov qword [rsp + 0x20], rax
jmp 0x18019137d
xor eax, eax
add rsp, 0x68
ret
Function at 0x180191500
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180191a90
mov qword [rsp + 0x28], 0
cmp qword [0x1802dcc08], 0
jne 0x180191548
cmp qword [0x1802dcc00], 0
je 0x180191548
mov rax, qword [0x1802dcc00]
mov qword [0x1802dcc08], rax
cmp qword [0x1802dcc08], 0
je 0x1801915ee
mov rax, qword [0x1802dcc08]
cmp qword [rax + 0x10], 0
je 0x1801915ee
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x1801915ee
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x1801915ee
mov rax, qword [0x1802dcc08]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x28], rax
jb 0x1801915b4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jbe 0x1801915bb
xor eax, eax
jmp 0x180191769
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rcx
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x28]
call fcn.1801999d0
mov rax, qword [rsp + 0x28]
jmp 0x180191769
mov rax, qword [0x1802dcc00]
mov qword [0x1802dcc08], rax
jmp 0x180191610
mov rax, qword [0x1802dcc08]
mov rax, qword [rax + 8]
mov qword [0x1802dcc08], rax
cmp qword [0x1802dcc08], 0
je 0x18019165d
cmp qword [0x1802dcc08], 0
je 0x18019165b
mov rax, qword [0x1802dcc08]
cmp qword [rax + 0x10], 0
je 0x18019165b
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x18019165b
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x18019165b
jmp 0x18019158c
jmp 0x1801915fe
mov rcx, qword [rsp + 0x60]
call fcn.180193910
and eax, 0xffff
mov eax, eax
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180191770
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x180191767
mov rax, qword [rsp + 0x48]
mov qword [0x1802dcc08], rax
mov rax, qword [0x1802dcc08]
mov dword [rax], 0x52727464
mov rax, qword [0x1802dcc08]
mov qword [rax + 0x10], 0
mov rax, qword [0x1802dcc08]
mov rcx, qword [0x1802dcc00]
mov qword [rax + 8], rcx
mov rax, qword [0x1802dcc08]
mov qword [0x1802dcc00], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x1802dcc08]
add rax, 0x60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2a8
jmp 0x180191718
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 1
jle 0x180191752
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
mov qword [rcx + rax + 0x48], rdx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x18019170e
mov rax, qword [0x1802dcc08]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x10], rcx
jmp 0x18019158c
xor eax, eax
add rsp, 0x58
ret
Function at 0x1801b3628
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1801b3648
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1801a1d00
or eax, 0xffffffff
jmp 0x1801b364a
xor eax, eax
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400bf550]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400bf560]
mov dword [rax], 1
mov rax, qword [0x1400bf570]
mov dword [rax], 1
mov rax, qword [0x1400bf500]
cmp word [rax], 0x5a4d
jne 0x14000105e
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c8
mov rax, qword [0x1400bf540]
mov dword [0x1400e500c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b8
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400bf630]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400bf610]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400be920]
cmp dword [rax], 1
je 0x140001100
xor eax, eax
add rsp, 0x20
pop rbp
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x14000107b
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001118
cmp dx, 0x20b
jne 0x14000105e
cmp dword [rax + 0x84], 0xe
jbe 0x14000105e
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105e
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x20
pop rbp
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105e
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105e
Function at 0x14000b700
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x30
lea rbp, [rsp + 0x30]
mov rbx, rcx
lea rax, [rbp + 0x28]
mov ecx, 2
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
mov qword [rbp - 8], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rbp - 8]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x14000b770
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
movsxd rsi, dword [0x1400e50a4]
mov rbx, rcx
test esi, esi
jle 0x14000b8a0
mov rax, qword [0x1400e50a8]
xor r9d, r9d
add rax, 0x18
nop dword [rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000b7bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000b843
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000b7a0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x14000b8c2
mov rax, qword [0x1400e50a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400e50a8]
lea rdx, [rbp - 0x30]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000b8a7
mov eax, dword [rbp - 0xc]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14000b83c
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x14000b850
add dword [0x1400e50a4], 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 2
mov rcx, qword [rbp - 0x30]
mov rdx, qword [rbp - 0x18]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400e50a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000b83c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop word [rax + rax]
xor esi, esi
jmp 0x14000b7c8
mov rax, qword [0x1400e50a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x14000be50
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
lea r13, [0x1400e5100]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e50e0]
test rbx, rbx
je 0x14000beb5
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, dword [rbx]
call r12
mov rsi, rax
call rdi
test rsi, rsi
je 0x14000beac
test eax, eax
jne 0x14000beac
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000be90
mov rcx, r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14000c0f0
Capabilities:
Parse pe header

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

Function at 0x14000c120
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000c16d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x14000c164
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000c16f
add rax, 0x28
cmp rax, r9
jne 0x14000c150
xor eax, eax
ret

Function at 0x14000c170
Capabilities:
Parse pe header

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x14000c208
mov rdx, qword [0x1400bf500]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000c1f6
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000c1f6
cmp word [rax + 0x18], 0x20b
jne 0x14000c1f6
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x14000c208
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x14000c1e1
add rbx, 0x28
cmp rbx, rdi
je 0x14000c208
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x14000c1d8
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret

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

Disassembly:
mov rdx, qword [0x1400bf500]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000c240
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000c248
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000c240
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000c29d
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 0x14000c294
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000c240
add rax, 0x28
cmp rax, r9
jne 0x14000c280
xor eax, eax
ret
Function at 0x14000c2a0
Capabilities:
Parse pe header

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

Function at 0x14000c2e0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400bf500]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x14000c300
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x14000c308
ret
cmp word [rdx + 0x18], 0x20b
jne 0x14000c300
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x14000c350
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x14000c347
test rcx, rcx
je 0x14000c300
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x14000c338
xor eax, eax
ret

Function at 0x14000c360
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400bf500]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000c37f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14000c388
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x1400bf500]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000c3c0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000c3c8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000c3c0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x14000c3c0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x14000c414
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000c420
add rdx, 0x28
cmp rdx, r9
jne 0x14000c400
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x1400bf500]
xor r8d, r8d
cmp word [r11], 0x5a4d
mov r10d, ecx
jne 0x14000c454
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
cmp dword [rcx], 0x4550
je 0x14000c460
mov rax, r8
ret
cmp word [rcx + 0x18], 0x20b
jne 0x14000c454
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x14000c454
movzx edx, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rdx, [rcx + rdx + 0x18]
test r9w, r9w
je 0x14000c454
lea ecx, [r9 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rdx + 0xc]
mov rcx, r8
cmp rax, r8
jb 0x14000c4ac
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x14000c4c0
add rdx, 0x28
cmp r9, rdx
jne 0x14000c498
xor r8d, r8d
mov rax, r8
ret
add rax, r11
jmp 0x14000c4d0
sub r10d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x14000c4de
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000c4b5
test r10d, r10d
jg 0x14000c4c8
mov r8d, dword [rax + 0xc]
add r8, r11
mov rax, r8
ret
Function at 0x14000c7a0
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14000c7d0
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp dbg.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x14000c810
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x14000c840
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000c858
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x14000d070
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [str._P_v_]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x14000d0a8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14000d110
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x14000d120
mov esi, dword [0x1400e5188]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14000d178
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x14000d1c0
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x14000d097
mov rcx, rbx
call fcn.14000cfd0
mov qword [rsi + r12*8 + 8], rax
jmp 0x14000d097
call fcn.14000cfd0
mov qword [rbx + 0x10], rax
jmp 0x14000d097
mov r10d, dword [rsi]
test r10d, r10d
je 0x14000d251
mov r9d, dword [0x1400b5030]
test r9d, r9d
je 0x14000d279
lea rcx, [0x1400e51a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x14000d25e
mov eax, dword [rsi]
test eax, eax
je 0x14000d0b1
lea rcx, [0x1400e51a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14000d0b1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sym.calloc
mov rsi, rax
test rax, rax
je 0x14000d2b4
mov qword [rax], rdi
mov ecx, dword [0x1400e5188]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14000d0eb
call r13
jmp 0x14000d0eb
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sym.realloc
mov rsi, rax
test rax, rax
je 0x14000d2b4
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sym.memset
jmp 0x14000d19b
lea rcx, [0x1400e51a0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14000d2ac
lea rdx, [0x14000cf80]
mov ecx, eax
mov dword [0x1400e5188], eax
call dbg.__mingwthr_key_dtor
test eax, eax
jne 0x14000d2b4
mov dword [0x1400b5030], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14000d13c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x14000d0b1
mov rax, qword [0x1400e5180]
lea r12, [rax + 1]
mov qword [0x1400e5180], r12
mov qword [rbx + 0x10], r12
jmp 0x14000d156
lock add dword [0x1400b5034], 1
je 0x14000d209
mov r8d, dword [0x1400b5030]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x1400b5030]
test r8d, r8d
jne 0x14000d247
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x14000d2a0
jmp 0x14000d247
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14000d239
call sym.abort
nop
nop word [rax + rax]
Function at 0x140015710
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x20
lea rbp, [rsp + 0x20]
mov rbx, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rsi
test rax, rax
je 0x140015760
mov rcx, rbx
mov qword [dbg.init_rand_s], rax
add rsp, 0x20
pop rbx
pop rsi
pop rbp
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x1400e5cc0], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x140015744

Function at 0x140017d80
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x140017dac
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x140018a20
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x1400b8020], 0
jne 0x140018b26
mov byte [0x1400b8020], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x140018afc
mov rbx, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [rbx], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add rbx, rax
mov rcx, rbx
call sym.__cxa_demangle
mov ecx, 2
mov rsi, qword [dbg.__acrt_iob_func]
mov rdi, rax
call rsi
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x140018aed
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x1400baf31]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x140018ae8
mov rcx, rdi
call sym.free
call sym.__cxa_rethrow
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x140018ab7
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x140018bbb
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sym.fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x140018b21
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x140018b21