joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140089680
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x20], rbx
push r14
sub rsp, 0x30
mov r14, rdx
mov rbx, rcx
movzx eax, word [rbx]
cmp ax, 0x20
je 0x1400896a0
cmp ax, 9
jne 0x1400896a6
add rbx, 2
jmp 0x140089691
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rdi
test ax, ax
je 0x1400898c6
cmp word [rbx + 2], 0
lea rcx, [rbx + 2]
jne 0x1400896d7
mov word [rdx + 2], ax
mov al, 1
mov byte [rdx], 0
jmp 0x1400898c8
mov byte [rdx], 1
xor sil, sil
mov edx, 0x2b
call fcn.1400bb958
mov rbp, rax
test rax, rax
je 0x1400897b8
lea rdi, [rbp - 2]
cmp rdi, rbx
jbe 0x140089718
nop dword [rax]
movzx eax, word [rdi]
cmp ax, 0x20
je 0x14008970f
cmp ax, 9
jne 0x140089718
sub rdi, 2
cmp rdi, rbx
ja 0x140089700
sub rdi, rbx
lea rdx, str.Ctrl
sar rdi, 1
mov rcx, rbx
inc rdi
mov r8, rdi
call fcn.1400c04c0
test eax, eax
jne 0x14008973d
or sil, 1
jmp 0x140089777
mov r8, rdi
lea rdx, [0x1401004f0]
mov rcx, rbx
call fcn.1400c04c0
test eax, eax
jne 0x140089759
or sil, 4
jmp 0x140089777
mov r8, rdi
lea rdx, str.Shift
mov rcx, rbx
call fcn.1400c04c0
test eax, eax
jne 0x1400898c6
or sil, 0x10
lea rbx, [rbp + 2]
nop dword [rax + rax]
movzx eax, word [rbx]
cmp ax, 0x20
je 0x14008978f
cmp ax, 9
jne 0x140089795
add rbx, 2
jmp 0x140089780
test ax, ax
je 0x1400898c6
mov edx, 0x2b
lea rcx, [rbx + 2]
call fcn.1400bb958
mov rbp, rax
test rax, rax
jne 0x1400896f3
xor ecx, ecx
cmp word [rbx + 2], cx
jne 0x14008987e
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, word [rbx]
mov rdi, rax
call qword [sym.imp.USER32.dll_CharLowerW]
mov rbx, rax
cmp ax, 0xa
jne 0x1400897e6
mov dl, 0xd
jmp 0x140089899
mov rdx, rdi
movzx ecx, bx
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rdx, ax
mov rcx, rdx
shr rcx, 8
cmp cl, 0xff
jne 0x140089837
cmp dl, 0xff
jne 0x140089837
cmp bx, 0x5a
ja 0x140089826
cmp bx, 0x41
jb 0x14008983c
movzx edx, bl
cmp bx, 0x5a
ja 0x140089835
cmp bx, 0x41
jb 0x140089835
mov cl, 1
jmp 0x140089837
lea eax, [rbx - 0x61]
cmp ax, 0x19
ja 0x14008983c
movzx edx, bl
and dl, 0xdf
xor cl, cl
test cl, 0x38
je 0x140089840
xor dl, dl
jmp 0x140089899
movzx eax, cl
and al, 6
cmp al, 6
jne 0x14008984f
or sil, 8
jmp 0x14008986d
test cl, 2
je 0x14008985e
test sil, 3
jne 0x14008985e
or sil, 1
test cl, 4
je 0x14008986d
test sil, 0xc
jne 0x14008986d
or sil, 4
test cl, 1
je 0x140089899
test sil, 0x30
jne 0x140089899
or sil, 0x10
jmp 0x140089899
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140023350
movzx edx, al
movzx eax, dl
mov word [r14 + 2], ax
test sil, 1
je 0x1400898ab
or byte [r14], 8
test sil, 4
je 0x1400898b5
or byte [r14], 0x10
test sil, 0x10
je 0x1400898bf
or byte [r14], 4
test dl, dl
setne al
jmp 0x1400898c8
xor al, al
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
Function at 0x1400a3e80
Capabilities:
Get graphical window text

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx + 0xb8]
test rcx, rcx
je 0x1400a3f5d
mov eax, dword [rbx]
test eax, eax
je 0x1400a3f5d
mov qword [rsp + 0x38], rsi
xor esi, esi
mov qword [rsp + 0x40], rdi
test al, 1
jne 0x1400a3ebc
mov rax, qword [rbx + 0x38]
cmp word [rax], si
je 0x1400a3eda
mov r8d, 0x7fff
lea rdx, [rbx + 0xc4]
call qword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jne 0x1400a3eda
mov word [rbx + 0xc4], si
test byte [rbx], 4
je 0x1400a3ef3
mov rcx, qword [rbx + 0xb8]
lea rdx, [rbx + 0xc0]
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test byte [rbx], 0x20
je 0x1400a3f2e
mov rcx, qword [rbx + 0xb8]
lea rdx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x1400a3f2e
movzx r9d, byte [rbx + 0x78]
lea rdx, [rbx + 0x102c4]
mov ecx, dword [rsp + 0x30]
call fcn.140031a74
test eax, eax
jne 0x1400a3f2e
mov word [rbx + 0x102c4], si
test byte [rbx], 8
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
je 0x1400a3f5d
mov rcx, qword [rbx + 0xb8]
lea rdx, [rbx + 0x100c2]
mov r8d, 0x101
add rsp, 0x20
pop rbx
jmp qword [sym.imp.USER32.dll_GetClassNameW]
add rsp, 0x20
pop rbx
ret

