joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140030754
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, [0x140055ac0]
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 0x1400307ab
cmp word [rdx], r13w
jne 0x1400307ab
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400307b0
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400308d5
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400308f6
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400307e9
mov rdx, r9
mov word [rbx], cx
jmp 0x140030810
cmp r9, r8
jae 0x140030820
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 0x1400307ca
jmp 0x1400308d5
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 0x1400308ca
cmp dword [rsp + 0x80], esi
je 0x1400308ca
lea r8, [0x140055ac0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400308a2
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140030872
mov word [rbx], r13w
jmp 0x1400308d2
mov ecx, 0xd
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 0x14003087f
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400308d2
cmp word [rsp + 0x70], r13w
jne 0x1400308af
cmp rbx, r14
je 0x14003086c
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400313bc
cmp word [rsp + 0x70], r13w
je 0x1400308d5
mov ecx, 0xd
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, [0x140055ac0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400308cf
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400308d5
Function at 0x140034500
Capabilities:
Query environment variable

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 r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x140034530
xor eax, eax
jmp 0x1400345f3
mov rbp, rbx
cmp word [rax], si
je 0x140034555
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14003453c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140034538
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.140032b78
movsxd r14, eax
test eax, eax
jne 0x140034593
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140034529
mov rcx, r14
call fcn.14002cbf8
mov rdi, rax
test rax, rax
jne 0x1400345ac
xor ecx, ecx
call fcn.14002a064
jmp 0x140034588
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140032b78
test eax, eax
jne 0x1400345dd
mov rcx, rdi
call fcn.14002a064
jmp 0x1400345e7
xor ecx, ecx
call fcn.14002a064
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x14003748c
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.14002a418
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 0x14003752d
cmp ebx, dword [rsp + 0x30]
je 0x140037526
test esi, esi
je 0x140037526
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140037501
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14003750e
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400374eb
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140037512
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14003752f
mov eax, 1
jmp 0x14003752f
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14003a6bc
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14001e3d0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14003a746
cmp byte [rbp - 0x21], r15b
je 0x14003a741
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14003a77c
call fcn.14002aa98
test eax, eax
jne 0x14003a768
cmp byte [rbp - 0x21], r15b
je 0x14003a760
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14003a77c
cmp byte [rbp - 0x21], r15b
je 0x14003a779
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400263c0
test eax, eax
jne 0x14003a81c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14001e3d0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14003a7bb
cmp byte [rbp - 0x21], r15b
je 0x14003a7f0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14003a7f0
call fcn.14002aa98
test eax, eax
jne 0x14003a7dc
cmp byte [rbp - 0x21], r15b
je 0x14003a7d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14003a7f0
cmp byte [rbp - 0x21], r15b
je 0x14003a7ed
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400263c0
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14003a81c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14003a81f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14003a82d
mov rcx, rdi
call fcn.14002a064
cmp byte [rbp + 0x3f], r15b
je 0x14003a83c
mov rcx, qword [rbp + 0x27]
call fcn.14002a064
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x14003c160
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14003c188
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14003c188
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x1802a473c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
or byte [rsp + rsi*8 + 7], 0x93
pop rdx
movabs rdx, 0
add rsi, rsi
sbb si, 0xbd89
sub r10, rdx
and si, 0x6aa
lea rsi, [0x1802b8e90]
mov r9, rax
call fcn.1802c54c9
mov rdx, qword [r11]
mov edi, 0x481b0423
movsx r8d, di
push r8
lea r11, [r11 + rdi - 0x481b041b]
inc dword [rsp + r8 - 0x421]
movzx ebp, word [rsp + rdi - 0x481b041f]
or qword [rsp + rdi - 0x481b0423], rbp
mov r8, rdx
mov eax, ebp
ror byte [rsp + rax + 6], 0x65
mov rbx, r11
sar al, 0xc5
neg byte [rsp + rdi - 0x481b0423]
movzx ecx, ax
pop rbp
jp 0x1802bcd29
neg ax
or r10d, 0x9680bd9b
sal r10, 0x41
xor bp, ax
or r10, 0x31b31039
setbe r10b
adc rax, rsp
mov r10w, word [rax]
sub rsi, 2
jmp 0x1802b596c
push 0xffffffffad8c139b
push 0xffffffffbba0709f
mov word [rsi], r10w
push 0x6d816525
lea rsp, [rsp + 0x18]
jmp fcn.18029b263
push 0x3008ddb1
mov esi, dword [rsp + 4]
mov r10, r8
jmp 0x180294ec5
Function at 0x14001c0e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rbp, rcx
mov esi, edx
mov rdi, r8
cmp edx, dword [rcx + 0x20]
jae 0x14001c27a
mov eax, edx
lea rbx, [rax + rax*2]
shl rbx, 4
add rbx, qword [rcx + 0x18]
mov r12d, dword [rbx + 8]
test r12d, r12d
jle 0x14001c24a
mov r11d, dword [rbx + 0xc]
test r11d, r11d
jle 0x14001c24a
test r8, r8
je 0x14001c1c0
mov r10d, dword [rbx + 0x1c]
test r10d, r10d
jne 0x14001c240
lea r12, [rsp + 0x48]
mov rcx, qword [rcx + 0x28]
mov rdx, r12
call fcn.14001baf0
test eax, eax
js 0x14001c1b2
mov r9d, dword [rbp]
mov rcx, qword [rsp + 0x48]
mov rdx, rdi
test r9d, r9d
jne 0x14001c1e0
call sub.avcodec_60.dll_av_packet_move_ref
mov r8d, dword [rbp]
mov rax, qword [rsp + 0x48]
test r8d, r8d
jne 0x14001c1d0
mov r13, qword [rax + 0x40]
add r13, qword [rax + 8]
mov rcx, qword [rbx]
mov r8d, 1
mov rdx, r12
call sub.avutil_58.dll_av_fifo_write
test eax, eax
js 0x14001c1f0
mov r8, r13
mov edx, esi
mov rcx, rbp
call fcn.14001bdb0
mov rax, qword [rbx + 0x20]
add rax, 1
mov qword [rbx + 0x20], rax
cmp rax, qword [rbx + 0x28]
jae 0x14001c1c0
xor eax, eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov edx, esi
mov rcx, rbp
call fcn.14001bc50
xor eax, eax
jmp 0x14001c1b2
mov r13, qword [rax + 0x1d8]
add r13, qword [rax + 0x88]
jmp 0x14001c17c
call sub.avutil_58.dll_av_frame_move_ref
jmp 0x14001c166
mov ecx, dword [rbp]
mov rdx, qword [rsp + 0x48]
mov dword [rsp + 0x3c], eax
test ecx, ecx
mov rcx, rdi
jne 0x14001c230
call sub.avcodec_60.dll_av_packet_move_ref
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rbp + 0x28]
mov rdx, r12
mov dword [rsp + 0x3c], eax
call fcn.14001bb50
mov eax, dword [rsp + 0x3c]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call sub.avutil_58.dll_av_frame_move_ref
mov eax, dword [rsp + 0x3c]
jmp 0x14001c20c
mov eax, 0xdfb9b0bb
jmp 0x14001c1b2
lea rax, str.D:_code_ffmpeg_src_fftools_sync_queue.c
mov dword [rsp + 0x28], 0xf4
lea r9, str.st__tb.num___0__st__tb.den___0
mov qword [rsp + 0x20], rax
lea r8, [0x14004f0dc]
xor edx, edx
xor ecx, ecx
call sub.avutil_58.dll_av_log
call sub.msvcrt.dll_abort
lea rax, str.D:_code_ffmpeg_src_fftools_sync_queue.c
mov dword [rsp + 0x28], 0xf1
lea r9, [0x14004f0c0]
mov qword [rsp + 0x20], rax
jmp 0x14001c265
Function at 0x14001d270
Capabilities:
Accept command line arguments

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov dword [0x14005a0e8], 0
mov qword [rsp + 0x48], rdx
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [0x14005a0e8]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rsi, rax
mov eax, dword [0x14005a0e8]
test eax, eax
jle 0x14001d3f4
test rsi, rsi
je 0x14001d3f4
mov rdi, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ebp, ebp
xor ebx, ebx
nop dword [rax]
mov r8, qword [rsi + rbp*8]
xor edx, edx
mov ecx, 0xfde9
add rbp, 1
mov qword [rsp + 0x38], 0
mov r9d, 0xffffffff
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call rdi
add ebx, eax
mov eax, dword [0x14005a0e8]
cmp eax, ebp
jg 0x14001d2d0
add eax, 1
movsxd rdx, ebx
cdqe
lea rcx, [rdx + rax*8]
call sub.avutil_58.dll_av_mallocz
mov qword [0x14005a0f0], rax
mov rbp, rax
mov eax, dword [0x14005a0e8]
lea r12d, [rax + 1]
movsxd r12, r12d
shl r12, 3
test rbp, rbp
je 0x14001d405
mov rdx, rbp
xor r15d, r15d
xor r13d, r13d
test eax, eax
jg 0x14001d36a
jmp 0x14001d3cb
mov rdx, qword [0x14005a0f0]
mov r15, rax
movsxd rax, r13d
mov r8, qword [rsi + r15*8]
mov r9d, 0xffffffff
mov ecx, 0xfde9
add rax, r12
add rax, rbp
mov qword [rdx + r15*8], rax
mov edx, ebx
sub edx, r13d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], edx
xor edx, edx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
call rdi
add r13d, eax
lea rax, [r15 + 1]
cmp dword [0x14005a0e8], eax
jg 0x14001d360
mov rax, qword [0x14005a0f0]
add r15d, 1
movsxd r15, r15d
lea rbp, [rax + r15*8]
mov qword [rbp], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x14005a0e8]
mov rdi, qword [rsp + 0x48]
mov dword [r14], eax
mov rax, qword [0x14005a0f0]
mov qword [rdi], rax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.KERNEL32.dll_LocalFree]

Function at 0x140025170
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x48
cmp qword [0x14005a238], 0
je 0x140025200
mov eax, dword [0x14005a230]
test eax, eax
je 0x1400251e0
lea rax, [rsp + 0x3c]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], 0
mov rcx, qword [0x14005a238]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x1400251f8
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x1400251f8
lea rdx, [rsp + 0x37]
mov r8d, 1
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__read]
movzx eax, byte [rsp + 0x37]
add rsp, 0x48
ret
call sub.msvcrt.dll__kbhit
test eax, eax
je 0x1400251f8
call sub.msvcrt.dll__getch
add rsp, 0x48
ret
mov eax, 0xffffffff
jmp 0x1400251d8
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x38]
mov qword [0x14005a238], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
sete al
movzx eax, al
mov dword [0x14005a230], eax
jmp 0x140025188
Function at 0x140030f40
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.140043fa0
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.140043fa0
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 0x140030fb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14005a324]
mov rbx, rcx
test esi, esi
jle 0x1400310e0
mov rax, qword [0x14005a328]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140030ffb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140031085
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140030fe0
mov rcx, rbx
call fcn.140031a00
mov rdi, rax
test rax, rax
je 0x140031102
mov rax, qword [0x14005a328]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140031b40
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14005a328]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400310e7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14003107e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140031090
add dword [0x14005a324], 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 [0x14005a328]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003107e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140030f40
nop dword [rax]
xor esi, esi
jmp 0x140031008
mov rax, qword [0x14005a328]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140030f40
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140030f40
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140031670
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14005a380]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14005a360]
test rbx, rbx
je 0x1400316cc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x1400316c3
test rsi, rsi
je 0x1400316c3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400316a8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140031a00
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140054650]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140031a20
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140031a28
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140031a20
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140031a7d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140031a74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140031a20
add rax, 0x28
cmp rax, r9
jne 0x140031a60
xor eax, eax
ret

