joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400434b0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x30
xorps xmm0, xmm0
movaps xmmword [rsp + 0x10], xmm0
mov dword [rsp + 0x20], 0
cmp dword [0x1400c9274], 0xa
mov eax, dword [0x1400c9270]
setl bl
lea ebp, [rax + 1]
imul ebp, eax
test bpl, 1
sete al
or al, bl
mov byte [rsp + 0xd], al
mov byte [rsp + 0xe], 0
mov byte [rsp + 0xf], al
xor eax, eax
lea rbp, [0x1400585b4]
movsxd rbx, dword [rax + rbp]
xor dword [rsp + rbx*4 + 0x10], 0x1e27
add rax, 4
cmp rax, 0x10
jne 0x140043503
mov ebx, 0x2e15
mov r15b, 1
xor r14d, r14d
mov r8d, 0x601c
lea rax, [0x1400585a8]
mov r9d, 0x603a
movabs r10, 0x20000000c
mov r11d, 0x36d3
mov ebp, dword [rsp + 0x20]
xor ebp, r8d
mov r12d, dword [rsp + 0x18]
mov esi, dword [rsp + 0x1c]
cmp ebx, 0x7793
jg 0x140043575
cmp ebx, 0x28d2
je 0x140043621
cmp ebx, 0x2e15
jne 0x140043557
jmp 0x1400435e0
cmp ebx, 0x7794
je 0x1400435cc
cmp ebx, 0x7e1d
jne 0x140043557
mov qword [rdx], r10
mov word [rdx + 8], 0x101
mov qword [rcx + 0x28], rdx
mov ebx, dword [0x1400c7574]
lea edi, [rbx + 1]
imul edi, ebx
mov ebx, esi
xor ebx, 0x52f6
test r14b, r14b
cmove esi, ebx
test dil, 1
mov ebx, 0x6995
cmove ebx, r11d
cmp dword [0x1400c7570], 0xa
cmovl ebx, r11d
xor ebx, r12d
mov r14b, 1
jmp 0x140043557
mov qword [rdx], r10
mov word [rdx + 8], 0x101
mov qword [rcx + 0x28], rdx
mov ebx, ebp
jmp 0x140043557
mov dword [rsp + 0x1c], esi
mov bl, byte [rsp + 0xe]
mov bl, byte [rsp + 0xf]
test r15b, 1
je 0x140043607
xor esi, esi
movsxd rdi, dword [rsi + rax]
xor byte [rsp + rdi*4 + 0x10], 0x26
add rsi, 4
cmp rsi, 0xc
jne 0x1400435f4
cmp byte [rsp + 0xd], 0
mov ebx, 0x69b3
cmovne ebx, r9d
xor ebx, dword [rsp + 0x10]
xor r15d, r15d
jmp 0x140043547
mov dword [rsp + 0x1c], esi
add rsp, 0x30
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x140001768
Capabilities:
Read file via mapping
Terminate process

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push r14
push r15
sub rsp, 0x50
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [0x14000300c]
mov ebx, dword [0x140003008]
mov r8d, dword [0x140003004]
mov r14d, dword [section..data]
xor r15d, r15d
mov qword [0x140003010], rax
mov dword [rsp + 0x30], 0x4d0046
mov word [rsp + 0x44], r15w
lea r9, [rsp + 0x34]
lea r10d, [r15 + 8]
mov edx, r8d
shr edx, 0x1c
and dl, 0xf
movzx ecx, dl
lea eax, [rcx + 0x30]
add cx, 0x57
cmp dl, 0x39
cmovbe cx, ax
shl r8d, 4
mov word [r9], cx
lea r9, [r9 + 2]
dec r10
jne 0x1400017bc
lea rax, [rsp + 0x30]
lea r8d, [r10 + 2]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rbp, rax
test rax, rax
je 0x1400018b7
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x1400018ae
mov ecx, dword [rax]
lea r9, [rsp + 0x78]
add rcx, rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call fcn.140001264
cmp qword [rsp + 0x78], r15
je 0x1400018a5
cmp dword [rsp + 0x70], r15d
je 0x1400018a5
mov r8d, esi
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x140001891
mov rdx, qword [rsp + 0x78]
mov r9, rbx
mov rcx, rax
mov dword [rsp + 0x20], r14d
call fcn.140001494
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rsp + 0x78]
mov rcx, qword [0x140003010]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea r11, [rsp + 0x50]
xor eax, eax
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rsi
ret

