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

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov r12, qword [0x1db47c970]
mov rax, qword [r12]
mov qword [rsp + 0x38], rax
xor eax, eax
mov rbx, rcx
call sym.rwl_ref.isra.0
test eax, eax
je 0x1dabd5e80
mov rdx, qword [rsp + 0x38]
sub rdx, qword [r12]
jne 0x1dabd5fa9
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rsi, qword [rbx]
lea rdi, [rsi + 0x18]
mov rcx, rdi
call sym.pthread_mutex_lock
mov ebp, eax
test eax, eax
jne 0x1dabd5ed1
lea r13, [rsi + 0x20]
mov rcx, r13
call sym.pthread_mutex_lock
mov ebp, eax
test eax, eax
jne 0x1dabd5f80
mov edx, dword [rsi + 8]
test edx, edx
jne 0x1dabd5ecc
mov edx, dword [rsi + 0x10]
mov eax, dword [rsi + 0xc]
test edx, edx
jle 0x1dabd5ec8
sub eax, edx
mov dword [rsi + 0x10], 0
mov dword [rsi + 0xc], eax
test eax, eax
jg 0x1dabd5f00
lock add dword [rsi + 8], 1
mov rax, qword [rsp + 0x38]
sub rax, qword [r12]
jne 0x1dabd5fa9
mov edx, ebp
mov rcx, rbx
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp sym.rwl_unref
neg eax
mov qword [rsp + 0x28], rsi
lea r14, [rsi + 0x28]
mov dword [rsi + 0x10], eax
lea rax, [sym.st_cancelwrite]
mov qword [rsp + 0x20], rax
call sym.pthread_getclean
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call sym.pthread_getclean
lea rdx, [rsp + 0x20]
mov qword [rax], rdx
lock or qword [rsp], 0
jmp 0x1dabd5f4f
mov eax, dword [rsi + 0x10]
test eax, eax
jns 0x1dabd5f90
mov rdx, r13
mov rcx, r14
call sym.pthread_cond_wait
mov edi, eax
test eax, eax
je 0x1dabd5f48
call sym.pthread_getclean
mov rdx, qword [rsp + 0x30]
mov ebp, edi
mov qword [rax], rdx
mov rcx, qword [rsp + 0x28]
call qword [rsp + 0x20]
jmp 0x1dabd5ed1
mov rcx, rdi
call sym.pthread_mutex_unlock
jmp 0x1dabd5ed1
call sym.pthread_getclean
mov rdx, qword [rsp + 0x30]
mov qword [rax], rdx
mov dword [rsi + 0xc], 0
jmp 0x1dabd5ecc
call dbg.__stack_chk_fail
nop
nop
Function at 0x1dabd5fb0
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rdi, qword [0x1db47c970]
mov rax, qword [rdi]
mov qword [rsp + 0x38], rax
xor eax, eax
mov rbx, rcx
mov rsi, rdx
test rcx, rcx
je 0x1dabd6098
test rdx, rdx
je 0x1dabd6098
call sym.rwl_ref.isra.0
test eax, eax
je 0x1dabd6018
mov rdx, qword [rsp + 0x38]
sub rdx, qword [rdi]
jne 0x1dabd60ca
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbp, qword [rbx]
mov rdx, rsi
lea r12, [rbp + 0x18]
mov rcx, r12
call sym.pthread_mutex_timedlock
mov edx, eax
test eax, eax
jne 0x1dabd60a8
lea r14, [rbp + 0x20]
mov rdx, rsi
mov rcx, r14
call sym.pthread_mutex_timedlock
mov r13d, eax
test eax, eax
jne 0x1dabd60b8
mov edx, dword [rbp + 8]
test edx, edx
jne 0x1dabd6067
mov edx, dword [rbp + 0x10]
mov eax, dword [rbp + 0xc]
test edx, edx
jle 0x1dabd6063
sub eax, edx
mov dword [rbp + 0x10], 0
mov dword [rbp + 0xc], eax
test eax, eax
jg 0x1dabd60d0
lock add dword [rbp + 8], 1
mov rax, qword [rsp + 0x38]
sub rax, qword [rdi]
jne 0x1dabd60ca
mov edx, r13d
mov rcx, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.rwl_unref
mov eax, 0x16
jmp 0x1dabd5ff2
mov rax, qword [rsp + 0x38]
sub rax, qword [rdi]
je 0x1dabd6079
jmp 0x1dabd60ca
mov rcx, r12
call sym.pthread_mutex_unlock
mov rax, qword [rsp + 0x38]
sub rax, qword [rdi]
je 0x1dabd6076
call dbg.__stack_chk_fail
nop
neg eax
mov qword [rsp + 0x28], rbp
lea r15, [rbp + 0x28]
mov dword [rbp + 0x10], eax
lea rax, [sym.st_cancelwrite]
mov qword [rsp + 0x20], rax
call sym.pthread_getclean
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call sym.pthread_getclean
lea rdx, [rsp + 0x20]
mov qword [rax], rdx
lock or qword [rsp], 0
jmp 0x1dabd611d
test r12d, r12d
jne 0x1dabd6135
mov r8, rsi
mov rdx, r14
mov rcx, r15
call sym.pthread_cond_timedwait
mov r12d, eax
mov eax, dword [rbp + 0x10]
test eax, eax
js 0x1dabd6118
call sym.pthread_getclean
mov rdx, qword [rsp + 0x30]
mov qword [rax], rdx
test r12d, r12d
jne 0x1dabd6158
mov dword [rbp + 0xc], 0
jmp 0x1dabd6067
mov rcx, qword [rsp + 0x28]
mov r13d, r12d
call qword [rsp + 0x20]
jmp 0x1dabd606c

