joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400bf100
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1401bc6a0]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x1400bf16a
mov rcx, rdi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x1400bf179
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x1400bf1b0
cmp eax, 0x103
je 0x1400bf1ba
test eax, eax
js 0x1400bf196
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x1400bf1b0
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x1401bc708]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.14009c230
mov rcx, rax
call fcn.14009c330
mov ecx, 7
int 0x29
ud2

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

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x1400db0f0]
test ecx, ecx
je 0x1400c19f0
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1400c1944
mov rdi, rax
cmp qword [rax + 8], 0
je 0x1400c1944
add rdi, 0x10
jmp 0x1400c19e6
mov ecx, dword [0x1400db0f0]
test ecx, ecx
je 0x1400c1a03
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1400c19e4
mov rsi, rax
test rax, rax
jne 0x1400c19b3
movzx eax, byte [0x1401f71a0]
mov ecx, 0x18
mov edx, 8
call fcn.14000dd00
test rax, rax
je 0x1400c1a26
mov rsi, rax
lea rax, [0x1400db0d8]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400db0f0]
test ecx, ecx
je 0x1400c1a16
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x1400c19e6
test rcx, rcx
je 0x1400c19e6
lock dec qword [rcx]
jne 0x1400c19e6
call fcn.1400c1a40
jmp 0x1400c19e6
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x1400db0d8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c1926
lea rcx, [0x1400db0d8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c1954
lea rcx, [0x1400db0d8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c19ab
mov ecx, 8
mov edx, 0x18
call fcn.14000fd60
ud2
Function at 0x1400c2f20
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rdi, r8
mov rbx, rdx
mov r14, rcx
movzx eax, byte [0x1401f71a0]
mov ecx, 0x10
mov edx, 8
call fcn.14000dd00
test rax, rax
je 0x1400c2fd7
mov rsi, rax
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x1400c3030]
xor edi, edi
xor ecx, ecx
mov rdx, r14
mov r9, rax
call sub.kernel32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x1400c2fca
mov rdi, qword [rsi]
mov rbx, qword [rsi + 8]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x1400c2fa9
mov rdx, qword [rbx + 0x10]
mov rcx, rdi
call fcn.14000dd90
mov edx, 8
mov rcx, rsi
call fcn.14000dd90
call sub.kernel32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov edi, 1
mov rax, rdi
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
mov ecx, 8
mov edx, 0x10
call fcn.14000fd60
ud2

Function at 0x1400c3110
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
sub rsp, 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
mov edx, 0x10
call sub.advapi32.dll_SystemFunction036
test al, al
je 0x1400c3146
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
add rsp, 0x80
pop rsi
ret
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [fcn.1400bd3c0]
mov qword [rsp + 0x48], rax
lea rax, str.fallback_RNG_broken:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rsp + 0x50]
call fcn.140012cc0
ud2
Function at 0x1400c83e0
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x30
mov ecx, dword [0x1400db110]
test ecx, ecx
je 0x1400c84d9
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1400c8410
cmp qword [rax + 8], 0
je 0x1400c8410
add rax, 0x10
jmp 0x1400c84d3
mov ecx, dword [0x1400db110]
test ecx, ecx
je 0x1400c84ec
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1400c84b3
mov rsi, rax
test rax, rax
jne 0x1400c8483
movzx eax, byte [0x1401f71a0]
mov ecx, 0x20
mov edx, 8
call fcn.14000dd00
test rax, rax
je 0x1400c8512
mov rsi, rax
lea rax, [0x1400db0f8]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400db110]
test ecx, ecx
je 0x1400c84ff
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x1400c84b7
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x1400c84bf
xor eax, eax
jmp 0x1400c84d3
call fcn.1400c3110
mov rcx, rax
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x18], rdx
add rsp, 0x30
pop rsi
ret
lea rcx, [0x1400db0f8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c83f5
lea rcx, [0x1400db0f8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c8420
lea rcx, [0x1400db0f8]
call fcn.14009cf00
mov ecx, eax
jmp 0x1400c847b
mov ecx, 8
mov edx, 0x20
call fcn.14000fd60
ud2

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

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xd0
mov r14, rcx
lea rcx, [0x1400db120]
call fcn.140046f5e
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1400c99f1
mov rbx, rax
cmp qword [rax + 8], 0
je 0x1400c99f1
add rbx, 0x10
jmp 0x1400c9acd
lea rsi, [0x1400db120]
mov rcx, rsi
call fcn.140046f5e
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1400c9a6e
mov rbx, rax
test rax, rax
jne 0x1400c9a41
mov ecx, 0x60
mov edx, 8
call fcn.1400c9adf
mov rbx, rax
mov qword [rax], rsi
and qword [rax + 8], 0
mov rcx, rsi
call fcn.140046f5e
mov ecx, eax
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
lea r15, [rbx + 8]
test r14, r14
je 0x1400c9a7c
lea rax, [rsp + 0x28]
mov ecx, 0xb
mov rdi, rax
mov rsi, r14
rep movsq qword [rdi], qword [rsi]
and qword [r14], 0
cmp qword [rax], 0
je 0x1400c9a72
lea rsi, [rsp + 0x30]
jmp 0x1400c9a83
xor ebx, ebx
jmp 0x1400c9acd
lea rcx, [rsp + 0x28]
call fcn.1400c89db
lea rsi, [0x1401beaf8]
lea rdi, [rsp + 0x80]
mov ecx, 0xa
rep movsq qword [rdi], qword [rsi]
lea rax, [rsp + 0x28]
mov ecx, 0xb
mov rdi, rax
mov rsi, r15
rep movsq qword [rdi], qword [rsi]
mov qword [rbx + 8], 1
add rbx, 0x10
lea rsi, [rsp + 0x80]
mov ecx, 0xa
mov rdi, rbx
rep movsq qword [rdi], qword [rsi]
mov rcx, rax
call fcn.1400c89db
mov rax, rbx
add rsp, 0xd0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x1400ce7c1
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
mov rdx, rax
xor rdx, 3
lock cmpxchg qword [rcx], rdx
jne 0x1400ce7c8
test al, 1
je 0x1400ce7e7
test al, 2
jne 0x1400ce7fc
xor rax, 3
add rsp, 0x28
ret
lea rcx, str.assertion_failed:_prev.is_running__
lea r8, [0x1401bfff0]
mov edx, 0x23
jmp 0x1400ce80f
lea rcx, str.assertion_failed:__prev.is_complete__
lea r8, [0x1401bffb0]
mov edx, 0x25
call fcn.140013970
ud2

Function at 0x1400cf152
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov ebx, edx
call fcn.1400cdd0f
mov rcx, qword [rax]
movzx eax, bl
lea r9, [rsp + 0x2c]
mov dword [r9], eax
mov dword [rsp + 0x20], 4
mov edx, 6
mov r8d, 1
call sub.ws2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x1400cf18d
xor eax, eax
jmp 0x1400cf19a
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x30
pop rbx
ret
Function at 0x1400cf3f5
Capabilities:
Send data
Send data on socket

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rbp, r9
mov rbx, r8
mov r14, rdx
mov qword [rsp + 0x28], rcx
mov rax, qword [rsp + 0xc0]
lea rdi, [rsp + 0x3a]
lea r15, [rdx + 0x18]
xor ecx, ecx
cmp qword [rdx + 0x18], 0xffffffffffffffff
cmove r15, rcx
mov r12d, 0x7fffffff
cmp rax, r12
cmovb r12, rax
lea r13, [rsp + 0x52]
lea rsi, [rsp + 0x30]
mov qword [rsp + 0x40], r15
mov rdx, qword [r14 + 0x10]
mov rcx, rsi
mov r8, rbx
call fcn.1400cf14a
mov al, byte [rsp + 0x39]
cmp al, 3
je 0x1400cf564
mov rcx, qword [rsp + 0x30]
cmp al, 2
je 0x1400cf572
mov dl, byte [rsp + 0x38]
movzx r8d, word [rdi + 4]
mov word [r13 + 4], r8w
mov r8d, dword [rdi]
mov dword [r13], r8d
mov qword [rsp + 0x48], rcx
mov byte [rsp + 0x50], dl
mov byte [rsp + 0x51], al
mov rcx, r15
lea rdx, str._Users_halo_Desktop_code_phishing_mpclient_dll_hijack_only_cs_vendor_tokio_src_io_poll_evented.rs
call fcn.1400cdd2d
mov rcx, qword [r15]
mov rdx, rbp
mov r8d, r12d
xor r9d, r9d
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
jne 0x1400cf584
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov rcx, rsi
call fcn.140027a24
cmp al, 0xd
jne 0x1400cf534
mov rax, qword [r15 + 8]
test rax, rax
je 0x1400cf534
mov rcx, qword [rax]
mov rdx, qword [rax + 8]
lock inc qword [rdx]
jle 0x1400cf5b6
mov r15, r14
mov r14, rbx
add rcx, 0x10
mov r8, qword [rax + 0x10]
mov r9b, byte [rax + 0x18]
call fcn.140045d9c
mov rbx, rax
xor ecx, ecx
call fcn.14009b0fb
test rbx, rbx
je 0x1400cf529
mov ecx, 1
mov rdx, rsi
call fcn.140045ec4
mov rsi, rbx
mov rbx, r14
mov r14, r15
mov r15, qword [rsp + 0x40]
mov rcx, rsi
call fcn.1400019bb
cmp al, 0xd
jne 0x1400cf595
mov qword [rsp + 0x30], rsi
mov rcx, r14
lea rdx, [rsp + 0x48]
call fcn.1400ceec7
lea rsi, [rsp + 0x30]
mov rcx, rsi
call fcn.140042344
jmp 0x1400cf44b
mov rax, qword [rsp + 0x28]
mov qword [rax], 2
jmp 0x1400cf5a5
mov rax, qword [rsp + 0x28]
mov qword [rax], 1
mov qword [rax + 8], rcx
jmp 0x1400cf5a5
cdqe
mov rcx, qword [rsp + 0x28]
and qword [rcx], 0
mov qword [rcx + 8], rax
jmp 0x1400cf5a5
mov rax, qword [rsp + 0x28]
mov qword [rax], 1
mov qword [rax + 8], rsi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
Function at 0x1400cf5ee
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
lea rcx, [0x1400db140]
call fcn.140046f5e
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1400cf61d
mov rdi, rax
cmp qword [rax + 8], 0
je 0x1400cf61d
add rdi, 8
jmp 0x1400cf68f
lea rdi, [0x1400db140]
mov rcx, rdi
call fcn.140046f5e
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1400cf68d
mov rsi, rax
test rax, rax
jne 0x1400cf66d
mov ecx, 0x10
mov edx, 8
call fcn.1400c9adf
mov rsi, rax
mov qword [rax], rdi
and qword [rax + 8], 0
mov rcx, rdi
call fcn.140046f5e
mov ecx, eax
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
lea rdi, [rsi + 8]
call fcn.1400cc793
mov rdx, qword [rsi + 8]
lea rcx, [rsp + 0x20]
mov qword [rcx], rdx
mov qword [rsi + 8], rax
call fcn.1400cc7c7
jmp 0x1400cf68f
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret

Function at 0x1400d9a40
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.1400da800
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.1400da800
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 0x1400d9ab0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401f7234]
mov rbx, rcx
test esi, esi
jle 0x1400d9be0
mov rax, qword [0x1401f7238]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400d9afb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400d9b85
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400d9ae0
mov rcx, rbx
call fcn.1400da520
mov rdi, rax
test rax, rax
je 0x1400d9c02
mov rax, qword [0x1401f7238]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400da660
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401f7238]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400d9be7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400d9b7e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x1400d9b90
add dword [0x1401f7234], 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 [0x1401f7238]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.kernel32.dll_VirtualProtect]
test eax, eax
jne 0x1400d9b7e
call qword [sym.imp.kernel32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400d9a40
nop dword [rax]
xor esi, esi
jmp 0x1400d9b08
mov rax, qword [0x1401f7238]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400d9a40
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400d9a40
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400da190
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1401f72a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1401f7280]
test rbx, rbx
je 0x1400da1ec
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 rsi, rsi
je 0x1400da1e3
test eax, eax
jne 0x1400da1e3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400da1c8
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 0x1400da520
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x1400da5a0
Capabilities:
Parse pe header

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

Function at 0x1400da660
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401e5ef0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400da67f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400da688
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140025d40]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140025d50]
mov dword [rax], 1
mov rax, qword [0x140025d60]
mov dword [rax], 1
mov rax, qword [0x140025cf0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140025d30]
mov dword [0x14002c00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140025e10]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140025df0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140025c80]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400066e1
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp - 8], 0
cmp qword [rbp + 0x18], 0
je 0x140006711
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_1
mov rcx, rax
jmp 0x140006716
mov ecx, 0
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14001067d
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400155a0
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140015610
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14002c2b4]
mov rbx, rcx
test esi, esi
jle 0x140015740
mov rax, qword [0x14002c2b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001565b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400156e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140015640
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140015762
mov rax, qword [0x14002c2b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14002c2b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140015747
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400156de
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400156f0
add dword [0x14002c2b4], 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 [0x14002c2b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400156de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140015668
mov rax, qword [0x14002c2b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140015cd0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14002c320]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14002c300]
test rbx, rbx
je 0x140015d2c
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 0x140015d23
test rsi, rsi
je 0x140015d23
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015d08
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 0x140015f40
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140015f58
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140015f60
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret