joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140006be7
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 0x48]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_TerminateProcess]
call rax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x18], 1
nop
add rsp, 0x20
pop rbp
ret

Function at 0x14000a360
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
lea rax, [rbp - 8]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
call rax
test eax, eax
jne 0x14000a3a3
mov eax, 0
jmp 0x14000a3d7
mov rax, qword [rbp - 8]
mov rcx, qword [rbp + 0x10]
mov edx, dword [rbp + 0x18]
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
call rax
mov rax, qword [rbp - 8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov eax, 1
add rsp, 0x40
pop rbp
ret

Function at 0x14000fd3a
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov dword [rbp - 0x20], 0x61707865
mov dword [rbp - 0x1c], 0x3120646e
mov dword [rbp - 0x18], 0x79622d36
mov dword [rbp - 0x14], 0x6b206574
mov dword [rbp - 4], 0
jmp 0x14000fdd2
mov dword [rbp - 8], 0
jmp 0x14000fdc8
mov eax, dword [rbp - 4]
movsxd rdx, eax
imul rdx, rdx, 0x66666667
shr rdx, 0x20
sar edx, 3
sar eax, 0x1f
mov ecx, edx
sub ecx, eax
mov edx, dword [rbp - 4]
mov eax, dword [rbp - 8]
add eax, edx
movsxd rdx, eax
mov rax, qword [rbp + 0x20]
add rdx, rax
mov eax, dword [rbp - 8]
cdqe
movsxd rcx, ecx
shl rcx, 2
add rcx, rbp
add rax, rcx
sub rax, 0x20
movzx eax, byte [rax]
mov byte [rdx], al
add dword [rbp - 8], 1
cmp dword [rbp - 8], 3
jle 0x14000fd7c
add dword [rbp - 4], 0x14
cmp dword [rbp - 4], 0x3f
jle 0x14000fd73
mov dword [rbp - 4], 0
jmp 0x14000fe4b
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 4
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 0x2c
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x18]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 0x18
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
add dword [rbp - 4], 1
cmp dword [rbp - 4], 0xf
jle 0x14000fde1
mov rax, qword [rbp + 0x20]
mov rcx, rax
call dbg.s20_hash
nop
add rsp, 0x40
pop rbp
ret
Function at 0x14000fe64
Capabilities:
Contain obfuscated stackstrings
Encrypt data using salsa20 or chacha

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov dword [rbp - 0x20], 0x61707865
mov dword [rbp - 0x1c], 0x3320646e
mov dword [rbp - 0x18], 0x79622d32
mov dword [rbp - 0x14], 0x6b206574
mov dword [rbp - 4], 0
jmp 0x14000fefc
mov dword [rbp - 8], 0
jmp 0x14000fef2
mov eax, dword [rbp - 4]
movsxd rdx, eax
imul rdx, rdx, 0x66666667
shr rdx, 0x20
sar edx, 3
sar eax, 0x1f
mov ecx, edx
sub ecx, eax
mov edx, dword [rbp - 4]
mov eax, dword [rbp - 8]
add eax, edx
movsxd rdx, eax
mov rax, qword [rbp + 0x20]
add rdx, rax
mov eax, dword [rbp - 8]
cdqe
movsxd rcx, ecx
shl rcx, 2
add rcx, rbp
add rax, rcx
sub rax, 0x20
movzx eax, byte [rax]
mov byte [rdx], al
add dword [rbp - 8], 1
cmp dword [rbp - 8], 3
jle 0x14000fea6
add dword [rbp - 4], 0x14
cmp dword [rbp - 4], 0x3f
jle 0x14000fe9d
mov dword [rbp - 4], 0
jmp 0x14000ff78
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 4
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
mov eax, dword [rbp - 4]
cdqe
lea rdx, [rax + 0x10]
mov rax, qword [rbp + 0x10]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 0x2c
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x18]
add rax, rdx
mov edx, dword [rbp - 4]
add edx, 0x18
movsxd rcx, edx
mov rdx, qword [rbp + 0x20]
add rdx, rcx
movzx eax, byte [rax]
mov byte [rdx], al
add dword [rbp - 4], 1
cmp dword [rbp - 4], 0xf
jle 0x14000ff0b
mov rax, qword [rbp + 0x20]
mov rcx, rax
call dbg.s20_hash
nop
add rsp, 0x40
pop rbp
ret
Function at 0x14001880e
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
sub rsp, 0x450
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3e0], rcx
mov rax, qword [rbp + 0x3e0]
mov rax, qword [rax + 8]
mov qword [rbp + 0x3c8], rax
mov rax, qword [rbp + 0x3e0]
mov r8d, 0x298
lea rdx, str.libs_select_group.c
mov rcx, rax
call dbg.safe_free_internal
mov dword [rbp + 0x3c4], 0
mov ecx, 0xfffffff6
mov rax, qword [sym.imp.KERNEL32.dll_GetStdHandle]
call rax
mov rcx, rax
lea rdx, [rbp - 0x44]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0x400
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
jne 0x1400188d2
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.No_more_data_from_stdin_n
mov rdx, rax
call sym.fprintf_4
mov rax, qword [rbp + 0x3c8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x14001891b
mov ecx, dword [rbp - 0x44]
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x3c8]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
test eax, eax
jne 0x14001885d
lea rax, str.stdin:_Couldnt_write_to_stdin_pipe
mov rcx, rax
call dbg.nbdie
jmp 0x14001885d
add rsp, 0x450
pop rbp
ret

