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

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1b0
mov r15, r8
mov rbx, rdx
mov r14, rcx
mov rax, qword [0x1403a0028]
xor rax, rsp
mov qword [rsp + 0x1a8], rax
movaps xmm0, xmmword [0x14032f5c0]
lea rdi, [rsp + 0x160]
movaps xmmword [rdi + 0x30], xmm0
movaps xmmword [rdi + 0x20], xmm0
movaps xmmword [rdi + 0x10], xmm0
movaps xmmword [rdi], xmm0
lea rsi, [rcx + 0x18]
mov rcx, rsi
call fcn.1401f9b30
mov r8d, 0x40
mov rcx, r14
mov rdx, rax
mov r9, rdi
call fcn.1402fb390
test al, al
je 0x1402f8422
movzx eax, word [rsp + 0x160]
cmp eax, 0x5a4d
jne 0x1402f8457
mov rcx, rsi
call fcn.1401f9b30
movsxd rdi, dword [rsp + 0x19c]
add rdi, rax
mov r8d, 0x108
mov rcx, r14
mov rdx, rdi
mov r9, rbx
call fcn.1402fb390
test al, al
je 0x1402f849c
cmp dword [rbx], 0x4550
jne 0x1402f84d8
mov sil, 1
test r15, r15
je 0x1402f8436
mov qword [r15], rdi
jmp 0x1402f8436
mov ecx, 1
call fcn.140160660
test al, al
jne 0x1402f851e
xor esi, esi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.1401bb0d0
mov eax, esi
add rsp, 0x1b0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8434
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x15a
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.invalid_e_magic_in_dos_header_of
mov r8d, 0x21
jmp 0x1402f8550
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8434
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x162
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.could_not_read_nt_headers_from
jmp 0x1402f854a
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8434
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x168
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.invalid_signature_in_nt_headers_of
mov r8d, 0x23
jmp 0x1402f8550
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x154
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.could_not_read_dos_header_from
mov r8d, 0x1f
call fcn.1401f9cc0
movzx r8d, byte [r14 + 0x17]
test r8b, r8b
jns 0x1402f8568
mov r8, qword [r14 + 8]
mov r14, qword [r14]
jmp 0x1402f856c
and r8d, 0x7f
mov rcx, rax
mov rdx, r14
call fcn.1401f9cc0
mov rcx, rdi
call fcn.140076510
jmp 0x1402f8434
Function at 0x1402f8590
Capabilities:
Parse pe header

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1b0
mov r15, r8
mov rbx, rdx
mov r14, rcx
mov rax, qword [0x1403a0028]
xor rax, rsp
mov qword [rsp + 0x1a8], rax
movaps xmm0, xmmword [0x14032f5c0]
lea rdi, [rsp + 0x160]
movaps xmmword [rdi + 0x30], xmm0
movaps xmmword [rdi + 0x20], xmm0
movaps xmmword [rdi + 0x10], xmm0
movaps xmmword [rdi], xmm0
lea rsi, [rcx + 0x18]
mov rcx, rsi
call fcn.1401f9b30
mov r8d, 0x40
mov rcx, r14
mov rdx, rax
mov r9, rdi
call fcn.1402fb390
test al, al
je 0x1402f8652
movzx eax, word [rsp + 0x160]
cmp eax, 0x5a4d
jne 0x1402f8687
mov rcx, rsi
call fcn.1401f9b30
movsxd rdi, dword [rsp + 0x19c]
add rdi, rax
mov r8d, 0xf8
mov rcx, r14
mov rdx, rdi
mov r9, rbx
call fcn.1402fb390
test al, al
je 0x1402f86cc
cmp dword [rbx], 0x4550
jne 0x1402f8708
mov sil, 1
test r15, r15
je 0x1402f8666
mov qword [r15], rdi
jmp 0x1402f8666
mov ecx, 1
call fcn.140160660
test al, al
jne 0x1402f874e
xor esi, esi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.1401bb0d0
mov eax, esi
add rsp, 0x1b0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8664
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x15a
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.invalid_e_magic_in_dos_header_of
mov r8d, 0x21
jmp 0x1402f8780
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8664
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x162
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.could_not_read_nt_headers_from
jmp 0x1402f877a
mov ecx, 1
call fcn.140160660
test al, al
je 0x1402f8664
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x168
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.invalid_signature_in_nt_headers_of
mov r8d, 0x23
jmp 0x1402f8780
lea rdx, str....._third_partycrashpadcrashpad_snapshotwinpe_image_reader.cc
lea rdi, [rsp + 0x28]
mov rcx, rdi
mov r8d, 0x154
mov r9d, 1
call fcn.140076020
lea rcx, [rsp + 0x38]
lea rdx, str.could_not_read_dos_header_from
mov r8d, 0x1f
call fcn.1401f9cc0
movzx r8d, byte [r14 + 0x17]
test r8b, r8b
jns 0x1402f8798
mov r8, qword [r14 + 8]
mov r14, qword [r14]
jmp 0x1402f879c
and r8d, 0x7f
mov rcx, rax
mov rdx, r14
call fcn.1401f9cc0
mov rcx, rdi
call fcn.140076510
jmp 0x1402f8664
Function at 0x140001100
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x28
xor eax, eax
lea rcx, [0x140005670]
nop dword [rax]
mov byte [rcx], al
lea rcx, [rcx + 1]
add eax, 0x11
cmp eax, 0x100
jl 0x140001110
xor ecx, ecx
mov qword [rsp + 0x30], rbx
mov edx, 0x1000
mov r8d, 0x3000
lea r9d, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [0x140005640], rax
test rax, rax
jne 0x14000117c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 1
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Unable_to_allocate_buffer:__x_n
mov rcx, rax
call fcn.1400010b0
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
xor ecx, ecx
mov qword [rsp + 0x20], rdi
mov edx, 0x1000
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [0x140005648], rax
mov rdi, rax
test rax, rax
jne 0x1400011dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rdi + 1]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Unable_to_allocate_stack:__x_n
mov rcx, rax
call fcn.1400010b0
lea eax, [rdi - 1]
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
mov rbx, qword [0x140005640]
mov edx, 0xf4
mov rcx, rbx
mov r8d, 0x1000
call sub.VCRUNTIME140.dll_memset
add rdi, 0xff0
lea rcx, [rbx + 0x7dc]
mov qword [0x140005648], rdi
xor eax, eax
mov rdi, qword [rsp + 0x20]
mov qword [0x140005650], rcx
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret

Function at 0x140001470
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor r9d, r9d
xor edx, edx
mov rcx, rax
lea r8d, [r9 + 4]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_setvbuf]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor r9d, r9d
xor edx, edx
mov rcx, rax
lea r8d, [r9 + 4]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_setvbuf]
call fcn.140001100
mov ebx, eax
test eax, eax
je 0x1400014d7
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Failed_to_initalize_n
call fcn.1400010b0
jmp 0x14000154c
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, qword [0x140005650]
mov edx, 1
mov r9, rax
lea r8d, [rdx + 0x46]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rbx, rax
mov ecx, 2
test rax, rax
jne 0x140001521
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Didnt_recieve_any_input_n
call fcn.1400010b0
mov ebx, 0xffffffff
jmp 0x14000154c
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Got_0x_x_bytes_of_input_n
mov rcx, rax
call fcn.1400010b0
mov rcx, rbx
call fcn.1400012e0
mov ebx, eax
test eax, eax
jne 0x14000154c
call fcn.140001390
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Done_n
call fcn.1400010b0
mov eax, ebx
add rsp, 0x20
pop rbx
ret
Function at 0x1400015c0
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rcx + 0x10]
mov rbx, rcx
mov rdi, rdx
mov qword [rcx], rbp
test rdx, rdx
je 0x1400015ab
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x28], rax
mov rsi, rax
cmp rax, 0xf
ja 0x14000157c
cmp rax, 1
jne 0x140001575
movzx eax, byte [rdi]
mov byte [rbx + 0x10], al
mov rax, qword [rsp + 0x28]
mov rdx, qword [rbx]
mov qword [rbx + 8], rax
mov byte [rdx + rax], 0
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
test rax, rax
je 0x14000155c
jmp 0x14000159b
lea rdx, [rsp + 0x28]
xor r8d, r8d
mov rcx, rbx
call fcn.14010a490
mov qword [rbx], rax
mov rbp, rax
mov rax, qword [rsp + 0x28]
mov qword [rbx + 0x10], rax
mov r8, rsi
mov rdx, rdi
mov rcx, rbp
call sub.msvcrt.dll_memcpy
jmp 0x14000155c
lea rcx, section..rdata
call fcn.1401272e0
nop
nop dword [rax + rax]
sub rsp, 0x38
xor r9d, r9d
lea rdx, str.open
mov r8, qword [rcx]
xor ecx, ecx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
nop
add rsp, 0x38
ret
Function at 0x1400024d0
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 0x140002636
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 [0x14012b0c0]
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 [0x14012b0c8]
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 0x140002628
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 0x140002550
xor eax, eax
jmp 0x140002606

