joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001c670
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001c6b0
test ebx, ebx
jle 0x14001c6a0
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.14001b550
test rax, rax
jne 0x14001c68d
add rsp, 0x20
pop rbx
ret

Function at 0x14001c7a0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14001c818
test byte [rbx + 0x40], 0xc
jne 0x14001c7cf
mov eax, dword [0x140143658]
test eax, eax
jne 0x14001c7e0
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.14001a720
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x14001c803
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x14001c803
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x14001c82c
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.14001aa10
call fcn.14001b550
test rax, rax
mov rbx, rax
jne 0x14001c7bf
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rbx + 0x30]
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x14001c84a
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.14001aa10
call fcn.14001c6c0
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14001c8d0
call fcn.14001d9b0
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x14001c908
call fcn.14001b4a0
mov ecx, dword [0x140020678]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14001c960
test esi, esi
je 0x14001c8e6
call fcn.14001c7a0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001c940
mov edx, edi
call fcn.14001da60
call fcn.14001c7a0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001c950
call fcn.14001c7a0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001c7a0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.14001b4a0
mov ecx, dword [0x140020678]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
jne 0x14001c8a5
call fcn.14001b550
mov rbx, rax
jmp 0x14001c8a5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001c8be
call fcn.14001b550
jmp 0x14001c8e6
call fcn.14001b550
mov rbx, rax
jmp 0x14001c8a1
Function at 0x14001c860
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14001c818
test byte [rbx + 0x40], 0xc
jne 0x14001c7cf
mov eax, dword [0x140143658]
test eax, eax
jne 0x14001c7e0
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.14001a720
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x14001c803
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x14001c803
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x14001c82c
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.14001aa10
call fcn.14001b550
test rax, rax
mov rbx, rax
jne 0x14001c7bf
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rbx + 0x30]
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x14001c84a
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.14001aa10
call fcn.14001c6c0
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14001c8d0
call fcn.14001d9b0
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x14001c908
call fcn.14001b4a0
mov ecx, dword [0x140020678]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14001c960
test esi, esi
je 0x14001c8e6
call fcn.14001c7a0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001c940
mov edx, edi
call fcn.14001da60
call fcn.14001c7a0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001c950
call fcn.14001c7a0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001c7a0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.14001b4a0
mov ecx, dword [0x140020678]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
jne 0x14001c8a5
call fcn.14001b550
mov rbx, rax
jmp 0x14001c8a5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001c8be
call fcn.14001b550
jmp 0x14001c8e6
call fcn.14001b550
mov rbx, rax
jmp 0x14001c8a1

Function at 0x14001c970
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
call fcn.14001b4a0
mov ecx, dword [0x140020678]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14001c9e0
test esi, esi
je 0x14001c9c0
call fcn.14001c7a0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001c9f0
mov edx, esi
call fcn.14001da60
call fcn.14001c7a0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.14001c7a0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001c7a0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.14001b550
mov rbx, rax
jmp 0x14001c991
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001c9aa
Function at 0x140011258
Capabilities:
Terminate process

Disassembly:
jmp 0x1400141a0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x1400112f8
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400154f0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140015510
xor al, al
jmp 0x140015591
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140015523
xor al, al
jmp 0x140015591
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001554d
xor al, al
jmp 0x140015591
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140015561
xor al, al
jmp 0x140015591
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140015573
xor al, al
jmp 0x140015591
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001558f
xor al, al
jmp 0x140015591
mov al, 1
add rsp, 0x38
ret
Function at 0x1400113d4
Capabilities:
Parse pe header

