joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400361c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1402c3164]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
or edi, edi
jle 0x140036370
mov rax, qword [0x1402c3168]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14003620c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140036297
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x1400361f0
mov rcx, r12
call fcn.140036c70
nop
push rax
pop rbp
or rax, rax
je 0x1400363cd
mov rax, qword [0x1402c3168]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.140036da0
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1402c3168]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400363b2
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140036290
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140036320
add dword [0x1402c3164], 1
cmp ebx, 8
jae 0x1400362c8
test bl, 4
jne 0x140036380
or ebx, ebx
je 0x1400362b9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x1400363a0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x1400362b9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x1400362fa
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1402c3168]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.kernel32.dll_VirtualProtect]
test eax, eax
jne 0x140036290
call qword [sym.imp.kernel32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140036150
sub edi, edi
jmp 0x140036217
mov eax, dword [rsi]
push rdi
pop rdi
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x1400362b9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x1400362b9
mov rax, qword [0x1402c3168]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.140036150
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140036150
nop
nop dword [rax]
Function at 0x1400368e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1402c31c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1402c31a0]
test rbx, rbx
je 0x140036934
mov rdi, qword [sym.imp.kernel32.dll_TlsGetValue]
mov rsi, qword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
or eax, eax
jne 0x14003692b
test r12, r12
je 0x14003692b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140036910
lea rcx, [0x1402c31c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140036c70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x1402bd160]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x140036ce9
mov rcx, r10
call fcn.140036b40
or eax, eax
je 0x140036ce9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x140036ce6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
push rdx
pop rax
nop
cmp rcx, rdx
jb 0x140036cdd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x140036ce9
add r8, 0x28
cmp r8, r9
jne 0x140036cc8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x180029370
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
cmp edx, 1
jne 0x18002939e
mov r9, rcx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r8, [0x180021bf0]
xor ecx, ecx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov al, 1
add rsp, 0x38
ret

Function at 0x18002e004
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x18002e03e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x18002e043
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x18002e08c
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x180041fa0]
cmp byte [rcx + rax], 0
je 0x18002e08c
dec r8
sub rdx, 1
jne 0x18002e072
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x18002fb5c
Capabilities:
Parse pe header

Disassembly:
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x18002fb5c
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x18002fbcb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18002fbcb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18002fbcb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18002fbcb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18002fbcb
cmp dword [rcx + 0x84], 0xe
jbe 0x18002fbcb
cmp dword [rcx + 0xf8], 0
je 0x18002fbcb
mov ecx, ebx
call fcn.18002fac8
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.18002fd00
nop
cmp dword [rbp + 0x20], 0
jne 0x18002fc2c
call fcn.1800364b4
cmp eax, 1
jne 0x18002fc1c
xor dl, dl
jmp 0x18002fc26
call fcn.180036480
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x18002fc37
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.18002fb2c
int3

