joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140014410
Capabilities:
Enumerate pe sections

Disassembly:
push r15
push r14
push r13
push r12
mov r12, rcx
push rbp
mov rdx, r12
push rdi
push rsi
xor esi, esi
push rbx
sub rsp, 0x28
movsxd rax, dword [rcx + 0x3c]
mov ecx, dword [rcx + rax + 0x88]
call 0x140014410
mov rdx, r12
mov ebx, eax
add rbx, r12
mov ecx, dword [rbx + 0x20]
call 0x140014410
mov ecx, dword [rbx + 0x24]
mov rdx, r12
mov ebp, eax
call 0x140014410
mov r15d, dword [rbx + 0x18]
add rbp, r12
mov edi, eax
add rdi, r12
lea r14, [rsi + rsi]
add r14, rdi
cmp r15, rsi
je 0x14000d601
mov ecx, dword [rbp + rsi*4]
mov rdx, r12
call 0x140014410
mov r13d, eax
add r13, r12
mov rcx, r13
call fcn.14000daf0
cmp eax, 0xa6caa1c5
jne 0x14000d5ed
mov ecx, dword [rbx + 0x1c]
mov rdx, r12
call 0x140014410
movzx edx, word [r14]
mov eax, eax
add rax, r12
mov ecx, dword [rax + rdx*4]
add rsp, 0x28
mov rdx, r12
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp 0x140014410
mov rcx, r13
inc rsi
call fcn.14000daf0
cmp eax, 0xffe885ef
jne 0x14000d591
jmp 0x14000d5be
add rsp, 0x28
xor eax, eax
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, ecx
movsxd rcx, dword [rdx + 0x3c]
add rcx, rdx
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
cmp dword [rdx + 0x14], eax
ja 0x14001445a
mov r9w, word [rcx + 6]
xor ecx, ecx
cmp r9w, cx
je 0x140014458
mov r8d, dword [rdx + 0xc]
cmp eax, r8d
jb 0x140014450
mov r10d, dword [rdx + 0x10]
add r10d, r8d
cmp r10d, eax
jbe 0x140014450
add eax, dword [rdx + 0x14]
sub eax, r8d
ret
inc ecx
add rdx, 0x28
jmp 0x14001442e
xor eax, eax
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00415520]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00415530]
mov dword [rax], 1
mov rax, qword [0x00415540]
mov dword [rax], 1
mov rax, qword [0x00415510]
mov dword [rax], 1
mov rax, qword [0x00415400]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00415500]
mov dword [0x0041800c], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004154c0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004153b0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x4015c0
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
lea rdx, section..rdata
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401602
lea rcx, str.Failed_to_open_file_for_writing
call sym.perror
mov eax, 0
jmp 0x401632
mov rcx, qword [rbp - 8]
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov eax, 1
add rsp, 0x30
pop rbp
ret
Function at 0x401638
Capabilities:
Create process on windows
Get common file path

