joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000400c
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x140
mov rax, qword [0x14000e3b8]
xor rax, rsp
mov qword [rsp + 0x130], rax
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 0xf0
mov qword [rsp + 0x28], rax
mov rbx, r8
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rsi, rdx
mov rdi, rcx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
xor edx, edx
test eax, eax
jne 0x140004088
cmp dword [rsp + 0x30], 2
jb 0x1400040cc
mov eax, dword [rsp + 0x40]
lea ecx, [rdx + 0x4e]
and eax, 0xffdf
cmp eax, ecx
je 0x140004084
cmp eax, 0x59
jne 0x1400040cc
mov dword [rbx], 1
jmp 0x1400040cc
mov dword [rbx], edx
jmp 0x1400040cc
mov eax, dword [rbx]
mov r9d, 1
neg eax
mov word [rsp + 0x42], dx
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 4
sbb r8w, r8w
mov qword [rsp + 0x20], rax
and r8w, 0xb
mov rdx, rsi
add r8w, 0x4e
mov rcx, rdi
mov word [rsp + 0x40], r8w
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140006770
add rsp, 0x140
pop rdi
pop rsi
pop rbx
ret

Function at 0x1400040f0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x20], rbp
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
push rdi
sub rsp, 0x30
mov ebx, dword [0x14000e3d0]
lea rax, [r11 + 0x10]
mov qword [r11 - 0x10], rax
lea rbp, [0x14000e3d0]
lea r9, [r11 + 0x18]
mov qword [r11 - 0x18], rbp
xor r8d, r8d
mov dword [rsp + 0x48], 4
lea rdx, str.EventDispatchTtime
mov dword [rsp + 0x50], 4
mov rdi, rcx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x14000415b
cmp dword [rsp + 0x50], 4
je 0x140004187
mov dword [0x14000e3d0], ebx
jmp 0x140004187
mov dword [rsp + 0x28], 4
lea rdx, str.EventDispatchTtime
mov r9d, 4
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov dword [0x14000e3d0], ebx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140005624
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
push rbx
sub rsp, 0x40
mov qword [rsp + 0x30], rsp
lea rcx, [0x14000e2c0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop
cmp byte [0x1400106d0], 0
jne 0x1400056c7
lea rax, [0x1400106d8]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftMSDTCTracing
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
je 0x1400056bb
and qword [0x1400106d8], 0
lea rcx, str.Unable_to_open_MSDTCTracing_settings_key_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
movzx ecx, bx
or ecx, 0x80070000
test ebx, ebx
cmovle ecx, ebx
mov dword [rsp + 0x50], ecx
lea rdx, [0x1400056b1]
mov rcx, rsp
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, dword [rsp + 0x50]
add rsp, 0x40
pop rbx
ret
call fcn.1400056e0
mov byte [0x1400106d0], 1
lea rcx, [0x14000e2c0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x1400056b5
Function at 0x140005e5c
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x500]
sub rsp, 0x600
mov rax, qword [0x14000e3b8]
xor rax, rsp
mov qword [rbp + 0x4f0], rax
xor ebx, ebx
mov edi, 0x105
mov qword [rsp + 0x38], rbx
mov rsi, rdx
mov dword [rsp + 0x30], edi
mov r14, rcx
test rdx, rdx
jne 0x140005eaf
mov eax, 0x80070057
jmp 0x14000604a
mov qword [rcx], rbx
mov qword [rdx], rbx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
lea r9, [rsp + 0x30]
xor edx, edx
mov rcx, rax
lea r8, [rbp + 0xd0]
call qword [sym.imp.api_ms_win_core_psapi_l1_1_0.dll_QueryFullProcessImageNameW]
test eax, eax
jne 0x140005eef
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140006048
lea r9, [rsp + 0x38]
mov edx, edi
lea r8, [rbp + 0x2e0]
lea rcx, [rbp + 0xd0]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
test eax, eax
je 0x140005ed6
mov rdx, qword [rsp + 0x38]
lea rcx, str.dllhost.exe
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x140006039
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCommandLineA]
mov rcx, rax
mov edx, 0x20
call qword [sym.imp.msvcrt.dll_strchr]
test rax, rax
je 0x140006039
add rax, 1
je 0x140006039
movzx ecx, word [0x14000aee8]
lea rdx, [rsp + 0x40]
movsd xmm0, qword [str._ProcessID]
mov word [rsp + 0x50], cx
mov cl, byte [0x14000aeea]
mov byte [rsp + 0x52], cl
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x40], rcx
mov rcx, rax
movsd qword [rsp + 0x48], xmm0
call fcn.140005d6c
cmp eax, 1
jl 0x140006039
mov al, byte [rbp - 0x40]
lea rdi, [rbp - 0x40]
jmp 0x140005fa8
lea rcx, [rdi + 1]
cmp al, 0x3a
je 0x140005fae
mov al, byte [rcx]
mov rdi, rcx
test al, al
jne 0x140005f9b
jmp 0x140005fb3
mov byte [rdi], bl
mov rdi, rcx
cmp byte [rdi], bl
je 0x140005fca
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x40]
call qword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x140005fce
lea rdi, [rbp - 0x40]
mov rcx, rbx
test rdi, rdi
je 0x140005ff8
mov ecx, 0x28
mov r8, rdi
mov edx, ecx
mov eax, ebx
cmp byte [r8], bl
je 0x140005ff0
inc r8
sub rdx, 1
jne 0x140005fe2
test rdx, rdx
jne 0x140006071
mov rcx, rbx
mov eax, 0x80070057
test eax, eax
js 0x140006039
lea r9d, [rcx + 1]
mov dword [rsp + 0x28], 0x29
lea rax, [rsp + 0x60]
xor ecx, ecx
mov r8, rdi
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
test eax, eax
je 0x140006039
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.1400022d8
test eax, eax
js 0x140006048
mov rcx, qword [rsp + 0x38]
mov rdx, r14
call fcn.1400022d8
mov ebx, eax
mov eax, ebx
mov rcx, qword [rbp + 0x4f0]
xor rcx, rsp
call fcn.140006770
lea r11, [rsp + 0x600]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
sub rcx, rdx
jmp 0x140005ffd
Function at 0x1400064d0
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0xb0
xor r14d, r14d
mov dword [rsp + 0x20], r14d
lea rcx, [rax - 0x78]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
mov esi, r14d
xor eax, eax
lock cmpxchg qword [0x140010960], rbx
je 0x140006537
cmp rax, rbx
jne 0x14000652a
mov ebx, 1
mov esi, ebx
jmp 0x14000653c
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x14000650f
mov ebx, 1
mov eax, dword [0x140010968]
cmp eax, ebx
jne 0x140006554
mov edi, 0x1f
mov ecx, edi
call sub.msvcrt.dll__amsg_exit
jmp 0x1400065c0
mov eax, dword [0x140010968]
test eax, eax
jne 0x1400065b5
mov dword [0x140010968], ebx
lea r15, [0x1400089d0]
lea rdi, [0x1400089b8]
mov qword [rsp + 0x30], rdi
mov eax, r14d
mov dword [rsp + 0x24], eax
cmp rdi, r15
jae 0x1400065a7
test eax, eax
jne 0x1400065ab
cmp qword [rdi], r14
je 0x14000659c
mov rax, qword [rdi]
mov rcx, qword [0x140008938]
call rcx
mov dword [rsp + 0x24], eax
add rdi, 8
mov qword [rsp + 0x30], rdi
jmp 0x14000657e
test eax, eax
je 0x1400065bb
mov eax, 0xff
jmp 0x140006716
mov dword [0x14000e3e4], ebx
mov edi, 0x1f
mov eax, dword [0x140010968]
cmp eax, ebx
jne 0x1400065e7
lea rdx, [0x1400089b0]
lea rcx, [0x140008940]
call sub.msvcrt.dll__initterm
mov dword [0x140010968], 2
test esi, esi
jne 0x1400065f5
mov rax, r14
xchg qword [0x140010960], rax
cmp qword [0x140010970], r14
je 0x140006628
lea rcx, [0x140010970]
call fcn.140006940
test eax, eax
je 0x140006628
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140010970]
mov r9, qword [0x140008938]
call r9
mov rax, qword [sym.imp.msvcrt.dll__wcmdln]
mov rcx, qword [rax]
test rcx, rcx
jne 0x140006641
mov eax, 0xff
jmp 0x140006716
mov qword [rsp + 0x28], rcx
mov edx, dword [rsp + 0x20]
movzx eax, word [rcx]
cmp ax, 0x20
ja 0x1400066c7
test ax, ax
je 0x14000665c
test edx, edx
jne 0x1400066c7
sub ax, bx
cmp ax, di
ja 0x140006672
add rcx, 2
mov qword [rsp + 0x28], rcx
movzx eax, word [rcx]
jmp 0x14000665c
test byte [rsp + 0x7c], bl
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rcx
xor edx, edx
lea rcx, [0x140000000]
call fcn.1400013d8
mov dword [0x14000e3e0], eax
cmp dword [0x14000e400], r14d
jne 0x1400066b0
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x14000e3e4], r14d
jne 0x1400066c5
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14000e3e0]
jmp 0x140006716
cmp ax, 0x22
jne 0x1400066db
mov eax, r14d
test edx, edx
sete al
mov edx, eax
mov dword [rsp + 0x20], eax
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x14000664a
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop r15
ret
sub rsp, 0x28
call fcn.14013e000
add rsp, 0x28
jmp 0x1400064d0
Function at 0x14000682c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140006878
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140006870
cmp dword [rcx + 0x3c], edx
jl 0x140006870
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140006870
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140006878
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140004000
Capabilities:
Encode data using xor