Function at 0x180031fe0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180032008
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180032008
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x1800375b8
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 0x1800375e8
xor eax, eax
jmp 0x1800376ab
mov rbp, rbx
cmp word [rax], si
je 0x18003760d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800375f4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800375f0
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.1800374d8
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x18003764e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800375e1
call fcn.180038130
mov rdi, rax
test rax, rax
jne 0x180037664
xor ecx, ecx
call fcn.180033a40
jmp 0x180037643
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.1800374d8
test eax, eax
jne 0x180037695
mov rcx, rdi
call fcn.180033a40
jmp 0x18003769f
xor ecx, ecx
call fcn.180033a40
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 0x140001a44
Capabilities:
Check for debugger via api

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov dword [rbp - 4], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rcx, rax
lea rax, [rbp - 4]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
call rax
mov eax, dword [rbp - 4]
test eax, eax
setne al
add rsp, 0x30
pop rbp
ret
Function at 0x14000bc20
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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.140017d10
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.140017d10
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x14000bc90
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400e20b4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x14000be40
mov rax, qword [0x1400e20b8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000bcdc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14000bd67
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x14000bcc0
mov rcx, r12
call fcn.14000c740
mov rbp, rax
test rax, rax
je 0x14000be9d
mov rax, qword [0x1400e20b8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.14000c870
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400e20b8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000be82
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000bd60
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000bdf0
add dword [0x1400e20b4], 1
cmp ebx, 8
jae 0x14000bd98
test bl, 4
jne 0x14000be50
test ebx, ebx
je 0x14000bd89
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x14000be70
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x14000bd89
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x14000bdca
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1400e20b8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000bd60
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000bc20
xor edi, edi
jmp 0x14000bce7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x14000bd89
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x14000bd89
mov rax, qword [0x1400e20b8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.14000bc20
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.14000bc20
nop
nop dword [rax]
Function at 0x14000c3b0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1400e2120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e2100]
test rbx, rbx
je 0x14000c404
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14000c3fb
test r12, r12
je 0x14000c3fb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000c3e0
lea rcx, [0x1400e2120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14000c740
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x1400bb6d0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x14000c7b9
mov rcx, r10
call fcn.14000c610
test eax, eax
je 0x14000c7b9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x14000c7b6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x14000c7ad
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x14000c7b9
add r8, 0x28
cmp r8, r9
jne 0x14000c798
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x14000cab0
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x1400e2108]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x14000c440
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 0x14000c493
mov dword [rax], edi
lea rcx, [0x1400e2120]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1400e2100]
lea rcx, [0x1400e2120]
mov qword [0x1400e2100], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
or eax, 0xffffffff
jmp 0x14000c436
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x14000cae0
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp 0x140017fa0
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x140017fb0
xor eax, eax
ret
jmp 0x14000c420

Function at 0x14000cb20
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x14000cb60
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000cb78
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x140075240
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x140075267
call rbp
cmp dword [rax], 4
jne 0x140075284
mov rcx, rdi
call fcn.140075060
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x140075260
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x4017b0
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
sub rsp, 0x48
xor r8d, r8d
mov r9d, 0x20006
mov rcx, 0xffffffff80000001
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4017e4
add rsp, 0x48
ret
lea rax, str.C:Read_The_Rules.exe
mov r9d, 1
xor r8d, r8d
mov rcx, qword [rsp + 0x38]
lea rdx, str.Read_The_Rules
mov dword [rsp + 0x28], 0x15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
add rsp, 0x48
ret

Function at 0x401920
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, 5
mov r13, qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rcx, qword [rdi]
call r12
cmp eax, 0xffffffff
je 0x401aa0
or eax, 7
mov rcx, qword [rdi]
mov edx, eax
call r13
test eax, eax
jne 0x401ab0
mov qword [rsp + 0x20], 0
lea rbx, [rsp + 0x20]
mov dword [rsp + 0x28], 0x5f5e100
jmp 0x40198a
call rbp
cmp dword [rax], 4
jne 0x40199a
mov rdx, rbx
mov rcx, rbx
call fcn.0041bfb0
cmp eax, 0xffffffff
je 0x401983
sub esi, 1
jne 0x401949
lea rcx, [0x004d10b8]
call fcn.00419370
test eax, eax
jne 0x401ac7
mov rcx, qword [0x004ac0f0]
mov r8d, 0x1e
lea rdx, str.Failed_to_set_attributes_for:
call fcn.0049c0f0
mov r8, qword [rdi + 8]
mov rdx, qword [rdi]
mov rcx, qword [0x004ac0f0]
call fcn.0049c0f0
mov r8d, 7
mov rcx, rax
mov rbx, rax
lea rdx, str._after
call fcn.0049c0f0
mov edx, 5
mov rcx, rbx
call fcn.00468550
mov r8d, 9
mov rcx, rax
mov rbx, rax
lea rdx, str._retries.
call fcn.0049c0f0
mov rax, qword [rbx]
mov rax, qword [rax - 0x18]
mov rsi, qword [rbx + rax + 0xf0]
test rsi, rsi
je 0x401ac2
cmp byte [rsi + 0x38], 0
je 0x401a70
movsx edx, byte [rsi + 0x43]
mov rcx, rbx
call fcn.004664c0
mov rcx, rax
call fcn.004666b0
lea rcx, [0x004d10b8]
call fcn.00419610
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rcx, rsi
call fcn.00427660
mov rax, qword [rsi]
lea rcx, [0x004278a0]
mov edx, 0xa
mov rax, qword [rax + 0x30]
cmp rax, rcx
je 0x401a3e
mov rcx, rsi
call rax
movsx edx, al
jmp 0x401a3e
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov eax, 1
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call fcn.0049c8a0
mov ecx, eax
call fcn.0049ce30
lea rcx, [0x004d10b8]
mov rbx, rax
call fcn.00419610
mov rcx, rbx
call fcn.0040d780
nop
nop word cs:[rax + rax]
Function at 0x40c430
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004d16c4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40c5b8
mov rax, qword [0x004d16c8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40c47c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40c505
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40c460
mov rcx, rbx
call fcn.0040d0d0
test rax, rax
mov r12, rax
je 0x40c5ed
mov rax, qword [0x004d16c8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.0040d200
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004d16c8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c5d0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40c4fe
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40c560
add dword [0x004d16c4], 1
cmp edi, 8
jae 0x40c533
test dil, 4
jne 0x40c5a4
test edi, edi
je 0x40c528
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40c5bf
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40c528
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40c54c
jmp 0x40c528
add rsi, qword [0x004d16c8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c4fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004a3300
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40c528
xor esi, esi
jmp 0x40c487
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40c528
mov rax, qword [0x004d16c8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.004a3300
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004a3300
nop
nop dword [rax]

Function at 0x40cd40
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004d19a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004d1980]
test rbx, rbx
je 0x40cd94
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40cd8b
test rsi, rsi
je 0x40cd8b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40cd70
lea rcx, [0x004d19a0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40d0d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ac6b0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40d13d
mov rcx, r8
call fcn.0040cfb0
test eax, eax
je 0x40d13d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40d13d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40d134
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d13f
add rax, 0x28
cmp rax, r9
jne 0x40d120
xor eax, eax
add rsp, 0x28
ret

Function at 0x419a40
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a4158], eax
je 0x419a5a
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x419f60
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x419f83
call fcn.00419900
cmp eax, 1
je 0x419f8e
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x41a005
mov eax, 0x28
jmp 0x419fea
add rax, 1
cmp rax, 0x6b
je 0x419ff7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x419fe0
cmp eax, 0x6a
jne 0x41a00a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x419ff7