Function at 0x140031a80
Capabilities:
Parse pe header

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

Function at 0x140031b40
Capabilities:
Parse pe header

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

Function at 0x140033b00
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0xa8
mov rax, qword [0x140054700]
mov rdx, qword [rax]
mov qword [rsp + 0x98], rdx
xor edx, edx
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x7b], 0
mov qword [rsp + 0x83], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140033c1a
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x140033bf2
add rax, 1
cmp rax, 0x6b
je 0x140033c0f
cmp byte [rcx + rax], 0
jne 0x140033be8
movsxd rdx, eax
cmp eax, 0x6a
je 0x140033c0f
add eax, 1
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x140033c03
Function at 0x140033fb0
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x14005a440], 1
je 0x140034028
lea rdi, [0x14005a440]
mov rcx, rdi
call fcn.140033880
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.140033190
mov esi, dword [0x14005a440]
test esi, esi
jne 0x140034038
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400450d8], eax
cmp eax, 0xffffffff
je 0x1400449c6
mov dword [0x14005a440], 1
mov rcx, rbp
call fcn.140033480
test rbx, rbx
je 0x140034028
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.140033c30
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x140034008
mov ecx, 2
call qword [fcn.140043fa0]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140034008
call sub.msvcrt.dll_abort
nop

Function at 0x140034060
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.140033d40
cmp qword [0x140060048], 0
mov rbx, rax
je 0x140034178
test rax, rax
je 0x140034178
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.140033780
cmp eax, 1
je 0x140034186
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je fcn.1400449cc
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400450d8]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, 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 0x14003418c
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.140033b00
nop
jmp fcn.1400449cc

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

Disassembly:
sub rsp, 0x28
call fcn.140033fb0
mov ecx, dword [0x1400450d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400341c0
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140034060

Function at 0x140034fc0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140033fb0
mov ecx, dword [0x1400450d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140034fe8
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.140034060
test rax, rax
jne 0x140034fda
add rsp, 0x28
ret
Function at 0x140035050
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140033fb0
mov ecx, dword [0x1400450d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140035078
add rax, 0x18
add rsp, 0x28
ret
call fcn.140034060
test rax, rax
jne 0x14003506a
jmp 0x14003506e

Function at 0x140035190
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14005a448]
test eax, eax
jne 0x1400351a8
xor eax, eax
add rsp, 0x28
ret
call fcn.140033fb0
mov ecx, dword [0x1400450d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400351d8
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x14003519e
test byte [rax + 0x40], 3
je 0x14003519e
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x1400351a0
call fcn.140034060
test rax, rax
jne 0x1400351be
jmp 0x14003519e

Function at 0x1400351f0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.140033fb0
mov ecx, dword [0x1400450d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140035230
test ebx, ebx
jle 0x140035220
lock add dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
lock sub dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
call fcn.140034060
test rax, rax
jne 0x14003520d
add rsp, 0x20
pop rbx
ret