Function at 0x140018924
Capabilities:
Create pipe
Create thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov r8d, 0x2b5
lea rax, str.libs_select_group.c
mov rdx, rax
mov ecx, 0x10
call dbg.safe_malloc_internal
mov qword [rbp - 8], rax
mov rax, qword [0x140035090]
test rax, rax
je 0x140018962
mov rax, qword [0x140035090]
jmp 0x1400189f4
lea rdx, [rbp - 0x20]
lea rax, [rbp - 0x18]
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreatePipe]
call rax
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 8]
mov qword [rax], rdx
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [dbg.stdin_thread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x1400189e5
lea rax, str.stdin:_Couldnt_create_thread
mov rcx, rax
call dbg.nbdie
mov rax, qword [rbp - 0x18]
mov qword [0x140035090], rax
mov rax, qword [rbp - 0x18]
add rsp, 0x50
pop rbp
ret
Function at 0x140018a00
Capabilities:
Initialize winsock library

Disassembly:
push rbp
sub rsp, 0x1c0
lea rbp, [rsp + 0x80]
mov word [rbp + 0x13e], 0x202
movzx eax, word [rbp + 0x13e]
lea rdx, [rbp - 0x60]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x138], eax
cmp dword [rbp + 0x138], 0x276c
je 0x140018aa1
cmp dword [rbp + 0x138], 0x276c
jg 0x140018ac9
cmp dword [rbp + 0x138], 0x276b
je 0x140018a97
cmp dword [rbp + 0x138], 0x276b
jg 0x140018ac9
cmp dword [rbp + 0x138], 0x2753
je 0x140018ab5
cmp dword [rbp + 0x138], 0x2753
jg 0x140018ac9
cmp dword [rbp + 0x138], 0x271e
je 0x140018abf
cmp dword [rbp + 0x138], 0x2734
je 0x140018aab
jmp 0x140018ac9
mov ecx, 1
call sym.exit
mov ecx, 1
call sym.exit
mov ecx, 1
call sym.exit
mov ecx, 1
call sym.exit
mov ecx, 1
call sym.exit
nop
add rsp, 0x1c0
pop rbp
ret

Function at 0x140018ad3
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp + 0x10], rcx
mov eax, edx
mov dword [rbp + 0x20], r8d
mov word [rbp + 0x18], ax
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
jne 0x140018b1a
lea rax, str.tcp:_couldnt_create_socket
mov rcx, rax
call dbg.nbdie
cmp dword [rbp + 0x20], 0
je 0x140018b44
mov dword [rbp - 0x34], 1
mov eax, dword [rbp - 4]
cdqe
lea rdx, [rbp - 0x34]
mov r8, rdx
mov edx, 0x8004667e
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_ioctlsocket]
call rax
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140018b69
mov eax, 0xffffffff
jmp 0x140018c0d
lea rax, [serv_addr.sin_family]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [serv_addr.sin_family], 2
movzx eax, word [rbp + 0x18]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [serv_addr.sin_port], ax
mov rax, qword [rbp - 0x10]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [serv_addr.sin_family]
lea rcx, [rdx + 4]
mov rdx, rax
call sym.memcpy
mov eax, dword [rbp - 4]
cdqe
lea rdx, [serv_addr.sin_family]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0
jns 0x140018c0a
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0x2733
je 0x140018c0a
lea rax, str.tcp:_couldnt_connect_to_host
mov rcx, rax
call dbg.nberror
mov eax, 0xffffffff
jmp 0x140018c0d
mov eax, dword [rbp - 4]
add rsp, 0x60
pop rbp
ret
Function at 0x140018c57
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov eax, edx
mov word [rbp + 0x18], ax
lea rax, [serv_addr.sin_family]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [serv_addr.sin_family], 2
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [serv_addr.sin_addr], eax
movzx eax, word [rbp + 0x18]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [serv_addr.sin_port], ax
mov eax, dword [serv_addr.sin_addr]
cmp eax, 0xffffffff
jne 0x140018cc3
lea rax, str.tcp:_couldnt_parse_local_address
mov rcx, rax
call dbg.nbdie
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
jns 0x140018cf6
lea rax, str.tcp:_couldnt_create_socket
mov rcx, rax
call dbg.nbdie
jmp 0x140018d4d
mov eax, dword [rbp - 4]
cdqe
lea rdx, [serv_addr.sin_family]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_bind]
call rax
test eax, eax
jns 0x140018d24
lea rax, str.tcp:_couldnt_bind_to_socket
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
cdqe
mov edx, 0x14
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_listen]
call rax
test eax, eax
jns 0x140018d4d
lea rax, str.tcp:_couldnt_listen_on_socket
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
add rsp, 0x40
pop rbp
ret