Disassembly:
push rbp
sub rsp, 0x310
lea rbp, [rsp + 0x80]
lea rax, str.64093180399
mov qword [rbp + 0x288], rax
mov rax, qword [0x00414420]
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x280], rax
cmp qword [rbp + 0x280], 0
jne 0x40168c
lea rcx, str.Failed_to_allocate_memory
call sym.perror
mov eax, 0
jmp 0x40184f
mov rdx, qword [0x00414420]
mov rax, qword [rbp + 0x280]
mov r8, rdx
lea rdx, [0x00404020]
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x288]
mov rcx, rax
call sym.strlen
mov r8, rax
mov rdx, qword [0x00414420]
mov rcx, qword [rbp + 0x288]
mov rax, qword [rbp + 0x280]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.xor_encrypt_decrypt
lea rax, [rbp + 0x170]
mov rdx, rax
mov ecx, 0x104
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
lea rdx, [rbp + 0x60]
lea rax, [rbp + 0x170]
mov r9, rdx
mov r8d, 0
lea rdx, [0x0041504e]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
call rax
mov rcx, qword [0x00414420]
mov rdx, qword [rbp + 0x280]
lea rax, [rbp + 0x60]
mov r8, rcx
mov rcx, rax
call sym.save_file
test eax, eax
jne 0x40175a
mov rax, qword [rbp + 0x280]
mov rcx, rax
call sym.free
mov eax, 0
jmp 0x40184f
mov rax, qword [rbp + 0x280]
mov rcx, rax
call sym.free
lea rax, [rbp - 0x10]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x10], 0x68
lea rax, [rbp - 0x30]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x60]
lea rdx, [rbp - 0x30]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp - 0x10]
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
jne 0x401815
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_launching_process:__d_n
call sym.printf
mov eax, 0
jmp 0x40184f
mov rax, qword [rbp - 0x30]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
add rsp, 0x310
pop rbp
ret
Function at 0x401dc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00418624]
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
test esi, esi
jle 0x401f74
mov rax, qword [0x00418628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x401e0c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x401e99
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x401df0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x401fa9
mov rax, qword [0x00418628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00418628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401f8c
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401e92
sub eax, 0x40
and eax, 0xffffffbf
jne 0x401f14
add dword [0x00418624], 1
cmp edi, 8
jae 0x401ed0
test dil, 4
jne 0x401f60
test edi, edi
je 0x401ebc
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x401f7b
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rbp]
mov qword [rbx], rax
mov eax, edi
mov rdx, qword [rbp + rax - 8]
mov qword [rbx + rax - 8], rdx
lea rax, [rbx + 8]
and rax, 0xfffffffffffffff8
sub rbx, rax
sub rbp, rbx
add ebx, edi
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x401ebc
and ebx, 0xfffffff8
xor edx, edx
mov ecx, edx
add edx, 8
mov r8, qword [rbp + rcx]
cmp edx, ebx
mov qword [rax + rcx], r8
jb 0x401f00
jmp 0x401ebc
add rsi, qword [0x00418628]
mov rcx, qword [rsp + 0x20]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401e92
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 + rax]
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x401ebc
xor esi, esi
jmp 0x401e17
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x401ebc
mov rax, qword [0x00418628]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rsi + 0x18]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call dbg.__report_error
nop
nop dword [rax]
Function at 0x402700
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00418900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004188e0]
test rbx, rbx
je 0x402754
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40274b
test rsi, rsi
je 0x40274b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402730
lea rcx, [0x00418900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402990
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x4029a0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x4029b0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4029f1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x4029e8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4029f3
add rax, 0x28
cmp rax, r9
jne 0x4029d4
xor eax, eax
ret

Function at 0x402a90
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00415400]
mov rdx, rcx
cmp word [r8], 0x5a4d
jne 0x402afd
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402afd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x402afd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402af4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402aff
add rax, 0x28
cmp rax, r9
jne 0x402ae0
xor eax, eax
add rsp, 0x28
ret

Function at 0x402c00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00415400]
xor eax, eax
mov rdx, rcx
cmp word [r8], 0x5a4d
je 0x402c20
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402c18
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x402c7d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402c74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402c84
add rax, 0x28
cmp rax, r9
jne 0x402c60
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402ca0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00415400]
mov r9d, ecx
cmp word [r11], 0x5a4d
jne 0x402d0e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402d0e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x402d0e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x402d0e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x402d05
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x402d15
add rcx, 0x28
cmp rcx, rax
jne 0x402cf0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x402d28
jmp 0x402d0e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x402d36
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x402d0e
test r9d, r9d
jg 0x402d20
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret

Function at 0x402fc0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
mov r8d, 0x1b
mov edx, 1
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
nop
nop
nop
nop
nop
nop
Function at 0x680cbe70
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.680dde30
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.680dde30
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 0x680cbee0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x683ad5e4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x680cc088
mov rax, qword [0x683ad5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x680cbf2c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x680cbfb7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x680cbf10
mov rcx, r12
call fcn.680ccbe0
mov rbp, rax
test rax, rax
je 0x680cc0c2
mov rax, qword [0x683ad5e8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.680ccd10
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x683ad5e8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x680cc0d1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x680cbfb0
sub eax, 4
and eax, 0xfffffffb
jne 0x680cc040
add dword [0x683ad5e4], 1
cmp ebx, 8
jae 0x680cbfe8
test bl, 4
jne 0x680cc090
test ebx, ebx
je 0x680cbfd9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x680cc0b0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x680cbfd9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x680cc01a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x683ad5e8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x680cbfb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.680cbe70
nop dword [rax]
xor edi, edi
jmp 0x680cbf37
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x680cbfd9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x680cbfd9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.680cbe70
mov rax, qword [0x683ad5e8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.680cbe70
nop
nop dword [rax]
Function at 0x680cc850
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x683ad8c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x683ad8a0]
test rbx, rbx
je 0x680cc8a4
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 0x680cc89b
test r12, r12
je 0x680cc89b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x680cc880
lea rcx, [0x683ad8c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x680ccbe0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x68332220]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x680ccc59
mov rcx, r10
call fcn.680ccab0
test eax, eax
je 0x680ccc59
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x680ccc56
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x680ccc4d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x680ccc59
add r8, 0x28
cmp r8, r9
jne 0x680ccc38
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x680cd1e0
Capabilities:
Allocate thread local storage

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x680cd210
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp fcn.680e3590
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x680cd250
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x680cd290
Capabilities:
Set thread local storage value

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

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, qword [rcx + 8]
mov rdi, qword [rcx]
mov rbx, rcx
cmp rsi, 8
ja 0x680cdc90
lea rcx, [rdi + 8]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x680cdcd2
mov rdx, qword [rbx + 0x18]
mov qword [rax], rax
lea r9, [rax + 8]
mov r8, rdi
test rdx, rdx
je 0x680cdcba
mov rcx, r9
call sub.msvcrt.dll_memcpy
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rsi + rdi + 7]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x680cdcd2
lea r9, [rax + rsi + 7]
neg rsi
mov r8, rdi
and r9, rsi
mov qword [r9 - 8], rax
mov rdx, qword [rbx + 0x18]
test rdx, rdx
jne 0x680cdc78
mov rcx, r9
xor edx, edx
call sub.msvcrt.dll_memset
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
sub rsp, 0x28
xor ecx, ecx
xor r9d, r9d
mov r8d, 0xffff
mov dword [0x683ad910], 0xffffffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x683ad918], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x680cdd30
lea rdx, [0x680cdbf0]
mov dword [0x683ad908], eax
call fcn.680e3590
test eax, eax
jne 0x680cdd38
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x680cdd27
call sub.msvcrt.dll_abort
nop
nop
Function at 0x680cdd40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [0x68331740]
mov r11d, dword [r13]
mov r12, rcx
test r11d, r11d
jne 0x680cdd80
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x680cdde8
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rbx, qword [rcx + 0x10]
test rbx, rbx
je 0x680cde00
mov r13d, dword [0x683ad908]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov r14d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r14d
mov r13, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r13, r13
je 0x680cde78
mov r14, qword [r13]
cmp r14, rbx
jb 0x680cdec0
lea r13, [r13 + rbx*8]
mov rax, qword [r13]
test rax, rax
jne 0x680cdd69
mov rcx, r12
call fcn.680cdc40
mov qword [r13], rax
jmp 0x680cdd69
call fcn.680cdc40
mov qword [r12 + 0x10], rax
jmp 0x680cdd69
mov r10d, dword [r13]
test r10d, r10d
je 0x680cdf22
mov r9d, dword [0x68310170]
test r9d, r9d
je 0x680cdf50
lock add dword [0x683ad910], 1
jne 0x680cdf84
mov rbx, qword [r12 + 0x10]
test rbx, rbx
je 0x680cdf30
mov eax, dword [r13]
test eax, eax
je 0x680cdd89
mov eax, 0xffffffff
lock xadd dword [0x683ad910], eax
sub eax, 1
js 0x680cdd89
mov rcx, qword [0x683ad918]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x680cdd89
lea rcx, [rbx + 0x21]
mov edx, 8
lea rdi, [rbx + 0x20]
call sub.msvcrt.dll_calloc
mov r13, rax
test rax, rax
je 0x680cdfab
mov qword [rax], rdi
mov ecx, dword [0x683ad908]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x680cddc7
call rsi
jmp 0x680cddc7
lea rdi, [r14 + r14]
lea rax, [rbx + 0x20]
mov rcx, r13
cmp rbx, rdi
cmova rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov r13, rax
test rax, rax
je 0x680cdfab
mov qword [rax], rdi
sub rdi, r14
lea rcx, [rax + r14*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x680cde99
call 0x680cdce0
mov dword [0x68310170], 1
mov edx, dword [r13]
test edx, edx
jne 0x680cde1d
mov rbx, qword [r12 + 0x10]
test rbx, rbx
jne 0x680cdd89
mov rax, qword [0x683ad900]
lea rbx, [rax + 1]
mov qword [0x683ad900], rbx
mov qword [r12 + 0x10], rbx
jmp 0x680cde39
lock add dword [0x68310174], 1
je 0x680cdf07
mov r8d, dword [0x68310170]
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [0x68310170]
test r8d, r8d
jne 0x680cdf16
nop dword [rax]
xor ecx, ecx
call rsi
mov ecx, dword [rbx]
test ecx, ecx
je 0x680cdf78
jmp 0x680cdf16
mov rcx, qword [0x683ad918]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x680cde2b
lock sub dword [0x683ad910], 1
jmp 0x680cde2b
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
nop dword [rax]
cmp qword [rcx], rdx
jae 0x680cdfd0
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x680cdfda
mov qword [rcx + 8], r8
test r9, r9
je 0x680cdfe4
cmp qword [rcx], rdx
je 0x680cdfe8
ret
mov qword [rcx + 0x18], r9
ret