Function at 0x1400a4410
Capabilities:
Check for foreground window switch
Check for time delay via gettickcount
Get graphical window text
Log keystrokes via polling

Disassembly:
sub rsp, 0x38
cmp qword [0x140125e08], 0
mov rax, qword [0x14011f188]
mov byte [rax + 0x7f], 1
je 0x1400a44e8
movzx r8d, byte [0x140125d29]
mov qword [rsp + 0x30], rbx
movzx eax, r8b
and al, 0xc0
neg al
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test r8b, 0xc
cmove edx, ecx
mov ecx, edx
or ecx, 4
test r8b, 0x30
cmove ecx, edx
mov r9d, ecx
or r9d, 2
test r8b, 3
cmove r9d, ecx
mov eax, r9d
and al, 2
neg al
sbb al, al
and al, 3
movzx edx, al
movzx eax, dl
or al, 0x30
test r9b, 4
movzx ebx, al
cmove ebx, edx
or bl, 0xcc
not bl
and bl, byte [0x140125d27]
je 0x1400a44e3
cmp r9d, 8
jne 0x1400a44c6
movzx r8d, word [0x14011fb44]
xor r9d, r9d
movzx edx, byte [reloc.OLEAUT32.dll_SafeArrayGetElemsize]
mov dword [rsp + 0x28], 0xffc3d44d
mov byte [rsp + 0x20], 0
lea ecx, [r9 + 2]
call fcn.14001fbf0
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
xor r8d, r8d
mov byte [rsp + 0x20], 0
movzx edx, bl
xor ecx, ecx
call fcn.140021ee0
mov rbx, qword [rsp + 0x30]
mov ecx, 0x4bf
call qword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test ax, ax
je 0x1400a450c
mov edx, 1
lea ecx, [rdx - 2]
add rsp, 0x38
jmp fcn.1400016f0
add rsp, 0x38
ret
Function at 0x1400d99c0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400d99e8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400d99e8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x10000bae0
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
push r13
sub rsp, 0xb0
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rcx, [rax - 0x78]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov r12d, ebx
xor eax, eax
lock cmpxchg qword [0x100011df8], rdi
je 0x10000bb40
cmp rax, rdi
jne 0x10000bb33
mov r12d, 1
jmp 0x10000bb40
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10000bb19
mov eax, dword [0x100011df0]
cmp eax, 1
jne 0x10000bb55
lea ecx, [rax + 0x1e]
call sub.msvcrt.dll__amsg_exit
jmp 0x10000bbbc
mov eax, dword [0x100011df0]
cmp eax, ebx
jne 0x10000bbb2
mov dword [0x100011df0], 1
lea r13, [0x100001448]
lea rdi, [0x100001430]
mov qword [rsp + 0x30], rdi
mov eax, ebx
mov dword [rsp + 0x24], ebx
cmp rdi, r13
jae 0x10000bba4
cmp eax, ebx
jne 0x10000bba4
mov rcx, qword [rdi]
cmp rcx, rbx
je 0x10000bb99
call rcx
mov dword [rsp + 0x24], eax
add rdi, 8
mov qword [rsp + 0x30], rdi
jmp 0x10000bb82
cmp eax, ebx
je 0x10000bbbc
mov eax, 0xff
jmp 0x10000bd04
mov dword [0x1000115d4], 1
mov eax, dword [0x100011df0]
cmp eax, 1
jne 0x10000bbe4
lea rdx, [0x100001428]
lea rcx, [0x1000013f0]
call sub.msvcrt.dll__initterm
mov dword [0x100011df0], 2
cmp r12d, ebx
jne 0x10000bbf3
mov rax, rbx
xchg qword [0x100011df8], rax
cmp qword [0x100011e10], rbx
je 0x10000bc1b
lea rcx, [0x100011e10]
call fcn.10000c0cc
cmp eax, ebx
je 0x10000bc1b
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x100011e10]
mov rcx, qword [sym.imp.msvcrt.dll__wcmdln]
cmp qword [rcx], rbx
jne 0x10000bc31
mov eax, 0xff
jmp 0x10000bd04
mov rcx, qword [rcx]
mov qword [rsp + 0x28], rcx
mov edx, dword [rsp + 0x20]
cmp word [rcx], 0x20
ja 0x10000bcb6
cmp word [rcx], bx
je 0x10000bc4c
cmp edx, ebx
jne 0x10000bcb6
cmp word [rcx], bx
je 0x10000bc62
cmp word [rcx], 0x20
ja 0x10000bc62
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x10000bc4c
test byte [rsp + 0x7c], 1
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rcx
xor edx, edx
lea rcx, [0x100000000]
call fcn.100002d14
mov dword [0x1000115d0], eax
cmp dword [0x1000115b4], ebx
jne 0x10000bca0
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x1000115d4], ebx
jne 0x10000bcb4
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x1000115d0]
jmp 0x10000bd04
cmp word [rcx], 0x22
jne 0x10000bcc9
mov eax, ebx
cmp edx, ebx
sete al
mov edx, eax
mov dword [rsp + 0x20], eax
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x10000bc3d
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov r12, qword [r11 + 0x20]
mov rsp, r11
pop r13
ret
sub rsp, 0x28
call fcn.100159000
add rsp, 0x28
jmp 0x10000bae0
Function at 0x140002a52
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rsi, rcx
mov rbx, rdx
test rdx, rdx
je 0x140002a71
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov r8, rax
mov rcx, rbx
mov r9, rsi
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.1400215b0