Disassembly:
xor r11, r11
mov r13, rsp
fldln2
mov r11w, 0x185
and r13w, 0xf6a0
movabs r8, 0x897524694bce312a
fxsave64 [r13]
mov r12, qword [r13 + 8]
dec r11
xor qword [r12 + r11*8 + 0x2d], r8
test r11, r11
jne 0x140004026
add byte [esi], cl
xchg edx, eax
movsd dword [rdi], dword [rsi]
jo 0x140004076
pop rdi
invalid
mov bh, 0x8e
push rax
invalid
Function at 0x1400018e0
Capabilities:
Access peb ldr_data

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4a8
movaps xmmword [rsp + 0x490], xmm6
mov ecx, 0x20
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov r15, qword [rax + 0x20]
lea r9, [rax + 0x20]
xor eax, eax
lea r13, [rsp + 0x160]
mov rdi, r13
rep stosq qword [rdi], rax
cmp r9, r15
je 0x140001a46
mov qword [rsp + 0x48], r9
mov r12, qword [sym.imp.msvcrt.dll_strcpy_s]
xor r14d, r14d
lea rsi, [rsp + 0x50]
lea rbx, [rsp + 0x380]
lea rbp, [rsp + 0x270]
movq xmm6, qword [section..rdata]
nop word [rax + rax]
mov rax, r14
mov ecx, 0x20
mov rdi, rsi
xor edx, edx
rep stosq qword [rdi], rax
mov ecx, 0x20
mov r9d, 0xffffffff
mov dword [rdi], 0
mov rdi, r13
rep stosq qword [rdi], rax
mov dword [rdi], 0
mov r8, qword [r15 + 0x40]
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r8, rbx
mov edx, 0x104
mov rcx, r13
movzx eax, word [0x140046008]
movq qword [rsp + 0x380], xmm6
mov word [rsp + 0x388], ax
call r12
mov r8, r13
mov edx, 0x104
mov rcx, rbp
call r12
mov edx, 0x104
mov r8, rsi
mov rcx, rbx
call r12
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__strlwr]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__strlwr]
mov rdx, rbp
mov rcx, rbx
call sub.msvcrt.dll_strstr
test rax, rax
je 0x140001a38
mov rax, qword [r15 + 0x20]
movaps xmm6, xmmword [rsp + 0x490]
add rsp, 0x4a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15, qword [r15]
cmp qword [rsp + 0x48], r15
jne 0x140001960
xor eax, eax
jmp 0x140001a16

