joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140043950
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.140064060
sub rsp, rax
mov rax, qword [0x140086040]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x140088a40]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140043b5d
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x140043aa9
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140043aa9
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x140043a89
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x140043a18
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140043b1d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140043b7c
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x140043b58
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140043b7c
jmp 0x1400439ee
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.14000c3f0
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1400549f0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14000b660
lea rcx, [rsp + 0x40]
call fcn.1400549b0
movzx eax, al
test eax, eax
jne 0x140054a38
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.1400548e0
mov rax, qword [rsp + 0x70]
jmp 0x140054c09
lea rcx, [rsp + 0x40]
call fcn.140009430
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140054960
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140009430
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.140050bc0
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140054ade
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.1400548e0
mov rax, qword [rsp + 0x80]
jmp 0x140054c09
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.14001d750
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.14000b660
lea rcx, [rsp + 0x48]
call fcn.14000bda0
movzx eax, al
test eax, eax
jne 0x140054b45
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.14000bd80
lea rcx, [rsp + 0x40]
call fcn.1400548e0
mov rax, qword [rsp + 0x88]
jmp 0x140054c09
lea rcx, [rsp + 0x48]
call fcn.140009430
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140009430
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.140050bc0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140054bdb
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.14000bd80
lea rcx, [rsp + 0x40]
call fcn.1400548e0
mov rax, qword [rsp + 0xa0]
jmp 0x140054c09
lea rcx, [rsp + 0x48]
call fcn.14000eed0
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.14000bd80
lea rcx, [rsp + 0x40]
call fcn.1400548e0
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x1400617b0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.140035cd0
lea rcx, [rsp + 0x48]
call fcn.140035cd0
call fcn.14003e810
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.140035bc0
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x14006181f
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.140035d60
lea rcx, [rsp + 0x78]
call fcn.140035d60
mov eax, dword [rsp + 0x24]
jmp 0x1400618b0
call fcn.14003e810
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.140035bc0
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140061866
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.140035d60
lea rcx, [rsp + 0x78]
call fcn.140035d60
mov eax, dword [rsp + 0x2c]
jmp 0x1400618b0
lea rcx, [rsp + 0x48]
call fcn.140036090
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.140036090
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.140035d60
lea rcx, [rsp + 0x78]
call fcn.140035d60
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x14029c14c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1402758b8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14029c1d6
cmp byte [rbp - 0x21], r15b
je 0x14029c1d1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14029c20c
call fcn.14028fbd8
test eax, eax
jne 0x14029c1f8
cmp byte [rbp - 0x21], r15b
je 0x14029c1f0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14029c20c
cmp byte [rbp - 0x21], r15b
je 0x14029c209
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1402755b4
test eax, eax
jne 0x14029c2ac
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1402758b8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14029c24b
cmp byte [rbp - 0x21], r15b
je 0x14029c280
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14029c280
call fcn.14028fbd8
test eax, eax
jne 0x14029c26c
cmp byte [rbp - 0x21], r15b
je 0x14029c265
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14029c280
cmp byte [rbp - 0x21], r15b
je 0x14029c27d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1402755b4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14029c2ac
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14029c2af
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14029c2bd
mov rcx, rdi
call fcn.14028d5ac
cmp byte [rbp + 0x3f], r15b
je 0x14029c2cc
mov rcx, qword [rbp + 0x27]
call fcn.14028d5ac
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140002942
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 0x140002961
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 fcn.14001aa60

Function at 0x140005676
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.14001a480]
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 fcn.14001aa60

Function at 0x1400056b5
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
cmp qword [0x1400b50f0], 0
jne 0x1400056cd
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.140005676
lea rsi, [rsp + 0x20]
mov rdx, rcx
mov rcx, rsi
call fcn.140005614
mov rbx, qword [rsp + 0x28]
mov rcx, rsi
call qword [0x1400b50f0]
test rbx, rbx
je 0x1400056fe
test byte [rbx + 7], 0x40
jne 0x1400056fe
mov rcx, rbx
call fcn.1400039cc
lea rcx, [0x14001b320]
call fcn.140015260
cmp byte [rax], 0
je 0x140005736
mov byte [rax], 0
lea rcx, [0x14001b220]
call fcn.140015260
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.140003f38
add rsp, 0x38
pop rbx
pop rsi
ret