Function at 0x1400056b7
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov qword [rsp + 0x28], rdx
mov rsi, rcx
mov ecx, 2
call qword [fcn.140020fd0]
mov r8, qword [rsp + 0x28]
mov rcx, rsi
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.1400215b0

Function at 0x1400056f6
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
cmp qword [0x1401180f0], 0
jne 0x14000570e
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.1400056b7
lea rsi, [rsp + 0x20]
mov rdx, rcx
mov rcx, rsi
call fcn.140005630
mov rbx, qword [rsp + 0x28]
mov rcx, rsi
call qword [0x1401180f0]
test rbx, rbx
je 0x14000573f
test byte [rbx + 7], 0x40
jne 0x14000573f
mov rcx, rbx
call fcn.140003adc
lea rcx, [0x140022320]
call fcn.14001bdb0
cmp byte [rax], 0
je 0x140005777
mov byte [rax], 0
lea rcx, [0x140022220]
call fcn.14001bdb0
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.140004041
add rsp, 0x38
pop rbx
pop rsi
ret

Function at 0x140005de2
Capabilities:
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
lea r12, [0x1401180c0]
xor ebx, ebx
lea r14, [0x140022320]
mov rsi, rcx
mov rdi, rdx
lea r13, [rsp + 0x20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbp, qword [fcn.140020fd0]
mov ecx, 1
cmp rbx, rdi
jl 0x140005e68
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x14002337b]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rbp
mov rcx, rax
call fcn.1400215b0
mov rcx, r12
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rbp
xor r8d, r8d
mov rdx, r13
mov rcx, rax
mov rax, rbx
shl rax, 4
movups xmm0, xmmword [rsi + rax]
movups xmmword [rsp + 0x20], xmm0
call fcn.140005cbc
mov rcx, r14
call fcn.14001bdb0
cmp byte [rax], 0
jne 0x140005e9a
inc rbx
jmp 0x140005e1b
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x14001ae80
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.140020fd0
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.140020fd0
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 0x14001aef0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140118bb4]
mov rbx, rcx
test esi, esi
jle 0x14001b020
mov rax, qword [0x140118bb8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001af3b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14001afc5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14001af20
mov rcx, rbx
call fcn.14001b940
mov rdi, rax
test rax, rax
je 0x14001b042
mov rax, qword [0x140118bb8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14001ba80
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140118bb8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14001b027
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14001afbe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14001afd0
add dword [0x140118bb4], 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 [0x140118bb8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001afbe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14001ae80
nop dword [rax]
xor esi, esi
jmp 0x14001af48
mov rax, qword [0x140118bb8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14001ae80
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14001ae80
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14001b5b0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140118c20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140118c00]
test rbx, rbx
je 0x14001b60c
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 0x14001b603
test rsi, rsi
je 0x14001b603
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001b5e8
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 0x14001b940
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140112ca0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14001b960
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14001b968
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14001b960
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14001b9bd
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 0x14001b9b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14001b960
add rax, 0x28
cmp rax, r9
jne 0x14001b9a0
xor eax, eax
ret

Function at 0x14001b9c0
Capabilities:
Parse pe header

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

Function at 0x14001ba80
Capabilities:
Parse pe header

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

Function at 0x14001bd50
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x140118ca0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x140118ca8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14001bda0
lea rdx, [0x14001bc60]
mov ecx, eax
mov dword [0x140118c98], eax
call fcn.140021710
test eax, eax
jne 0x14001bda8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14001bd97
call sub.msvcrt.dll_abort
nop
nop
Function at 0x14001bdb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x140112c10]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x14001bde8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14001be50
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x14001be60
mov esi, dword [0x140118c98]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14001bed0
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x14001bf18
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x14001bdd7
mov rcx, rbx
call fcn.14001bcb0
mov qword [rsi + r12*8 + 8], rax
jmp 0x14001bdd7
call fcn.14001bcb0
mov qword [rbx + 0x10], rax
jmp 0x14001bdd7
mov r10d, dword [rsi]
test r10d, r10d
je 0x14001bf7a
mov r9d, dword [0x140022680]
test r9d, r9d
je 0x14001bfa8
lock add dword [0x140118ca0], 1
jne 0x14001bfdc
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x14001bf87
mov eax, dword [rsi]
test eax, eax
je 0x14001bdf1
lock sub dword [0x140118ca0], 1
js 0x14001bdf1
mov rcx, qword [0x140118ca8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x14001bdf1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sub.msvcrt.dll_calloc
mov rsi, rax
test rax, rax
je 0x14001c003
mov qword [rax], rdi
mov ecx, dword [0x140118c98]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14001be2b
call r13
jmp 0x14001be2b
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov rsi, rax
test rax, rax
je 0x14001c003
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x14001bef3
call fcn.14001bd50
mov dword [0x140022680], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14001be7c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x14001bdf1
mov rax, qword [0x140118c90]
lea r12, [rax + 1]
mov qword [0x140118c90], r12
mov qword [rbx + 0x10], r12
jmp 0x14001be97
lock add dword [0x140022684], 1
je 0x14001bf61
mov r8d, dword [0x140022680]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x140022680]
test r8d, r8d
jne 0x14001bf70
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x14001bfd0
jmp 0x14001bf70
mov rcx, qword [0x140118ca8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14001be8a
lock sub dword [0x140118ca0], 1
jmp 0x14001be8a
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x14001c020
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x14001c02a
mov qword [rcx + 8], r8
test r9, r9
je 0x14001c034
cmp qword [rcx], rdx
je 0x14001c038
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x140002374
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov rdx, rcx
mov rcx, qword [rcx + 0x10]
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140002479
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
xor r8d, r8d
mov eax, 0x4550
cmp dword [rcx], eax
cmove r8, rcx
mov qword [rdx + 0x18], r8
cmp dword [r8], eax
jne 0x140002401
mov eax, 0x10b
cmp word [r8 + 0x18], ax
jne 0x1400023ce
mov byte [rdx + 0x20], 0
mov rax, qword [r8 + 0x30]
jmp 0x1400023e2
mov eax, 0x20b
cmp word [r8 + 0x18], ax
jne 0x14000243d
mov byte [rdx + 0x20], 1
mov eax, dword [r8 + 0x34]
mov qword [rdx + 0x28], rax
mov eax, dword [r8 + 0x50]
mov dword [rdx + 0x30], eax
mov eax, dword [r8 + 0x54]
mov dword [rdx + 0x34], eax
mov eax, dword [r8 + 0x28]
mov dword [rdx + 0x38], eax
add rsp, 0x50
pop rbp
ret
lea rax, vtable.std::exception.0
mov qword [rbp - 0x28], rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x10], 0xc000a000
and dword [rbp - 0xc], 0
lea rdx, [0x14008ec40]
lea rcx, [rbp - 0x28]
call sub.msvcrt.dll__CxxThrowException
int3
lea rax, vtable.std::exception.0
mov qword [rbp - 0x28], rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x10], 0xc000007b
and dword [rbp - 0xc], 0
lea rdx, [0x14008ec40]
lea rcx, [rbp - 0x28]
call sub.msvcrt.dll__CxxThrowException
int3
lea rax, vtable.std::exception.0
mov qword [rbp - 0x28], rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x10], 0xc000012f
and dword [rbp - 0xc], 0
lea rdx, [0x14008ec40]
lea rcx, [rbp - 0x28]
call sub.msvcrt.dll__CxxThrowException
int3

Function at 0x140003250
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rax, qword gs:[0x60]
mov ebp, ecx
mov rsi, qword [rax + 0x18]
test rsi, rsi
je 0x1400032c0
add rsi, 0x10
xor edi, edi
mov rbx, qword [rsi]
call qword [sym.imp.ntdll.dll_RtlAcquirePebLock]
jmp 0x1400032a5
movzx edx, word [rbx + 0x58]
mov rcx, qword [rbx + 0x60]
shr rdx, 1
call fcn.1400032d8
xor eax, 0x530cff3
cmp eax, ebp
je 0x1400032ac
mov rbx, qword [rbx]
cmp rbx, rsi
jne 0x140003289
jmp 0x1400032af
mov rdi, rbx
call qword [sym.imp.ntdll.dll_RtlReleasePebLock]
test rdi, rdi
je 0x1400032c0
mov rax, qword [rdi + 0x30]
jmp 0x1400032c2
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret