joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140014df3
Capabilities:
Access peb ldr_data
Get process filename

Disassembly:
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
movzx eax, word [rcx + rax*2]
test eax, eax
jne 0x1400153f3
jmp 0x140015cc5
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x50]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140012b24
jmp 0x140010641
xor r9d, r9d
mov r8d, eax
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x38]
call fcn.140016d94
jmp 0x140010059
test eax, eax
jne 0x140010641
jmp 0x140014d3c
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x10]
sub rax, 0x10
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x30], rax
je 0x14001179d
jmp 0x14000ed7a
mov rax, qword [rsp + 0x48]
add rsp, 0x68
ret
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
lea rax, [rcx + rax*2 + 2]
mov qword [rsp + 0x38], rax
jmp 0x14000e70d
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x20], 0
jmp 0x14001391e
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
movzx eax, word [rcx + rax*2]
test eax, eax
je 0x140015cc5
jmp 0x1400153f3
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], 0
jmp 0x14000ed7a
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x48], rax
jmp 0x14001179d
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword gs:[0x60]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
invalid
invalid
invalid
Function at 0x140001000
Capabilities:
Create device object

Disassembly:
mov qword [rsp + 8], rbx
push rbp
mov rbp, rsp
sub rsp, 0x70
mov rbx, rcx
lea rdx, [0x140001950]
lea rcx, [rbp - 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
movaps xmm0, xmmword [rbp - 0x30]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x30], rax
lea r8, [rbp - 0x10]
mov r9d, 0x22
mov byte [rsp + 0x28], 1
and dword [rsp + 0x20], 0
mov rcx, rbx
movdqa xmmword [rbp - 0x10], xmm0
lea edx, [r9 + 6]
call qword [sym.imp.ntoskrnl.exe_IoCreateDevice]
test eax, eax
jns 0x14000105d
lfence
jmp 0x1400010ba
mov rax, qword [rbp + 0x18]
lea rdx, [0x140001970]
lea rcx, [rbp - 0x20]
or dword [rax + 0x30], 4
mov rax, qword [rbp + 0x18]
mov rbx, qword [rax + 0x40]
mov qword [rbx], rax
movaps xmm0, xmmword [rbp - 0x30]
movdqu xmmword [rbx + 8], xmm0
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
movups xmm0, xmmword [rbp - 0x20]
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x20]
movdqu xmmword [rbx + 0x18], xmm0
call qword [sym.imp.ntoskrnl.exe_IoCreateSymbolicLink]
mov ebx, eax
test eax, eax
jns 0x1400010b8
lfence
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov eax, ebx
jmp 0x1400010ba
xor eax, eax
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rbp
ret

Function at 0x1400010c8
Capabilities:
Find process by pid