Disassembly:
jmp 0x140012150
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x3f0
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x94
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x418]
mov rax, qword [0x14001f180]
xor rax, rbp
mov qword [rbp + 0x3c8], rax
lea rcx, [0x1400250f5]
call fcn.14001141f
mov rax, qword [rbp + 0x3f0]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400121c6
xor eax, eax
jmp 0x140012314
mov rax, qword [rbp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
cmp dword [rax], 0x4550
je 0x1400121ef
xor eax, eax
jmp 0x140012314
lea rax, [rbp + 0x70]
mov rcx, qword [rbp + 0x48]
mov rdi, rax
lea rsi, [rcx + 0x18]
mov ecx, 0xf0
rep movsb byte [rdi], byte [rsi]
mov eax, 8
imul rax, rax, 0
mov eax, dword [rbp + rax + 0xe0]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x178], rax
mov rax, qword [rbp + 0x178]
mov eax, dword [rax + 0x20]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x198], rax
mov rax, qword [rbp + 0x178]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x1b8], rax
mov rax, qword [rbp + 0x178]
mov eax, dword [rax + 0x24]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x1d8], rax
mov dword [rbp + 0x1f4], 0
jmp 0x140012291
mov eax, dword [rbp + 0x1f4]
inc eax
mov dword [rbp + 0x1f4], eax
mov rax, qword [rbp + 0x178]
mov eax, dword [rax + 0x14]
cmp dword [rbp + 0x1f4], eax
jae 0x140012312
mov eax, dword [rbp + 0x1f4]
mov rcx, qword [rbp + 0x198]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x218], rax
mov eax, dword [rbp + 0x1f4]
mov rcx, qword [rbp + 0x1d8]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rbp + 0x1b8]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x238], rax
mov rcx, qword [rbp + 0x218]
call fcn.14001118b
cmp dword [rbp + 0x3f8], eax
jne 0x14001230d
mov rax, qword [rbp + 0x238]
jmp 0x140012314
jmp 0x140012283
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14001bc80]
call fcn.14001139d
mov rax, rdi
mov rcx, qword [rbp + 0x3c8]
xor rcx, rbp
call fcn.14001120d
lea rsp, [rbp + 0x3d0]
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001d84
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001dce
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001dce
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001dce
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001dce
cmp dword [rcx + 0x84], 0xe
jbe 0x140001dce
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001dd0
xor al, al
add rsp, 0x28
ret