Function at 0x140005d6b
Capabilities:
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
lea r12, [0x1400b50c0]
xor ebx, ebx
lea r14, [0x14001b320]
mov rsi, rcx
mov rdi, rdx
lea r13, [rsp + 0x20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbp, qword [fcn.14001a480]
mov ecx, 1
cmp rbx, rdi
jl 0x140005df1
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x14001c3bb]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rbp
mov rcx, rax
call fcn.14001aa60
mov rcx, r12
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rbp
xor r8d, r8d
mov rdx, r13
mov rcx, rax
mov rax, rbx
shl rax, 4
movups xmm0, xmmword [rsi + rax]
movups xmmword [rsp + 0x20], xmm0
call fcn.140005c45
mov rcx, r14
call fcn.140015260
cmp byte [rax], 0
jne 0x140005e23
inc rbx
jmp 0x140005da4
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x140010fa3
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x140010fe1
cmp word [rcx], 0x5a4d
jne 0x140010fe1
movsxd rdx, dword [rcx + 0x3c]
cmp edx, 0x400
jg 0x140010fe1
call fcn.140007633
mov rcx, qword [0x1400b0710]
mov rbx, rax
call fcn.140015260
cmp byte [rax], 0
jne 0x140010fe1
cmp dword [rbx], 0x4550
je 0x140010fe3
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x140014330
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.14001a480
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.14001a480
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 0x1400143a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400b5b14]
mov rbx, rcx
test esi, esi
jle 0x1400144d0
mov rax, qword [0x1400b5b18]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400143eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140014475
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400143d0
mov rcx, rbx
call fcn.140014df0
mov rdi, rax
test rax, rax
je 0x1400144f2
mov rax, qword [0x1400b5b18]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140014f30
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400b5b18]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400144d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14001446e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140014480
add dword [0x1400b5b14], 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 [0x1400b5b18]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001446e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140014330
nop dword [rax]
xor esi, esi
jmp 0x1400143f8
mov rax, qword [0x1400b5b18]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140014330
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140014330
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140014a60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400b5b80]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400b5b60]
test rbx, rbx
je 0x140014abc
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 0x140014ab3
test rsi, rsi
je 0x140014ab3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140014a98
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 0x140014df0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140014e70
Capabilities:
Parse pe header

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

Function at 0x140014f30
Capabilities:
Parse pe header

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

Function at 0x140015200
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1400b5c00], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1400b5c08], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140015250
lea rdx, [0x140015110]
mov ecx, eax
mov dword [0x1400b5bf8], eax
call fcn.14001abc0
test eax, eax
jne 0x140015258
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140015247
call sub.msvcrt.dll_abort
nop
nop
Function at 0x140015260
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 [0x1400b06b0]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x140015298
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140015300
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 0x140015310
mov esi, dword [0x1400b5bf8]
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 0x140015380
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x1400153c8
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x140015287
mov rcx, rbx
call fcn.140015160
mov qword [rsi + r12*8 + 8], rax
jmp 0x140015287
call fcn.140015160
mov qword [rbx + 0x10], rax
jmp 0x140015287
mov r10d, dword [rsi]
test r10d, r10d
je 0x14001542a
mov r9d, dword [0x14001b560]
test r9d, r9d
je 0x140015458
lock add dword [0x1400b5c00], 1
jne 0x14001548c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140015437
mov eax, dword [rsi]
test eax, eax
je 0x1400152a1
lock sub dword [0x1400b5c00], 1
js 0x1400152a1
mov rcx, qword [0x1400b5c08]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x1400152a1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sub.msvcrt.dll_calloc
mov rsi, rax
test rax, rax
je 0x1400154b3
mov qword [rax], rdi
mov ecx, dword [0x1400b5bf8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x1400152db
call r13
jmp 0x1400152db
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 0x1400154b3
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 0x1400153a3
call fcn.140015200
mov dword [0x14001b560], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14001532c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x1400152a1
mov rax, qword [0x1400b5bf0]
lea r12, [rax + 1]
mov qword [0x1400b5bf0], r12
mov qword [rbx + 0x10], r12
jmp 0x140015347
lock add dword [0x14001b564], 1
je 0x140015411
mov r8d, dword [0x14001b560]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x14001b560]
test r8d, r8d
jne 0x140015420
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140015480
jmp 0x140015420
mov rcx, qword [0x1400b5c08]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14001533a
lock sub dword [0x1400b5c00], 1
jmp 0x14001533a
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x1400154d0
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x1400154da
mov qword [rcx + 8], r8
test r9, r9
je 0x1400154e4
cmp qword [rcx], rdx
je 0x1400154e8
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x14078d058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14078d1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14078d089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14078d06f
add dl, dl
jne 0x14078d096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14078d0f6
xor eax, eax
add dl, dl
jne 0x14078d0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14078d1ad
add dl, dl
jne 0x14078d0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14078d0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14078d0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14078d0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14078d0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14078d07e
mov eax, 1
add dl, dl
jne 0x14078d106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14078d113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14078d0fb
sub eax, ebx
mov ebx, 1
jne 0x14078d14c
mov ecx, 1
add dl, dl
jne 0x14078d12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14078d13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14078d123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14078d07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14078d168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14078d175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14078d15d
cmp eax, 0x7d00
jae 0x14078d19b
cmp eax, 0x500
jb 0x14078d196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14078d07e
cmp eax, 0x7f
ja 0x14078d19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14078d07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14078d1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14078d07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20