Function at 0x140001a80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
call fcn.1400018e0
mov rsi, rax
test rax, rax
je 0x140001b5b
mov rcx, rbx
call fcn.1400015b0
mov ebp, eax
movsxd rax, dword [rsi + 0x3c]
mov r13d, dword [rsi + rax + 0x88]
add r13, rsi
mov edi, dword [r13 + 0x18]
mov eax, dword [r13 + 0x20]
test edi, edi
je 0x140001b70
add rdi, rdi
xor r14d, r14d
lea r12, [rsi + rax]
jmp 0x140001aed
add r14, 2
cmp r14, rdi
je 0x140001b70
mov ecx, dword [r12 + r14*2]
add rcx, rsi
call fcn.1400015b0
cmp eax, ebp
jne 0x140001ae0
mov eax, dword [r13 + 0x24]
lea rdx, [rsi + r14]
movzx edx, word [rdx + rax]
mov eax, dword [r13 + 0x1c]
lea rdx, [rsi + rdx*4]
mov ebx, dword [rdx + rax]
xor eax, eax
add rbx, rsi
jmp 0x140001b2a
add rax, 1
cmp rax, 0x20
je 0x140001ae0
cmp byte [rbx + rax], 0xf
jne 0x140001b20
cmp byte [rbx + rax + 1], 5
jne 0x140001b20
movzx r15d, word [rbx + rax - 2]
test r15w, r15w
je 0x140001ae0
mov ecx, 0x10
call fcn.140043f30
mov qword [rax], rbx
mov rsi, rax
mov dword [rax + 8], ebp
mov word [rax + 0xc], r15w
mov rax, rsi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor esi, esi
jmp 0x140001b5b
Function at 0x140001b80
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rdi
push rbx
sub rsp, 0x48
mov ecx, pe_nt_image_headers64
call fcn.140043f30
mov ecx, 0x10
lea rbx, [rsp + 0x20]
movdqa xmm0, xmmword [str.NtAllocateVirtualMemory]
mov rdx, rax
mov rdi, rax
xor eax, eax
rep stosq qword [rdi], rax
mov rax, qword [0x140046020]
mov rcx, rbx
mov qword [0x1401b0040], rdx
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], rax
call fcn.140001a80
movdqa xmm0, xmmword [str.NtProtectVirtualNtCreateThreadExNtWriteFNtClose]
mov rcx, rbx
mov dword [rsp + 0x30], 0x6f6d654d
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov byte [rsp + 0x36], 0
mov rax, qword [0x1401b0040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax], r8
mov qword [rax + 8], r9
mov eax, 0x7972
mov word [rsp + 0x34], ax
call fcn.140001a80
movdqa xmm0, xmmword [0x140046040]
mov rcx, rbx
mov byte [rsp + 0x30], 0
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1401b0040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x10], r8
mov qword [rax + 0x18], r9
call fcn.140001a80
mov rcx, rbx
mov byte [rsp + 0x2c], 0
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov dword [rsp + 0x28], 0x656c6946
mov rax, qword [0x1401b0040]
mov qword [rax + 0x20], r8
mov qword [rax + 0x28], r9
mov rax, qword [0x140046040]
mov qword [rsp + 0x20], rax
call fcn.140001a80
mov rcx, rbx
mov dword [rsp + 0x28], 0x656c69
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1401b0040]
mov qword [rax + 0x30], r8
mov qword [rax + 0x38], r9
mov rax, qword [0x140046050]
mov qword [rsp + 0x20], rax
call fcn.140001a80
mov rcx, rbx
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1401b0040]
mov qword [rax + 0x40], r8
mov qword [rax + 0x48], r9
mov rax, qword [0x140046058]
mov qword [rsp + 0x20], rax
call fcn.140001a80
movdqa xmm0, xmmword [str.NtWaitForSingleO:]
mov rcx, rbx
mov edx, 0x74
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov word [rsp + 0x34], dx
mov rax, qword [0x1401b0040]
mov dword [rsp + 0x30], 0x63656a62
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x50], r8
mov qword [rax + 0x58], r9
call fcn.140001a80
mov rcx, qword [rax]
mov rbx, qword [rax + 8]
mov rax, qword [0x1401b0040]
mov qword [rax + 0x70], rcx
mov qword [rax + 0x78], rbx
add rsp, 0x48
pop rbx
pop rdi
ret
Function at 0x140018c30
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.140020e10
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.140020e10
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 0x140018ca0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401b00c4]
mov rbx, rcx
test esi, esi
jle 0x140018dd0
mov rax, qword [0x1401b00c8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140018ceb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140018d75
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140018cd0
mov rcx, rbx
call fcn.1400197d0
mov rdi, rax
test rax, rax
je 0x140018df2
mov rax, qword [0x1401b00c8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140019910
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401b00c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140018dd7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140018d6e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140018d80
add dword [0x1401b00c4], 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 [0x1401b00c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140018d6e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140018c30
nop dword [rax]
xor esi, esi
jmp 0x140018cf8
mov rax, qword [0x1401b00c8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140018c30
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140018c30
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400194c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x1400195f0
ja 0x140019508
test edx, edx
je 0x140019588
mov eax, dword [0x1401b0108]
test eax, eax
je 0x140019670
mov dword [0x1401b0108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x1400194f5
mov eax, dword [0x1401b0108]
test eax, eax
je 0x1400194f5
lea r12, [0x1401b0120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1401b0100]
test rbx, rbx
je 0x140019574
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 0x140019698
test eax, eax
jne 0x140019698
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140019548
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400194f5
mov eax, dword [0x1401b0108]
test eax, eax
jne 0x140019608
mov eax, dword [0x1401b0108]
cmp eax, 1
jne 0x1400194f5
mov rbx, qword [0x1401b0100]
test rbx, rbx
je 0x1400195c1
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call fcn.140021818
test rbx, rbx
jne 0x1400195b0
lea rcx, [0x1401b0120]
mov qword [0x1401b0100], 0
mov dword [0x1401b0108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x1400194f5
call fcn.140018c20
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x1401b0120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1401b0100]
test rbx, rbx
je 0x14001965c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140019688
test rsi, rsi
je 0x140019688
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140019638
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140019592
lea rcx, [0x1401b0120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x1400194eb
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140019638
jmp 0x14001965c
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140019548
jmp 0x140019574

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

Disassembly:
mov r8, qword [0x1401a76b0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400197f0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400197f8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400197f0
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140019845
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14001983c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400197f0
add rax, 0x28
cmp rax, r9
jne 0x140019828
xor eax, eax
ret
Function at 0x140019850
Capabilities:
Parse pe header

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

Function at 0x140019910
Capabilities:
Parse pe header

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

Function at 0x140019bb0
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x1401b0108]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x1400193e0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
mov rbx, rax
test rax, rax
je 0x14001942a
mov qword [rax + 8], rsi
lea rsi, [0x1401b0120]
mov dword [rax], edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1401b0100]
mov rcx, rsi
mov qword [0x1401b0100], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400193d6
or eax, 0xffffffff
jmp 0x1400193d8
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140019be0
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp 0x140021a20
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x140021a30
xor eax, eax
ret
jmp 0x1400193c0

Function at 0x140019c20
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 0x140019c50
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140019c68
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]