Function at 0x140005ab8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400058b4
Function at 0x140009204
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 0x140009234
xor eax, eax
jmp 0x1400092f7
mov rbp, rbx
cmp word [rax], si
je 0x140009259
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140009240
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000923c
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.140009124
movsxd r14, eax
test eax, eax
jne 0x140009297
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000922d
mov rcx, r14
call fcn.1400075f0
mov rdi, rax
test rax, rax
jne 0x1400092b0
xor ecx, ecx
call fcn.140007820
jmp 0x14000928c
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.140009124
test eax, eax
jne 0x1400092e1
mov rcx, rdi
call fcn.140007820
jmp 0x1400092eb
xor ecx, ecx
call fcn.140007820
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 0x14000c520
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.140006cec
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14000c5aa
cmp byte [rbp - 0x21], r15b
je 0x14000c5a5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14000c5e0
call fcn.140009a08
test eax, eax
jne 0x14000c5cc
cmp byte [rbp - 0x21], r15b
je 0x14000c5c4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14000c5e0
cmp byte [rbp - 0x21], r15b
je 0x14000c5dd
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.140007870
test eax, eax
jne 0x14000c680
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140006cec
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14000c61f
cmp byte [rbp - 0x21], r15b
je 0x14000c654
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14000c654
call fcn.140009a08
test eax, eax
jne 0x14000c640
cmp byte [rbp - 0x21], r15b
je 0x14000c639
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14000c654
cmp byte [rbp - 0x21], r15b
je 0x14000c651
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.140007870
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14000c680
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14000c683
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14000c691
mov rcx, rdi
call fcn.140007820
cmp byte [rbp + 0x3f], r15b
je 0x14000c6a0
mov rcx, qword [rbp + 0x27]
call fcn.140007820
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 0x4068e0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x40
cmp byte [0x00410078], 0
je 0x40697e
cmp word [0x00410388], 0xd7b2
jne 0x406913
cmp dword [0x00410390], 0
jbe 0x406913
lea rcx, [0x00410380]
call qword [0x004103a8]
mov ecx, 0xfffffff5
call sub.kernel32.dll_GetStdHandle
mov rcx, rax
lea rdx, str.Runtime_error_____at_0000000000000000
mov r8d, 0x25
lea r9, [rsp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov ecx, 0xfffffff5
call sub.kernel32.dll_GetStdHandle
mov rbx, rax
lea rcx, [0x004069b4]
call fcn.00407020
mov rcx, rbx
mov rdx, rax
mov r8d, 2
lea r9, [rsp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
jmp 0x4069a0
cmp byte [0x0040e02a], 0
jne 0x4069a0
xor rcx, rcx
lea rdx, str.Runtime_error_____at_0000000000000000
lea r8, str.Error
xor r9, r9
call sub.user32.dll_MessageBoxA
add rsp, 0x40
pop rbx
ret

Function at 0x407830
Capabilities:
Check os version

Disassembly:
sub rsp, 0x28
lea rcx, [0x00414c60]
call sub.kernel32.dll_InitializeCriticalSection
mov word [0x00414c88], 0x7f
call sub.kernel32.dll_GetVersion
and eax, 0xff
cmp eax, 6
setae al
mov byte [0x00414c58], al
cmp byte [0x00414c58], 0
je 0x4078cf
lea rcx, [0x004078d4]
call sub.kernel32.dll_GetModuleHandleW
mov rcx, rax
lea rdx, [0x004078ee]
call sub.kernel32.dll_GetProcAddress
mov qword [0x00414c40], rax
lea rcx, [0x004078d4]
call sub.kernel32.dll_GetModuleHandleW
mov rcx, rax
lea rdx, [0x0040790c]
call sub.kernel32.dll_GetProcAddress
mov qword [0x00414c48], rax
lea rcx, [0x004078d4]
call sub.kernel32.dll_GetModuleHandleW
mov rcx, rax
lea rdx, [0x0040792a]
call sub.kernel32.dll_GetProcAddress
mov qword [0x00414c50], rax
add rsp, 0x28
ret

Function at 0x407d90
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x58
lea rcx, [rsp + 0x20]
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [rsp + 0x40]
add rsp, 0x58
ret

Function at 0x407db0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x28
call sub.kernel32.dll_GetVersion
mov ecx, eax
and ecx, 0xff
and eax, 0xff00
shr eax, 8
cmp ecx, 5
jne 0x407dd4
cmp eax, 1
jae 0x407dd9
cmp ecx, 5
jbe 0x407de5
mov dword [0x00410980], 0x7f
jmp 0x407def
mov dword [0x00410980], 0x409
add rsp, 0x28
ret

Function at 0x408010
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
call fcn.00408000
mov ebx, eax
test ebx, ebx
je 0x40805b
cmp dword [0x0040f46c], 0xffffffff
jne 0x408034
mov ecx, 0xe2
call fcn.00406b80
mov ecx, ebx
call fcn.00407fe0
test rax, rax
jne 0x40804d
mov ecx, 0xe2
call fcn.00406b80
jmp 0x40805b
mov ecx, dword [0x0040f46c]
mov rdx, rax
call sub.kernel32.dll_TlsSetValue
add rsp, 0x20
pop rbx
ret

Function at 0x408070
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
cmp byte [0x00414c8c], 0
je 0x4080ab
mov ecx, dword [0x0040f46c]
call sub.kernel32.dll_TlsGetValue
test rax, rax
jne 0x4080bf
call fcn.00408010
mov ecx, dword [0x0040f46c]
call sub.kernel32.dll_TlsGetValue
test rax, rax
jne 0x4080bf
mov rax, qword [0x00414cc0]
jmp 0x4080bf
mov rax, qword gs:[0x58]
movsxd rcx, dword [0x0040f46c]
mov rax, qword [rax + rcx*8]
add rsp, 0x28
ret
Function at 0x409680
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x40
mov rbp, rsp
mov rbx, rcx
mov esi, edx
mov rcx, rbx
call fcn.00407050
mov rcx, rax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x409732
mov ecx, eax
test ecx, 0x400
je 0x409727
test sil, sil
jne 0x4096bf
mov al, 1
jmp 0x40975c
test eax, 0x10
je 0x4096cf
xor rax, rax
jmp 0x40975c
mov rcx, rbx
call fcn.00407050
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW
cmp rax, 0xffffffffffffffff
je 0x40971a
mov rcx, rax
call sub.kernel32.dll_CloseHandle_1
mov al, 1
jmp 0x40975c
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x20
sete al
jmp 0x40975c
test eax, 0x10
sete al
jmp 0x40975c
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409755
cmp eax, 3
je 0x409755
cmp eax, 0x7b
je 0x409755
mov rcx, rbp
mov rdx, rbx
call fcn.00409630
test al, al
jne 0x40975a
xor rax, rax
jmp 0x40975c
mov al, 1
lea rsp, [rbp + 0x40]
pop rbx
pop rsi
pop rbp
ret
Function at 0x409770
Capabilities:
Accept command line arguments

Disassembly:
push rbp
sub rsp, 0x70
mov rbp, rsp
mov qword [rbp + 0x28], rcx
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], 0
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x60], 0
nop
call sub.kernel32.dll_GetCommandLineW_1
mov rcx, qword [rbp + 0x28]
mov rdx, rax
call fcn.00409610
lea rcx, [rbp + 0x60]
mov rax, qword [rbp + 0x28]
mov rdx, qword [rax]
call fcn.004095c0
lea rcx, [rbp + 0x58]
xor rdx, rdx
call fcn.00404d50
lea rcx, [rbp + 0x68]
mov rdx, qword [rbp + 0x58]
call fcn.004095c0
mov rax, qword [rbp + 0x28]
mov rax, qword [rax]
cmp word [rax], 0x22
jne 0x4098bf
mov rcx, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov r8d, 1
call fcn.004074b0
cmp eax, 2
jne 0x409854
xor rax, rax
cmp qword [rbp + 0x68], 0
je 0x409832
mov rax, qword [rbp + 0x68]
mov eax, dword [rax - 4]
mov rdx, qword [rbp + 0x28]
mov rcx, rdx
mov rdx, qword [rdx]
mov r8d, eax
add r8d, 3
mov r9d, 0x3e8
call fcn.00407450
jmp 0x40996a
lea rcx, [rbp + 0x50]
mov rdx, qword [rbp + 0x68]
call fcn.00409560
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x60]
mov r8d, 1
call fcn.004074b0
cmp eax, 2
jne 0x409988
lea rcx, [rbp + 0x48]
mov rdx, qword [rbp + 0x68]
call fcn.00409560
mov rax, qword [rbp + 0x48]
xor rcx, rcx
test rax, rax
je 0x40989a
mov ecx, dword [rax - 4]
mov rdx, qword [rbp + 0x28]
mov rax, rdx
mov rdx, qword [rdx]
mov r8d, ecx
add r8d, 3
mov r9d, 0x3e8
mov rcx, rax
call fcn.00407450
jmp 0x40996a
mov rcx, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov r8d, 1
call fcn.004074b0
cmp eax, 1
jne 0x409908
xor rax, rax
cmp qword [rbp + 0x68], 0
je 0x4098e9
mov rax, qword [rbp + 0x68]
mov eax, dword [rax - 4]
mov rdx, qword [rbp + 0x28]
mov rcx, rdx
mov rdx, qword [rdx]
mov r8d, eax
add r8d, 1
mov r9d, 0x3e8
call fcn.00407450
jmp 0x40996a
lea rcx, [rbp + 0x40]
mov rdx, qword [rbp + 0x68]
call fcn.00409560
mov rcx, qword [rbp + 0x40]
mov rdx, qword [rbp + 0x60]
mov r8d, 1
call fcn.004074b0
cmp eax, 1
jne 0x409988
lea rcx, [rbp + 0x38]
mov rdx, qword [rbp + 0x68]
call fcn.00409560
mov rax, qword [rbp + 0x38]
xor rcx, rcx
test rax, rax
je 0x40994a
mov ecx, dword [rax - 4]
mov rdx, qword [rbp + 0x28]
mov rax, rdx
mov rdx, qword [rdx]
mov r8d, ecx
add r8d, 1
mov r9d, 0x3e8
mov rcx, rax
call fcn.00407450
lea rcx, [rbp + 0x30]
mov rax, qword [rbp + 0x28]
mov rdx, qword [rax]
call fcn.00409440
mov rcx, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x30]
call fcn.00406e10
nop
lea rcx, [rbp + 0x30]
mov edx, 8
call fcn.00406d00
mov rax, qword [rbp + 0x28]
lea rsp, [rbp + 0x70]
pop rbp
ret
Function at 0x140011098
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x1400110d6
cmp word [rcx], 0x5a4d
jne 0x1400110d6
movsxd rdx, dword [rcx + 0x3c]
cmp edx, 0x400
jg 0x1400110d6
call fcn.1400075c9
mov rcx, qword [0x14010d3d0]
mov rbx, rax
call fcn.140015130
cmp byte [rax], 0
jne 0x1400110d6
cmp dword [rbx], 0x4550
je 0x1400110d8
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x1400142a0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.14001a1d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x140014310
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140112b04]
test esi, esi
mov rbx, rcx
jle 0x140014440
mov rax, qword [0x140112b08]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001435b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400143e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140014340
mov rcx, rbx
call fcn.140014d80
test rax, rax
mov rdi, rax
je 0x140014462
mov rax, qword [0x140112b08]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140014ec0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140112b08]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140014447
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400143de
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400143f0
add dword [0x140112b04], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x140112b08]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400143de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400142a0
nop dword [rax]
xor esi, esi
jmp 0x140014368
mov rax, qword [0x140112b08]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.1400142a0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.1400142a0
nop
nop word cs:[rax + rax]
nop dword [rax]