Function at 0x140018ddb
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov rax, qword [rbp + 0x20]
mov ecx, eax
mov eax, dword [rbp + 0x10]
cdqe
mov rdx, qword [rbp + 0x18]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cdqe
add rsp, 0x20
pop rbp
ret

Function at 0x140018e1a
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov rax, qword [rbp + 0x20]
mov ecx, eax
mov eax, dword [rbp + 0x10]
cdqe
mov rdx, qword [rbp + 0x18]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
cdqe
add rsp, 0x20
pop rbp
ret
Function at 0x140019143
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov eax, ecx
mov qword [rbp + 0x18], rdx
mov word [rbp + 0x10], ax
mov dword [rbp - 8], 1
mov r8d, 0x11
mov edx, 2
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
jns 0x14001918d
lea rax, str.udp:_couldnt_create_socket
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
cdqe
lea rdx, [rbp - 8]
mov dword [rsp + 0x20], 4
mov r9, rdx
mov r8d, 0x20
mov edx, 0xffff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_setsockopt]
call rax
test eax, eax
jns 0x1400191cb
lea rax, str.udp:_couldnt_set_socket_to_SO_BROADCAST
mov rcx, rax
call dbg.nbdie
mov rax, qword [rbp + 0x18]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [sox.sin_addr], eax
mov word [sox.sin_family], 2
movzx eax, word [rbp + 0x10]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [sox.sin_port], ax
mov eax, dword [sox.sin_addr]
cmp eax, 0xffffffff
jne 0x14001920e
lea rax, str.udp:_couldnt_parse_local_address
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
cdqe
lea rdx, [sox.sin_family]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_bind]
call rax
test eax, eax
jns 0x14001923c
lea rax, str.udp:_couldnt_bind_to_port__are_you_running_as_root__
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
add rsp, 0x50
pop rbp
ret

Function at 0x140019245
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov dword [rbp - 0xc], 0x10
mov rax, qword [rbp + 0x28]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0x20]
mov r8d, eax
mov eax, dword [rbp + 0x10]
cdqe
mov rdx, qword [rbp + 0x18]
lea rcx, [rbp - 0xc]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rbp + 0x28]
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recvfrom]
call rax
cdqe
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jns 0x1400192ca
lea rax, str.udp:_couldnt_receive_data
mov rcx, rax
call dbg.nbdie
mov rax, qword [rbp - 8]
add rsp, 0x40
pop rbp
ret
Function at 0x1400192d4
Capabilities:
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov eax, r8d
mov qword [rbp + 0x28], r9
mov word [rbp + 0x20], ax
mov dword [rbp - 4], 0xffffffff
mov rax, qword [rbp + 0x18]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14001933c
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0x18]
mov r8, rax
lea rax, str.Couldnt_find_host__s_n
mov rdx, rax
call dbg.fprintf
jmp 0x1400193de
lea rax, [serv_addr.sin_family]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [serv_addr.sin_family], 2
movzx eax, word [rbp + 0x20]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [serv_addr.sin_port], ax
mov rax, qword [rbp - 0x10]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [serv_addr.sin_family]
lea rcx, [rdx + 4]
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0x30]
mov r8d, eax
mov eax, dword [rbp + 0x10]
cdqe
mov rdx, qword [rbp + 0x28]
mov dword [rsp + 0x28], 0x10
lea rcx, [serv_addr.sin_family]
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_sendto]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
jns 0x1400193de
lea rax, str.udp:_couldnt_send_data
mov rcx, rax
call dbg.nbdie
mov eax, dword [rbp - 4]
cdqe
add rsp, 0x50
pop rbp
ret

Function at 0x140022cf0
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 dbg.__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 dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf_1
call sym.abort
nop
nop dword [rax]
Function at 0x140022d60
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140035134]
mov rbx, rcx
test esi, esi
jle 0x140022e90
mov rax, qword [0x140035138]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140022dab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140022e35
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140022d90
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140022eb2
mov rax, qword [0x140035138]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140035138]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140022e97
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140022e2e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140022e40
add dword [0x140035134], 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 [0x140035138]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140022e2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140022db8
mov rax, qword [0x140035138]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140023440
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400351a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140035180]
test rbx, rbx
je 0x14002349c
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 0x140023493
test eax, eax
jne 0x140023493
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140023478
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 0x1400236b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400236c8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400236d0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x1400236e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14002372d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140023724
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14002372f
add rax, 0x28
cmp rax, r9
jne 0x140023710
xor eax, eax
ret

Function at 0x140023730
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400237c0
mov rdx, qword [0x14002f640]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400237ae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400237ae
cmp word [rax + 0x18], 0x20b
jne 0x1400237ae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400237c0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140023799
add rbx, 0x28
cmp rbx, rdi
je 0x1400237c0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140023790
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x1400237d0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140023850
Capabilities:
Parse pe header

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

Function at 0x140023890
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14002f640]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400238b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400238b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400238b0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140023900
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400238f7
test rcx, rcx
je 0x1400238b0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x1400238e8
xor eax, eax
ret