Disassembly:
sub rsp, 0x28
and qword [rsp + 0x38], 0
lea rdx, [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jns 0x1400010e5
xor eax, eax
jmp 0x1400010fa
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rcx, qword [rsp + 0x38]
call sub.ntoskrnl.exe_PsGetProcessImageFileName
add rsp, 0x28
ret
Function at 0x100401080
Capabilities:
Terminate process
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [str.clear]
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str.Usage:__s__options__n
mov r8, rbx
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov r9, qword [rax + 0x18]
lea rcx, str._nOptions:_n___T_TERM_____use_this_instead_of__TERM_n___V__________print_curses_version_n___x__________do_not_try_to_clear_scrollback_n
mov r8d, 0x82
mov edx, 1
call sub.cygwin1.dll_fwrite
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop
jmp 0x1004014a0
jmp qword [sym.imp.cygwin1.dll_putchar]

Function at 0x100401190
Capabilities:
Terminate process

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov dword [0x10040704c], 2
mov rbx, rcx
mov esi, edx
mov rdx, rcx
mov ecx, 2
call sub.cygwin1.dll_tcgetattr
test eax, eax
js 0x100401210
mov rax, qword [rbx]
mov rdx, qword [rbx + 8]
mov byte [section..bss], 1
mov qword [0x100407020], rax
mov qword [0x100407028], rdx
mov rax, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov qword [0x100407030], rax
mov qword [0x100407038], rdx
mov rax, qword [rbx + 0x20]
mov qword [0x100407040], rax
mov eax, dword [rbx + 0x28]
mov dword [0x100407048], eax
mov eax, dword [0x10040704c]
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rdx, rbx
mov ecx, 1
mov dword [0x10040704c], 1
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
xor ecx, ecx
mov rdx, rbx
mov dword [0x10040704c], 0
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
lea rcx, str._dev_tty
mov edx, 2
call sub.cygwin1.dll_open
test eax, eax
mov dword [0x10040704c], eax
jns 0x100401280
test sil, sil
jne 0x100401294
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x10]
call sub.cygwin1.dll_fileno
mov dword [0x10040704c], eax
jmp 0x100401203
mov rdx, rbx
mov ecx, eax
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
jmp 0x100401262
call sub.cygwin1.dll___errno
mov ebx, dword [rax]
mov ecx, ebx
call sub.cygwin1.dll_strerror
mov rdi, rax
mov rax, qword [0x100403120]
mov rsi, qword [rax]
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea r9, str.terminal_attributes
lea rdx, str._s:__s:__s_n
mov qword [rsp + 0x20], rdi
mov r8, rsi
call sub.cygwin1.dll_fprintf
cmp byte [section..bss], 0
je 0x1004012f3
mov ecx, dword [0x10040704c]
lea r8, [0x100407020]
mov edx, 3
call sub.cygwin1.dll_tcsetattr
call sub.cygwin1.dll___getreent
mov rdx, qword [rax + 0x18]
mov ecx, 0xa
call sub.cygwin1.dll_fputc
lea ecx, [rbx + 4]
call sub.cygwin1.dll_exit
nop
nop
cmp byte [section..bss], 0
jne 0x100401320
ret
mov ecx, dword [0x10040704c]
lea r8, [0x100407020]
mov edx, 3
jmp sub.cygwin1.dll_tcsetattr
Function at 0x140011217
Capabilities:
Terminate process

Disassembly:
jmp 0x140013e20
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x28
ret
Function at 0x1400112a8
Capabilities:
Parse pe header

Disassembly:
jmp 0x140015170
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140015190
xor al, al
jmp 0x140015211
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400151a3
xor al, al
jmp 0x140015211
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x1400151cd
xor al, al
jmp 0x140015211
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400151e1
xor al, al
jmp 0x140015211
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400151f3
xor al, al
jmp 0x140015211
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001520f
xor al, al
jmp 0x140015211
mov al, 1
add rsp, 0x38
ret
Function at 0x140013060
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.1400113e3
movzx eax, al
test eax, eax
jne 0x140013080
mov ecx, 7
call fcn.140011348
nop
mov byte [rsp + 0x20], 0
call fcn.140011361
mov byte [rsp + 0x21], al
cmp dword [0x14001f868], 1
jne 0x1400130a4
mov ecx, 7
call fcn.140011348
nop
jmp 0x1400130fc
cmp dword [0x14001f868], 0
jne 0x1400130f7
mov dword [0x14001f868], 1
lea rdx, [0x14001b660]
lea rcx, [0x14001b330]
call fcn.1400111ae
test eax, eax
je 0x1400130d8
mov eax, 0xff
jmp 0x140013201
lea rdx, [0x14001b220]
lea rcx, [section..rdata]
call fcn.140011357
mov dword [0x14001f868], 2
jmp 0x1400130fc
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.140011334
call fcn.1400112cb
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x140013159
mov rcx, qword [rsp + 0x30]
call fcn.14001115e
movzx eax, al
test eax, eax
je 0x140013159
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x140026020]
nop
call fcn.1400112fd
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x14001318d
mov rcx, qword [rsp + 0x38]
call fcn.14001115e
movzx eax, al
test eax, eax
je 0x14001318d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.1400113a2
nop
call fcn.1400132b0
mov dword [rsp + 0x28], eax
call fcn.1400112a8
movzx eax, al
test eax, eax
jne 0x1400131ac
mov ecx, dword [rsp + 0x28]
call fcn.140011055
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x1400131bb
call fcn.1400113ac
nop
xor edx, edx
mov cl, 1
call fcn.14001114f
mov eax, dword [rsp + 0x28]
jmp 0x140013201
add rsp, 0x68
ret
Function at 0x140001960
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 0x140001ac6
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 [0x14012e010]
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 [0x14012e018]
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 0x140001ab8
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 0x1400019e0
xor eax, eax
jmp 0x140001a96