Function at 0x1004010e0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea r9, str._______________Q_msgkey____M_shmkey____S_semkey__...
lea r8, str.usage:_ipcrm___q_msqid____m_shmid____s_semid_
lea rdx, str._s_n_s_n
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop word cs:[rax + rax]
Function at 0x24cf713e4
Capabilities:
Create process on windows
Run powershell expression

Disassembly:
push rbp
push rdi
sub rsp, 0x518
lea rbp, [rsp + 0x80]
lea rax, str.C:HelperHelper.exe
mov qword [rbp + 0x488], rax
lea rax, str._NoExit__Command__Get_Content_C:Helperps2.txt__Invoke_Expression_
mov qword [rbp + 0x480], rax
mov rcx, qword [rbp + 0x488]
lea rax, [rbp + 0x70]
mov rdx, qword [rbp + 0x480]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str._s__s
mov edx, 0x400
mov rcx, rax
call sym.snprintf_char__unsigned_long_long__char_const__::_
mov rdx, rbp
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp], 0x68
pxor xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
movq qword [rbp - 0x10], xmm0
mov dword [rbp + 0x3c], 1
mov word [rbp + 0x40], 0
lea rax, [rbp + 0x70]
lea rdx, [rbp - 0x20]
mov qword [rsp + 0x48], rdx
mov rdx, rbp
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
sete al
test al, al
je 0x24cf715a3
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x47c], eax
mov qword [rbp - 0x28], 0
mov edx, dword [rbp + 0x47c]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 0x400
mov r8d, edx
mov edx, 0
mov ecx, 0x1300
mov rax, qword [sym.imp.KERNEL32.dll_FormatMessageA]
call rax
mov eax, eax
mov qword [rbp + 0x470], rax
lea rax, str.Failed_to_create_process:
mov rdx, rax
mov rax, qword [0x24d02eb00]
mov rcx, rax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov eax, dword [rbp + 0x47c]
mov edx, eax
call method.std::ostream.operator___unsigned_long_
mov rcx, rax
lea rax, [0x24d029080]
mov rdx, rax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [rbp - 0x28]
mov rdx, rax
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov eax, 1
jmp 0x24cf715c8
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x518
pop rdi
pop rbp
ret
Function at 0x24cf7b340
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 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 [rsp + 0x28]
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 0x24cf7b3b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x24d055064]
mov rbx, rcx
test esi, esi
jle 0x24cf7b4e0
mov rax, qword [0x24d055068]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x24cf7b3fb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x24cf7b485
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x24cf7b3e0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x24cf7b502
mov rax, qword [0x24d055068]
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 [0x24d055068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x24cf7b4e7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x24cf7b47e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x24cf7b490
add dword [0x24d055064], 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 [0x24d055068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x24cf7b47e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x24cf7b408
mov rax, qword [0x24d055068]
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 0x24cf7b880
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x24d0550a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x24d055080]
test rbx, rbx
je 0x24cf7b8dc
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 rsi, rsi
je 0x24cf7b8d3
test eax, eax
jne 0x24cf7b8d3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x24cf7b8b8
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 0x24cf7baf0
Capabilities:
Parse pe header

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

Function at 0x24cf7bb20
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 0x24cf7bb6d
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 0x24cf7bb64
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x24cf7bb6f
add rax, 0x28
cmp rax, r9
jne 0x24cf7bb50
xor eax, eax
ret

Function at 0x24cf7bb70
Capabilities:
Parse pe header

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

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

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

Function at 0x24cf7bc90
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x24d02f120]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x24cf7bcaf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x24cf7bcb8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x24cf7bcaf
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x24cf7bcd0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x24d02f120]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x24cf7bcf0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x24cf7bcf8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x24cf7bcf0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x24cf7bd40
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x24cf7bd37
test rcx, rcx
je 0x24cf7bcf0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x24cf7bd28
xor eax, eax
ret