Function at 0x1dabe8850
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x1dabe887c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x1dabe94a0
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x1db4752b0], 0
jne 0x1dabe95a6
mov byte [0x1db4752b0], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x1dabe957c
mov rbx, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [rbx], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add rbx, rax
mov rcx, rbx
call sym.__cxa_demangle
mov ecx, 2
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdi, rax
call rsi
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x1dabe956d
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x1db476621]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x1dabe9568
mov rcx, rdi
call sym.free
call sym.__cxa_rethrow
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x1dabe9537
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x1dabe963b
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sym.fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x1dabe95a1
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x1dabe95a1

Function at 0x1dac495f0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sym.fileno
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sym.read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x1dac49638
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x1dac4960a
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x1dac5c010
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 8]
mov rdi, rcx
test rax, rax
je 0x1dac5c038
mov rcx, qword [rcx]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
mov rbp, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, 4
lea rsi, [rsp + 0x2c]
nop dword [rax]
mov ecx, dword [rdi + 0x10]
mov r8d, ebx
mov rdx, rsi
call sym.read
test eax, eax
jle 0x1dac5c080
cdqe
add rsi, rax
sub rbx, rax
jne 0x1dac5c050
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 0xffffffff
jne 0x1dac5c08c
call rbp
cmp dword [rax], 4
je 0x1dac5c050
lea rcx, str.random_device_could_not_be_read
call method.std.__throw_runtime_error_char_const_
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x1dac83fd0
Capabilities:
Query environment variable

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor edx, edx
lea rcx, [0x1db472aa0]
movabs rdi, 0x2e78786362696c67
movabs r12, 0x6c6f6f705f68652e
call sym.pthread_mutex_init
pxor xmm0, xmm0
lea rcx, str.GLIBCXX_TUNABLES
mov qword [0x1db472ab8], 0
movups xmmword [0x1db472aa8], xmm0
call sym.getenv
mov dword [rsp + 0x40], 0
mov rbx, rax
lea rax, str.obj_size
mov qword [rsp + 0x30], 8
mov qword [rsp + 0x38], rax
lea rax, str.obj_count
mov qword [rsp + 0x48], 9
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], 0x100
test rbx, rbx
jne 0x1dac84085
jmp 0x1dac8412f
mov rcx, rbx
mov edx, 0x3a
call sym.strchr
mov rbx, rax
test rax, rax
je 0x1dac840e0
xor eax, eax
cmp byte [rbx], 0x3a
sete al
add rbx, rax
cmp qword [rbx], rdi
jne 0x1dac84070
cmp qword [rbx + 7], r12
jne 0x1dac84070
cmp byte [rbx + 0xf], 0x2e
jne 0x1dac84070
add rbx, 0x10
lea rbp, [rsp + 0x30]
lea r13, [rsp + 0x60]
mov rsi, qword [rbp]
mov rcx, qword [rbp + 8]
test rsi, rsi
je 0x1dac840cb
mov r8, rsi
mov rdx, rbx
call sym.memcmp
test eax, eax
jne 0x1dac840d5
cmp byte [rbx + rsi], 0x3d
je 0x1dac84165
add rbp, 0x18
cmp rbp, r13
jne 0x1dac840af
jmp 0x1dac84070
mov eax, dword [rsp + 0x58]
mov edx, 0x1000
mov ecx, 6
cmp eax, edx
cmovle edx, eax
mov eax, dword [rsp + 0x40]
test eax, eax
cmove eax, ecx
movsxd rbx, eax
movsxd rax, edx
add rbx, 0x26
imul rbx, rax
shl rbx, 3
mov qword [0x1db472ab8], rbx
jne 0x1dac8413f
lea rcx, [sym.__tcf_0]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp dbg.atexit
mov qword [0x1db472ab8], 0x16000
mov ebx, 0x16000
mov rcx, rbx
call sym.malloc
mov qword [0x1db472ab0], rax
test rax, rax
je 0x1dac8419c
xor edx, edx
mov qword [0x1db472aa8], rax
mov qword [rax], rbx
mov qword [rax + 8], rdx
jmp 0x1dac84117
lea rdx, [rsp + 0x28]
lea rcx, [rbx + rsi + 1]
xor r8d, r8d
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
mov rbx, qword [rsp + 0x28]
movzx edx, byte [rbx]
cmp dl, 0x3a
je 0x1dac8418c
test dl, dl
jne 0x1dac84070
test eax, eax
js 0x1dac84070
mov dword [rbp + 0x10], eax
jmp 0x1dac84070
xor ecx, ecx
mov qword [0x1db472ab8], rcx
jmp 0x1dac84117
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140004530]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140004540]
mov dword [rax], 1
mov rax, qword [0x140004550]
mov dword [rax], 1
mov rax, qword [0x1400044d0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140004520]
mov dword [0x14000700c], 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 [0x140004600]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x1400045e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004480]
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 0x140001450
Capabilities:
Initialize winsock library

