joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402d00
Capabilities:
Parse pe header

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

Function at 0x402d20
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 0x402d61
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 0x402d58
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402d63
add rax, 0x28
cmp rax, r9
jne 0x402d44
xor eax, eax
ret

Function at 0x402e00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00405420]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x402e6d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402e6d
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 0x402e6d
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 0x402e64
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402e6f
add rax, 0x28
cmp rax, r9
jne 0x402e50
xor eax, eax
add rsp, 0x28
ret

Function at 0x402f70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00405420]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x402f90
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402f88
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 0x402fed
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 0x402fe4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402ff4
add rax, 0x28
cmp rax, r9
jne 0x402fd0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x403010
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00405420]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40307e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40307e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40307e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40307e
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 0x403075
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x403085
add rcx, 0x28
cmp rcx, rax
jne 0x403060
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x403098
jmp 0x40307e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x4030a6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40307e
test r9d, r9d
jg 0x403090
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x4033d0
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 sym.__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 sym.__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 0x6d869290
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d88a5e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d869418
mov rax, qword [0x6d88a5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d8692dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d869365
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d8692c0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d86944d
mov rax, qword [0x6d88a5e8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x6d88a5e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d869430
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d86935e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d8693c0
add dword [0x6d88a5e4], 1
cmp edi, 8
jae 0x6d869393
test dil, 4
jne 0x6d869404
test edi, edi
je 0x6d869388
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d86941f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x6d869388
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x6d8693ac
jmp 0x6d869388
add rsi, qword [0x6d88a5e8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
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 0x6d86935e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x6d869388
xor esi, esi
jmp 0x6d8692e7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d869388
mov rax, qword [0x6d88a5e8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x6d869ba0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d88a8c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d88a8a0]
test rbx, rbx
je 0x6d869bf4
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 0x6d869beb
test rsi, rsi
je 0x6d869beb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d869bd0
lea rcx, [0x6d88a8c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d869e30
Capabilities:
Parse pe header

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

Function at 0x6d869e50
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 0x6d869e91
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 0x6d869e88
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d869e93
add rax, 0x28
cmp rax, r9
jne 0x6d869e74
xor eax, eax
ret

Function at 0x6d869f30
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8871f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6d869f9d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d869f9d
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 0x6d869f9d
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 0x6d869f94
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d869f9f
add rax, 0x28
cmp rax, r9
jne 0x6d869f80
xor eax, eax
add rsp, 0x28
ret

Function at 0x6d86a0a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8871f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d86a0c0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d86a0b8
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 0x6d86a11d
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 0x6d86a114
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d86a124
add rax, 0x28
cmp rax, r9
jne 0x6d86a100
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d86a140
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d8871f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d86a1ae
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d86a1ae
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d86a1ae
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d86a1ae
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 0x6d86a1a5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d86a1b5
add rcx, 0x28
cmp rcx, rax
jne 0x6d86a190
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d86a1c8
jmp 0x6d86a1ae
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d86a1d6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d86a1ae
test r9d, r9d
jg 0x6d86a1c0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d86a540
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 sym.__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 sym.__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 0x140068370
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14006837d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14006838d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140068375
lea eax, [rcx + 1]
jmp 0x14006839b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1400683ae
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x140068394
sub eax, 3
jb 0x1400683ce
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14006841d
sar eax, 1
movsxd rbp, eax
jb 0x140068404
jmp 0x1400683dc
add ebx, ebx
jne 0x1400683da
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140068404
inc ecx
add ebx, ebx
jne 0x1400683ea
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140068404
call r11
adc ecx, ecx
add ebx, ebx
jne 0x1400683fd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x1400683ec
add ecx, 2
jmp 0x140068409
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.140068332
jmp 0x14006837d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x28800
mov dl, 0x11
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x140068469
cmp rsi, rcx
jae 0x140068471
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x140068450
cmp al, 0x8f
ja 0x140068450
cmp byte [rsi - 2], 0xf
je 0x140068456
sub al, 0xe8
cmp al, 1
ja 0x14006843a
cmp rsi, rcx
jae 0x140068471
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x140068440
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x140068471
lodsb al, byte [rsi]
jmp 0x140068450
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x66000]
mov eax, dword [rdi]
or eax, eax
je 0x1400684da
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x75574]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14006847e
jns 0x1400684b3
movzx rdx, word [rdi]
add rdi, 2
jmp 0x1400684bd
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1400684d4
mov qword [rbx], rax
add rbx, 8
jmp 0x14006849e
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x140068514
cmp al, 0xef
ja 0x140068506
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x1400684e6
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x1400684f5
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x22f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140068568
sub rsp, 0xffffffffffffff80
jmp 0x14000b310
Function at 0x140001f32
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rsi, rcx
mov rbx, rdx
test rdx, rdx
je 0x140001f51
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov r8, rax
mov rcx, rbx
mov r9, rsi
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp 0x14000bed8
jmp qword [sym.imp.msvcrt.dll_fflush]

Function at 0x140004b3e
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov qword [rsp + 0x28], rdx
mov rsi, rcx
mov ecx, 2
call qword [fcn.14000b910]
mov r8, qword [rsp + 0x28]
mov rcx, rsi
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
jmp 0x14000bed8

Function at 0x140004b7d
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
cmp qword [0x1400440f0], 0
jne 0x140004b95
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.140004b3e
lea rsi, [rsp + 0x20]
mov rdx, rcx
mov rcx, rsi
call fcn.140004ab7
mov rbx, qword [rsp + 0x28]
mov rcx, rsi
call qword [0x1400440f0]
test rbx, rbx
je 0x140004bc6
test byte [rbx + 7], 0x40
jne 0x140004bc6
mov rcx, rbx
call fcn.140002f93
lea rcx, [0x14000d220]
call fcn.1400066f0
cmp byte [rax], 0
je 0x140004bfe
mov byte [rax], 0
lea rcx, [0x14000d120]
call fcn.1400066f0
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.1400034f8
add rsp, 0x38
pop rbx
pop rsi
ret

Function at 0x1400057c0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.14000b910
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.14000b910
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x140005830
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140044204]
mov rbx, rcx
test esi, esi
jle 0x140005960
mov rax, qword [0x140044208]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000587b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140005905
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140005860
mov rcx, rbx
call fcn.140006280
mov rdi, rax
test rax, rax
je 0x140005982
mov rax, qword [0x140044208]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400063c0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140044208]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140005967
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400058fe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140005910
add dword [0x140044204], 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 [0x140044208]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400058fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400057c0
nop dword [rax]
xor esi, esi
jmp 0x140005888
mov rax, qword [0x140044208]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400057c0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400057c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140005ef0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140044260]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140044240]
test rbx, rbx
je 0x140005f4c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140005f43
test rsi, rsi
je 0x140005f43
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140005f28
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 0x140006280
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140006300
Capabilities:
Parse pe header

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