Function at 0x24cf7bd50
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x24d02f120]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x24cf7bdb0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x24cf7bdb8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x24cf7bdb0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x24cf7bdb0
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 0x24cf7be04
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x24cf7be10
add rdx, 0x28
cmp rdx, r9
jne 0x24cf7bdf0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x24d02f120]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x24cf7be42
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x24cf7be50
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x24cf7be42
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x24cf7be42
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x24cf7be42
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x24cf7bea5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x24cf7beb8
add rdx, 0x28
cmp r10, rdx
jne 0x24cf7be90
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x24cf7bec7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x24cf7bed7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x24cf7beae
test ecx, ecx
jg 0x24cf7bec0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret

Function at 0x24cf7c1b0
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 0x24cf7c1e0
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 0x24cf7c220
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 0x24cf7c250
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x24cf7c268
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x24cf7ca80
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 [0x24d02e530]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x24cf7cab8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x24cf7cb20
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 0x24cf7cb30
mov esi, dword [0x24d055128]
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 0x24cf7cb88
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x24cf7cbd0
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x24cf7caa7
mov rcx, rbx
call fcn.24cf7c9e0
mov qword [rsi + r12*8 + 8], rax
jmp 0x24cf7caa7
call fcn.24cf7c9e0
mov qword [rbx + 0x10], rax
jmp 0x24cf7caa7
mov r10d, dword [rsi]
test r10d, r10d
je 0x24cf7cc61
mov r9d, dword [0x24d025040]
test r9d, r9d
je 0x24cf7cc89
lea rcx, [0x24d055140]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x24cf7cc6e
mov eax, dword [rsi]
test eax, eax
je 0x24cf7cac1
lea rcx, [0x24d055140]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x24cf7cac1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sym.calloc
mov rsi, rax
test rax, rax
je 0x24cf7ccc4
mov qword [rax], rdi
mov ecx, dword [0x24d055128]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x24cf7cafb
call r13
jmp 0x24cf7cafb
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 0x24cf7ccc4
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sym.memset
jmp 0x24cf7cbab
lea rcx, [0x24d055140]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x24cf7ccbc
lea rdx, [0x24cf7c990]
mov ecx, eax
mov dword [0x24d055128], eax
call dbg.__mingwthr_key_dtor
test eax, eax
jne 0x24cf7ccc4
mov dword [0x24d025040], 1
mov edx, dword [rsi]
test edx, edx
jne 0x24cf7cb4c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x24cf7cac1
mov rax, qword [0x24d055120]
lea r12, [rax + 1]
mov qword [0x24d055120], r12
mov qword [rbx + 0x10], r12
jmp 0x24cf7cb66
lock add dword [0x24d025044], 1
je 0x24cf7cc19
mov r8d, dword [0x24d025040]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x24d025040]
test r8d, r8d
jne 0x24cf7cc57
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x24cf7ccb0
jmp 0x24cf7cc57
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x24cf7cc49
call sym.abort
nop
nop word [rax + rax]
Function at 0x24cf85510
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
push rbx
sub rsp, 0x28
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 0x24cf85558
mov rcx, rbx
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
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 [0x24d055c60], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x24cf8553e

Function at 0x24cf87c20
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 0x24cf87c4c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x24cf888c0
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x24d028000], 0
jne 0x24cf889c6
mov byte [0x24d028000], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x24cf8899c
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 0x24cf8898d
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x24d02ace1]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x24cf88988
mov rcx, rdi
call sym.free
call sym.__cxa_rethrow
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x24cf88957
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 0x24cf88a5b
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 0x24cf889c1
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x24cf889c1