Function at 0x140002670
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.1400024d0
mov rsi, rax
test rax, rax
je 0x14000274b
mov rcx, rbx
call fcn.1400021a0
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 0x140002760
add rdi, rdi
xor r14d, r14d
lea r12, [rsi + rax]
jmp 0x1400026dd
add r14, 2
cmp r14, rdi
je 0x140002760
mov ecx, dword [r12 + r14*2]
add rcx, rsi
call fcn.1400021a0
cmp eax, ebp
jne 0x1400026d0
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 0x14000271a
add rax, 1
cmp rax, 0x20
je 0x1400026d0
cmp byte [rbx + rax], 0xf
jne 0x140002710
cmp byte [rbx + rax + 1], 5
jne 0x140002710
movzx r15d, word [rbx + rax - 2]
test r15w, r15w
je 0x1400026d0
mov ecx, 0x10
call fcn.140126110
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 0x14000274b
Function at 0x140002770
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rdi
push rbx
sub rsp, 0x48
mov ecx, pe_nt_image_headers64
call fcn.140126110
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 [0x14012b0e0]
mov rcx, rbx
mov qword [0x1402bb040], rdx
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], rax
call fcn.140002670
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 [0x1402bb040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax], r8
mov qword [rax + 8], r9
mov eax, 0x7972
mov word [rsp + 0x34], ax
call fcn.140002670
movdqa xmm0, xmmword [0x14012b100]
mov rcx, rbx
mov byte [rsp + 0x30], 0
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402bb040]
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x10], r8
mov qword [rax + 0x18], r9
call fcn.140002670
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 [0x1402bb040]
mov qword [rax + 0x20], r8
mov qword [rax + 0x28], r9
mov rax, qword [0x14012b100]
mov qword [rsp + 0x20], rax
call fcn.140002670
mov rcx, rbx
mov dword [rsp + 0x28], 0x656c69
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402bb040]
mov qword [rax + 0x30], r8
mov qword [rax + 0x38], r9
mov rax, qword [0x14012b110]
mov qword [rsp + 0x20], rax
call fcn.140002670
mov rcx, rbx
mov r8, qword [rax]
mov r9, qword [rax + 8]
mov rax, qword [0x1402bb040]
mov qword [rax + 0x40], r8
mov qword [rax + 0x48], r9
mov rax, qword [0x14012b118]
mov qword [rsp + 0x20], rax
call fcn.140002670
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 [0x1402bb040]
mov dword [rsp + 0x30], 0x63656a62
movaps xmmword [rsp + 0x20], xmm0
mov qword [rax + 0x50], r8
mov qword [rax + 0x58], r9
call fcn.140002670
mov rcx, qword [rax]
mov rbx, qword [rax + 8]
mov rax, qword [0x1402bb040]
mov qword [rax + 0x70], rcx
mov qword [rax + 0x78], rbx
add rsp, 0x48
pop rbx
pop rdi
ret
Function at 0x140019820
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.1400268c0
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.1400268c0
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 0x140019890
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1402bb0c4]
mov rbx, rcx
test esi, esi
jle 0x1400199c0
mov rax, qword [0x1402bb0c8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400198db
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140019965
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400198c0
mov rcx, rbx
call fcn.14001a3c0
mov rdi, rax
test rax, rax
je 0x1400199e2
mov rax, qword [0x1402bb0c8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14001a500
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1402bb0c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400199c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14001995e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140019970
add dword [0x1402bb0c4], 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 [0x1402bb0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001995e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140019820
nop dword [rax]
xor esi, esi
jmp 0x1400198e8
mov rax, qword [0x1402bb0c8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140019820
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140019820
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x14001a0b0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x14001a1e0
ja 0x14001a0f8
test edx, edx
je 0x14001a178
mov eax, dword [0x1402bb108]
test eax, eax
je 0x14001a260
mov dword [0x1402bb108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x14001a0e5
mov eax, dword [0x1402bb108]
test eax, eax
je 0x14001a0e5
lea r12, [0x1402bb120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1402bb100]
test rbx, rbx
je 0x14001a164
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 0x14001a288
test eax, eax
jne 0x14001a288
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a138
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001a0e5
mov eax, dword [0x1402bb108]
test eax, eax
jne 0x14001a1f8
mov eax, dword [0x1402bb108]
cmp eax, 1
jne 0x14001a0e5
mov rbx, qword [0x1402bb100]
test rbx, rbx
je 0x14001a1b1
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call fcn.140027368
test rbx, rbx
jne 0x14001a1a0
lea rcx, [0x1402bb120]
mov qword [0x1402bb100], 0
mov dword [0x1402bb108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x14001a0e5
call fcn.140019810
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x1402bb120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1402bb100]
test rbx, rbx
je 0x14001a24c
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 0x14001a278
test rsi, rsi
je 0x14001a278
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a228
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001a182
lea rcx, [0x1402bb120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14001a0db
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a228
jmp 0x14001a24c
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001a138
jmp 0x14001a164

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

Disassembly:
mov r8, qword [0x14028fea0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x14001a3e0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x14001a3e8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x14001a3e0
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x14001a435
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 0x14001a42c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14001a3e0
add rax, 0x28
cmp rax, r9
jne 0x14001a418
xor eax, eax
ret
Function at 0x14001a440
Capabilities:
Parse pe header

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

Function at 0x14001a500
Capabilities:
Parse pe header

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

Function at 0x14001a940
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x1402bb108]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x140019fd0
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 0x14001a01a
mov qword [rax + 8], rsi
lea rsi, [0x1402bb120]
mov dword [rax], edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1402bb100]
mov rcx, rsi
mov qword [0x1402bb100], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140019fc6
or eax, 0xffffffff
jmp 0x140019fc8
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14001a970
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp 0x1400276d0
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x1400276e0
xor eax, eax
ret
jmp 0x140019fb0

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

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14001a9f8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x14001b630
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 0x14001b790
cmp word [rbx], 0
je 0x14001b780
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001b7a0
test al, 0x10
je 0x14001b780
lea rsi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rsi
lea rdi, [0x14028eea0]
lea rbp, [0x14028eea4]
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 0x14001b7af
lea r12, [rax + 0x44c]
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_wcscpy
cmp word [rbx + 0x44c], 0
jne 0x14001b748
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 0x14001b6f2
mov rcx, r12
call sub.msvcrt.dll_wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x14001b6f2
mov rdx, rdi
mov rcx, r12
call sub.msvcrt.dll_wcscat
jmp 0x14001b6f2
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0x14
jmp 0x14001b731
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x14001b731
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x14001b731
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x14001b731