Function at 0x140001b00
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.140001960
mov rsi, rax
test rax, rax
je 0x140001bdb
mov rcx, rbx
call fcn.140001630
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 0x140001bf0
add rdi, rdi
xor r14d, r14d
lea r12, [rsi + rax]
jmp 0x140001b6d
add r14, 2
cmp r14, rdi
je 0x140001bf0
mov ecx, dword [r12 + r14*2]
add rcx, rsi
call fcn.140001630
cmp eax, ebp
jne 0x140001b60
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 0x140001baa
add rax, 1
cmp rax, 0x20
je 0x140001b60
cmp byte [rbx + rax], 0xf
jne 0x140001ba0
cmp byte [rbx + rax + 1], 5
jne 0x140001ba0
movzx r15d, word [rbx + rax - 2]
test r15w, r15w
je 0x140001b60
mov ecx, 0x10
call fcn.140127f90
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 0x140001bdb
Function at 0x140001c00
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rdi
push rbx
sub rsp, 0x48
mov ecx, pe_nt_image_headers64
call fcn.140127f90
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 [0x14012e030]
mov rcx, rbx
mov qword [0x1402be040], rdx
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], rax
call fcn.140001b00
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 [0x1402be040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax], r8
mov qword [rax + 8], r9
mov eax, 0x7972
mov word [rsp + 0x34], ax
call fcn.140001b00
movdqa xmm0, xmmword [0x14012e050]
mov rcx, rbx
mov byte [rsp + 0x30], 0
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402be040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x10], r8
mov qword [rax + 0x18], r9
call fcn.140001b00
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 [0x1402be040]
mov qword [rax + 0x20], r8
mov qword [rax + 0x28], r9
mov rax, qword [0x14012e050]
mov qword [rsp + 0x20], rax
call fcn.140001b00
mov rcx, rbx
mov dword [rsp + 0x28], 0x656c69
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402be040]
mov qword [rax + 0x30], r8
mov qword [rax + 0x38], r9
mov rax, qword [0x14012e060]
mov qword [rsp + 0x20], rax
call fcn.140001b00
mov rcx, rbx
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402be040]
mov qword [rax + 0x40], r8
mov qword [rax + 0x48], r9
mov rax, qword [0x14012e068]
mov qword [rsp + 0x20], rax
call fcn.140001b00
movdqa xmm0, xmmword [str.NtWaitForSingleOCannot_convert_character_sequence]
mov rcx, rbx
mov edx, 0x74
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov word [rsp + 0x34], dx
mov rax, qword [0x1402be040]
mov dword [rsp + 0x30], 0x63656a62
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x50], r8
mov qword [rax + 0x58], r9
call fcn.140001b00
mov rcx, qword [rax]
mov rbx, qword [rax + 8]
mov rax, qword [0x1402be040]
mov qword [rax + 0x70], rcx
mov qword [rax + 0x78], rbx
add rsp, 0x48
pop rbx
pop rdi
ret
Function at 0x140019870
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.1400269d0
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.1400269d0
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 0x1400198e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1402be0c4]
mov rbx, rcx
test esi, esi
jle 0x140019a10
mov rax, qword [0x1402be0c8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001992b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400199b5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140019910
mov rcx, rbx
call fcn.14001a410
mov rdi, rax
test rax, rax
je 0x140019a32
mov rax, qword [0x1402be0c8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14001a550
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1402be0c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140019a17
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400199ae
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x1400199c0
add dword [0x1402be0c4], 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 [0x1402be0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400199ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140019870
nop dword [rax]
xor esi, esi
jmp 0x140019938
mov rax, qword [0x1402be0c8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140019870
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140019870
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x14001a100
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x14001a230
ja 0x14001a148
test edx, edx
je 0x14001a1c8
mov eax, dword [0x1402be108]
test eax, eax
je 0x14001a2b0
mov dword [0x1402be108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x14001a135
mov eax, dword [0x1402be108]
test eax, eax
je 0x14001a135
lea r12, [0x1402be120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1402be100]
test rbx, rbx
je 0x14001a1b4
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 0x14001a2d8
test eax, eax
jne 0x14001a2d8
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a188
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001a135
mov eax, dword [0x1402be108]
test eax, eax
jne 0x14001a248
mov eax, dword [0x1402be108]
cmp eax, 1
jne 0x14001a135
mov rbx, qword [0x1402be100]
test rbx, rbx
je 0x14001a201
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call fcn.140027498
test rbx, rbx
jne 0x14001a1f0
lea rcx, [0x1402be120]
mov qword [0x1402be100], 0
mov dword [0x1402be108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x14001a135
call fcn.140019860
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x1402be120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1402be100]
test rbx, rbx
je 0x14001a29c
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 0x14001a2c8
test rsi, rsi
je 0x14001a2c8
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a278
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001a1d2
lea rcx, [0x1402be120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14001a12b
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a278
jmp 0x14001a29c
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a188
jmp 0x14001a1b4

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

Disassembly:
mov r8, qword [0x140293000]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x14001a430
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x14001a438
ret
cmp word [rdx + 0x18], 0x20b
jne 0x14001a430
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x14001a485
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 0x14001a47c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14001a430
add rax, 0x28
cmp rax, r9
jne 0x14001a468
xor eax, eax
ret
Function at 0x14001a490
Capabilities:
Parse pe header

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

Function at 0x14001a550
Capabilities:
Parse pe header

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

Function at 0x14001a990
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x1402be108]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x14001a020
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 0x14001a06a
mov qword [rax + 8], rsi
lea rsi, [0x1402be120]
mov dword [rax], edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1402be100]
mov rcx, rsi
mov qword [0x1402be100], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001a016
or eax, 0xffffffff
jmp 0x14001a018
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14001a9c0
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp 0x140027820
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x140027830
xor eax, eax
ret
jmp 0x14001a000

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

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14001aa48
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x14001b680
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x230
mov rbx, rcx
call sub.msvcrt.dll__errno
mov dword [rax], 0
test rbx, rbx
je 0x14001b7e0
cmp word [rbx], 0
je 0x14001b7d0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001b7f0
test al, 0x10
je 0x14001b7d0
lea rsi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rsi
lea rdi, [0x140291e40]
lea rbp, [0x140291e44]
call sub.msvcrt.dll__wfullpath
mov rcx, rsi
call sub.msvcrt.dll_wcslen
mov rcx, rdi
mov rbx, rax
call sub.msvcrt.dll_wcslen
mov rcx, rbp
add rbx, rax
call sub.msvcrt.dll_wcslen
lea rcx, [rbx + rax + 0x229]
add rcx, rcx
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x14001b7ff
lea r12, [rax + 0x44c]
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_wcscpy
cmp word [rbx + 0x44c], 0
jne 0x14001b798
mov rdx, rbp
mov rcx, r12
call sub.msvcrt.dll_wcscat
lea rdx, [rbx + 0x238]
mov ecx, 0x41
xor eax, eax
mov qword [rbx + 0x440], 0xffffffffffffffff
mov rdi, rdx
mov dword [rbx + 0x448], 0
mov qword [rbx + 0x230], 0
rep stosq qword [rdi], rax
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call sub.msvcrt.dll_wcslen
cmp word [rbx + rax*2 + 0x44a], 0x2f
je 0x14001b742
mov rcx, r12
call sub.msvcrt.dll_wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x14001b742
mov rdx, rdi
mov rcx, r12
call sub.msvcrt.dll_wcscat
jmp 0x14001b742
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0x14
jmp 0x14001b781
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x14001b781
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x14001b781
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x14001b781