Disassembly:
push rbp
sub rsp, 0x1c0
lea rbp, [rsp + 0x80]
lea rax, [rbp - 0x60]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x13c], eax
cmp dword [rbp + 0x13c], 0
je 0x1400014b7
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp + 0x13c]
mov r8d, eax
lea rax, str.WSAStartup_failed:__d_n
mov rdx, rax
call sym.fprintf
mov ecx, 1
call sym.exit
nop
add rsp, 0x1c0
pop rbp
ret
Function at 0x1400014d9
Capabilities:
Connect socket
Resolve dns
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp - 0x10], 0xffffffffffffffff
lea rax, [rbp - 0x50]
mov r8d, 0x30
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x4c], 0
mov dword [rbp - 0x48], 1
mov dword [rbp - 0x44], 6
lea r8, [rbp - 0x58]
lea rcx, [rbp - 0x50]
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp + 0x20]
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getaddrinfo]
call rax
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0
je 0x14000158a
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x14]
mov r8d, eax
lea rax, str.getaddrinfo_failed:__d_n
mov rdx, rax
call sym.fprintf
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x140001669
mov rax, qword [rbp - 8]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov edx, dword [rax + 8]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 4]
mov r8d, ecx
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x140001616
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov r8d, ebx
lea rax, str.Error_at_socket__:__ld_n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 0x20]
mov rax, qword [rbp - 0x10]
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0xffffffff
jne 0x140001676
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp - 0x10], 0xffffffffffffffff
nop
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140001597
jmp 0x140001677
nop
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x1400016cc
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x1d
mov edx, 1
lea rax, str.Unable_to_connect_to_server__n
mov rcx, rax
call sym.fwrite
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 0x10]
add rsp, 0x88
pop rbx
pop rbp
ret
Function at 0x1400016da
Capabilities:
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push rbp
push rbx
mov eax, 0x1048
call fcn.140002a00
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xfe0], rcx
mov qword [rbp + 0xfe8], rdx
mov qword [rbp + 0xff0], r8
mov rcx, qword [rbp + 0xff0]
lea rax, [rbp - 0x50]
mov rdx, qword [rbp + 0xfe8]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
mov edx, 0x1000
mov rcx, rax
call sym.snprintf
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.strlen
mov edx, eax
lea rax, [rbp - 0x50]
mov rcx, qword [rbp + 0xfe0]
mov r9d, 0
mov r8d, edx
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0xfbc], eax
cmp dword [rbp + 0xfbc], 0xffffffff
jne 0x1400017c5
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov r8d, ebx
lea rax, str.send_failed:__d_n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov ecx, 1
call sym.exit
nop
add rsp, 0x1048
pop rbx
pop rbp
ret

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

Disassembly:
push rbp
push rbx
mov eax, 0x1038
call fcn.140002a00
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xfd0], rcx
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0xfd0]
mov r9d, 0
mov r8d, 0x1000
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0xfac], eax
cmp dword [rbp + 0xfac], 0
jle 0x140001840
lea rdx, [rbp - 0x60]
mov eax, dword [rbp + 0xfac]
mov r8, rdx
mov edx, eax
lea rax, str._.s
mov rcx, rax
call sym.printf
jmp 0x140001888
cmp dword [rbp + 0xfac], 0
jne 0x14000185a
lea rax, str.Connection_closed
mov rcx, rax
call sym.puts
jmp 0x140001888
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov r8d, ebx
lea rax, str.recv_failed:__d_n
mov rdx, rax
call sym.fprintf
cmp dword [rbp + 0xfac], 0
jg 0x1400017ee
nop
nop
add rsp, 0x1038
pop rbx
pop rbp
ret

Function at 0x140001c40
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 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 0x140001cb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
test esi, esi
mov rbx, rcx
jle 0x140001de0
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001cfb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001d85
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001ce0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x140001e02
mov rax, qword [0x140007098]
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 [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001de7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001d7e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001d90
add dword [0x140007094], 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 [0x140007098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001d7e
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 0x140001d08
mov rax, qword [0x140007098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002370
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x1400023cc
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 0x1400023c3
test rsi, rsi
je 0x1400023c3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400023a8
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 0x1400025e0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop

Function at 0x1400025f0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
Function at 0x140002600
Capabilities:
Parse pe header

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

Function at 0x140002630
Capabilities:
Enumerate pe sections

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

Function at 0x140002680
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002710
mov rdx, qword [0x1400044d0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400026fe
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400026fe
cmp word [rax + 0x18], 0x20b
jne 0x1400026fe
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002710
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400026e9
add rbx, 0x28
cmp rbx, rdi
je 0x140002710
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400026e0
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 0x140002720
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x1400027a0
Capabilities:
Parse pe header

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