Function at 0x1400063c0
Capabilities:
Parse pe header

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

Function at 0x140006690
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1400442e0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1400442e8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1400066e0
lea rdx, [0x1400065a0]
mov ecx, eax
mov dword [0x1400442d8], eax
call fcn.14000c030
test eax, eax
jne 0x1400066e8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400066d7
call sub.msvcrt.dll_abort
nop
nop
Function at 0x1400066f0
Capabilities:
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 [0x140041590]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x140006728
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140006790
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 0x1400067a0
mov esi, dword [0x1400442d8]
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 0x140006810
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x140006858
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x140006717
mov rcx, rbx
call fcn.1400065f0
mov qword [rsi + r12*8 + 8], rax
jmp 0x140006717
call fcn.1400065f0
mov qword [rbx + 0x10], rax
jmp 0x140006717
mov r10d, dword [rsi]
test r10d, r10d
je 0x1400068ba
mov r9d, dword [0x1400268f0]
test r9d, r9d
je 0x1400068e8
lock add dword [0x1400442e0], 1
jne 0x14000691c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x1400068c7
mov eax, dword [rsi]
test eax, eax
je 0x140006731
lock sub dword [0x1400442e0], 1
js 0x140006731
mov rcx, qword [0x1400442e8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140006731
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sub.msvcrt.dll_calloc
mov rsi, rax
test rax, rax
je 0x140006943
mov qword [rax], rdi
mov ecx, dword [0x1400442d8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14000676b
call r13
jmp 0x14000676b
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov rsi, rax
test rax, rax
je 0x140006943
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x140006833
call fcn.140006690
mov dword [0x1400268f0], 1
mov edx, dword [rsi]
test edx, edx
jne 0x1400067bc
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x140006731
mov rax, qword [0x1400442d0]
lea r12, [rax + 1]
mov qword [0x1400442d0], r12
mov qword [rbx + 0x10], r12
jmp 0x1400067d7
lock add dword [0x1400268f4], 1
je 0x1400068a1
mov r8d, dword [0x1400268f0]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x1400268f0]
test r8d, r8d
jne 0x1400068b0
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140006910
jmp 0x1400068b0
mov rcx, qword [0x1400442e8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400067ca
lock sub dword [0x1400442e0], 1
jmp 0x1400067ca
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140006960
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x14000696a
mov qword [rcx + 8], r8
test r9, r9
je 0x140006974
cmp qword [rcx], rdx
je 0x140006978
ret
mov qword [rcx + 0x18], r9
ret

Function at 0x144352000
Capabilities:
Decompress data using aplib

Disassembly:
jmp 0x14435200a
jmp 0x14435400f
jmp fcn.143dd80b0