joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14003dd50
Capabilities:
Connect socket
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov rsi, rdx
mov rdi, rcx
test r8d, r8d
je 0x14003ddd0
mov rdx, qword [rcx + 0x30]
mov rcx, qword [rcx + 0x28]
lea r8d, [rbx + 0x30]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x14003ddbe
cmp word [rsi], 2
mov rcx, qword [rdi + 0x28]
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
mov rdx, rsi
cmove r8d, eax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x14003ddb9
cmp eax, 0xffffffff
jne 0x14003ddbe
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14003ddbe
mov ebx, 1
mov eax, ebx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
cmp word [rdx], 2
mov rcx, qword [rcx + 0x28]
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
cmove r8d, eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14003ddbe
mov rdx, qword [rdi + 0x30]
mov rcx, qword [rdi + 0x28]
mov r8d, 0x23
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x14003ddbe
mov dword [rdi + 0x68], 1
xor ecx, ecx
mov dword [rdi + 0x6c], 1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r11, qword [rdi]
mov rcx, rdi
call qword [r11 + 0x108]
cmp eax, 2
jne 0x14003de5d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov ecx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rsi, qword [rsp + 0x38]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rdi + 0x28]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x14003de84
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
cmove eax, ebx
mov ebx, eax
mov rdx, qword [rdi + 0x38]
lea rcx, str._C_CNNID:__Iu__send_0_bytes__detect_package__n
call fcn.14003b640
test ebx, ebx
je 0x14003ddb9
mov ecx, 0x80004005
call fcn.140028010
int3

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

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edx, dword [rcx + 0x210]
mov eax, dword [rcx + 0x50]
inc dword [rcx + 0x210]
xor edi, edi
mov rbx, rcx
cmp edx, eax
jb 0x14003def1
mov dword [rcx + 0x18], 1
mov qword [rcx + 0x1c], 5
mov dword [rcx + 0x24], edi
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rcx + 0x28]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x14003df18
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
cmove eax, edi
mov edi, eax
mov rdx, qword [rbx + 0x38]
lea rcx, str._C_CNNID:__Iu__send_0_bytes__detect_package__n
call fcn.14003b640
test edi, edi
je 0x14003df51
mov dword [rbx + 0x18], 1
mov dword [rbx + 0x1c], 5
mov dword [rbx + 0x20], edi
mov dword [rbx + 0x24], 1
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14003e070
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0x20c]
mov rbx, rcx
test eax, eax
jne 0x14003e199
xor esi, esi
nop word [rax + rax]
mov r8d, dword [rbx + 0x44]
mov rdx, qword [rbx + 0x80]
mov rcx, qword [rbx + 0x28]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test eax, eax
jle 0x14003e14f
mov rcx, qword [rbx + 0x80]
mov edx, eax
mov dword [rbx + 0x210], esi
call fcn.1400339a0
test eax, eax
jne 0x14003e1ae
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x80]
mov r8d, edi
mov rcx, rbx
call qword [rax + 0x128]
cmp eax, 2
jne 0x14003e18b
mov rdx, qword [rbx + 0x38]
lea rcx, str._C_CNNID:__Iu__OnReceive___event_return_HR_ERROR__connection_will_be_closed___n
call fcn.14003b640
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov dword [rbx + 0x18], 1
mov dword [rbx + 0x1c], 4
mov dword [rbx + 0x20], eax
mov dword [rbx + 0x24], 1
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
cmp eax, 0xffffffff
jne 0x14003e171
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14003e199
cmp eax, 0x2744
je 0x14003e18b
cmp eax, 0x2746
jne 0x14003e125
jmp 0x14003e18b
test eax, eax
jne 0x14003e18b
mov rdx, qword [rbx + 0x38]
lea rcx, str._C_CNNID:__Iu__recv_0_bytes__detect_package__n
mov dword [rbx + 0x210], esi
call fcn.14003b640
mov eax, dword [rbx + 0x20c]
test eax, eax
je 0x14003e0a0
mov eax, 1
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x24], esi
mov rsi, qword [rsp + 0x38]
mov dword [rbx + 0x18], 1
mov qword [rbx + 0x1c], 5
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x14003e980
Capabilities:
Send data
Send data on socket

Disassembly:
push r12
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rdi
mov rsi, rcx
call fcn.14003e1e0
mov rdi, rax
lea rbx, [rsi + 0xa8]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14003eb25
nop dword [rax + rax]
mov r8d, dword [rdi + 0x30]
sub r8d, dword [rdi + 0x28]
xor r9d, r9d
mov rdx, qword [rdi + 0x28]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.WS2_32.dll_send]
mov ebp, eax
test eax, eax
jle 0x14003ea47
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub dword [rsi + 0x208], ebp
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, qword [rsi]
mov r8d, ebp
mov rdx, qword [rdi + 0x28]
mov rcx, rsi
call qword [r9 + 0x118]
cmp eax, 2
jne 0x14003ea40
mov rdx, qword [rsi + 0x38]
lea rcx, str._C_CNNID:__Iu__OnSend___event_should_not_return_HR_ERROR____n
call fcn.14003b640
mov rbx, qword [rsp + 0x28]
jmp 0x14003ea4c
cmp eax, 0xffffffff
je 0x14003ea8e
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x14003ea64
mov rcx, rdi
call fcn.140039830
mov rcx, rsi
call fcn.14003e1e0
mov rdi, rax
lea rbx, [rsi + 0xa8]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x14003e9d0
jmp 0x14003eb25
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14003eaf1
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsi + 0x1d8]
test rax, rax
je 0x14003eac5
mov qword [rax + 0x10], rdi
mov rax, qword [rsi + 0x1d8]
mov qword [rdi + 8], rax
jmp 0x14003ead4
mov qword [rdi + 0x10], rax
mov qword [rdi + 8], rax
mov qword [rsi + 0x1e0], rdi
mov qword [rsi + 0x1d8], rdi
inc dword [rsi + 0x1d0]
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
jmp 0x14003eb42
mov dword [rsi + 0x18], 1
mov dword [rsi + 0x1c], 3
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x24], 1
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x14003eb21
mov rcx, rdi
call fcn.140039830
xor eax, eax
jmp 0x14003eb47
test rdi, rdi
je 0x14003eb42
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x14003eb42
mov rcx, rdi
call fcn.140039830
mov eax, 1
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r12
ret

Function at 0x14003f560
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
lea rax, [rcx + 0x60]
mov rbx, rcx
mov r9, rcx
mov qword [rsp + 0x28], rax
lea r8, [0x14003f110]
xor edi, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], edi
call fcn.140057b18
test rax, rax
mov qword [rbx + 0x58], rax
mov rbx, qword [rsp + 0x40]
setne dil
mov eax, edi
add rsp, 0x30
pop rdi
ret
Function at 0x14003fb70
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 0x24c]
mov rbx, rcx
test eax, eax
jne 0x14003fc6c
lea rsi, [rcx + 0xa4]
mov ebp, reloc.WS2_32.dll_recv
cmp word [rsi], 2
mov r8d, dword [rbx + 0x44]
mov rdx, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0x28]
mov eax, 0x1c
cmove eax, ebp
xor r9d, r9d
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
test eax, eax
js 0x14003fc3e
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, qword [rbx]
mov rdx, qword [rbx + 0xc0]
mov r8d, edi
mov rcx, rbx
call qword [r9 + 0x140]
cmp eax, 2
jne 0x14003fc5e
mov rdx, qword [rbx + 0x38]
lea rcx, str._C_CNNID:__Iu__OnReceive___event_return_HR_ERROR__connection_will_be_closed___n
call fcn.14003b640
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov dword [rbx + 0x18], 1
mov dword [rbx + 0x1c], 4
mov dword [rbx + 0x20], eax
mov dword [rbx + 0x24], 1
xor eax, eax
jmp 0x14003fc71
cmp eax, 0xffffffff
jne 0x14003fc5e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14003fc6c
cmp eax, 0x2744
je 0x14003fc5e
cmp eax, 0x2746
jne 0x14003fc22
mov eax, dword [rbx + 0x24c]
test eax, eax
je 0x14003fba1
mov eax, 1
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140040380
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
push r12
push r13
push r14
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rsi, rcx
call fcn.14003fc90
mov rdi, rax
lea rbx, [rsi + 0xe8]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140040556
lea r13, [rsi + 0x88]
mov r14d, reloc.WS2_32.dll_recv
nop dword [rax + rax]
mov eax, 0x1c
cmp word [r13], 2
cmove eax, r14d
mov r8d, dword [rdi + 0x30]
sub r8d, dword [rdi + 0x28]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov rdx, qword [rdi + 0x28]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.WS2_32.dll_sendto]
mov ebp, eax
test eax, eax
js 0x140040478
lea rcx, [rsi + 0x1e8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, 1
cmp ebp, ecx
cmovg ecx, ebp
sub dword [rsi + 0x248], ecx
lea rcx, [rsi + 0x1e8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsi]
mov r8d, ebp
mov rdx, qword [rdi + 0x28]
mov rcx, rsi
call qword [rax + 0x130]
cmp eax, 2
jne 0x140040471
mov rdx, qword [rsi + 0x38]
lea rcx, str._C_CNNID:__Iu__OnSend___event_should_not_return_HR_ERROR____n
call fcn.14003b640
mov rbx, qword [rsp + 0x38]
jmp 0x14004047d
cmp eax, 0xffffffff
je 0x1400404bf
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x140040495
mov rcx, rdi
call fcn.140039830
mov rcx, rsi
call fcn.14003fc90
mov rdi, rax
lea rbx, [rsi + 0xe8]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1400403e0
jmp 0x140040556
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140040522
lea rcx, [rsi + 0x1e8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsi + 0x218]
test rax, rax
je 0x1400404f6
mov qword [rax + 0x10], rdi
mov rax, qword [rsi + 0x218]
mov qword [rdi + 8], rax
jmp 0x140040505
mov qword [rdi + 0x10], rax
mov qword [rdi + 8], rax
mov qword [rsi + 0x220], rdi
mov qword [rsi + 0x218], rdi
inc dword [rsi + 0x210]
lea rcx, [rsi + 0x1e8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
jmp 0x140040573
mov dword [rsi + 0x18], 1
mov dword [rsi + 0x1c], 3
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x24], 1
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x140040552
mov rcx, rdi
call fcn.140039830
xor eax, eax
jmp 0x140040578
test rdi, rdi
je 0x140040573
lea rcx, [rbx + 0x30]
mov rdx, rdi
call fcn.140052ab0
test eax, eax
jne 0x140040573
mov rcx, rdi
call fcn.140039830
mov eax, 1
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret
Function at 0x140040d60
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
lea rax, [rcx + 0x68]
mov rbx, rcx
mov r9, rcx
mov qword [rsp + 0x28], rax
lea r8, [0x140040b00]
xor edi, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], edi
call fcn.140057b18
test rax, rax
mov qword [rbx + 0x60], rax
mov rbx, qword [rsp + 0x40]
setne dil
mov eax, edi
add rsp, 0x30
pop rdi
ret

Function at 0x140042400
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x58
mov eax, dword [0x1400b50e8]
test al, 1
jne 0x140042469
or eax, 1
lea rcx, [rsp + 0x20]
mov dword [0x1400b50e8], eax
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r11d, dword [rsp + 0x40]
lea r11d, [r11 + r11 + 2]
cmp r11d, 0x200
jae 0x140042455
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r11d, dword [rsp + 0x40]
lea eax, [r11 + r11 + 2]
mov dword [0x1400b50e4], eax
add rsp, 0x58
ret
mov dword [0x1400b50e4], 0x200
mov eax, 0x200
add rsp, 0x58
ret
mov eax, dword [0x1400b50e4]
add rsp, 0x58
ret
Function at 0x140042fd0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
push rdi
sub rsp, 0x60
xor eax, eax
mov rbx, rcx
mov word [rsp + 0x38], ax
mov qword [r11 - 0x2e], rax
mov qword [r11 - 0x26], rax
mov qword [r11 - 0x1e], rax
mov word [rsp + 0x52], ax
lea rax, [r11 - 0x30]
mov qword [r11 - 0x48], rax
call fcn.140042540
test eax, eax
je 0x140043159
cmp word [rsp + 0x38], 2
mov rcx, qword [rbx + 0x198]
mov edi, 0x1c
mov r8d, edi
mov esi, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x38]
cmove r8d, esi
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x140043147
cmp word [rsp + 0x38], 2
mov rcx, qword [rbx + 0x198]
lea rdx, [rbx + 0x58]
cmove edi, esi
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], edi
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x140043075
mov ecx, 0x80004005
call fcn.140028010
int3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbx + 0x190]
mov r8, qword [rbx + 0x198]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax]
cmp eax, 2
je 0x14004312b
mov eax, dword [rbx + 0x38]
cmp eax, 0xffffffff
je 0x140043116
mov rcx, qword [rbx + 0x198]
test eax, eax
jne 0x1400430e1
mov eax, dword [rbx + 0x34]
mov r9d, dword [rbx + 0x30]
lea r8, [rbx + 0x3c]
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x20], eax
call fcn.140033be0
test eax, eax
jne 0x140043116
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x1ac], send
jmp 0x140043169
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x20
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
call fcn.1400334c0
cmp eax, 0xffffffff
jne 0x140043116
mov ecx, 0x80004005
call fcn.140028010
int3
mov eax, 1
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
mov dword [rbx + 0x1ac], 5
test eax, eax
cmove eax, ecx
jmp 0x140043169
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x1ac], 4
jmp 0x140043169
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x1ac], 3
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
xor eax, eax
add rsp, 0x60
pop rdi
ret
Function at 0x140044890
Capabilities:
Create thread

Disassembly:
push rbp
push rdi
push r12
sub rsp, 0x30
xor r12d, r12d
mov rbp, rcx
mov edi, r12d
cmp dword [rcx + 0x14], r12d
jbe 0x1400449c3
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rsi
nop word [rax + rax]
lea r8, [0x1400446c0]
mov r9, rbp
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
call fcn.140057b18
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400449a6
mov rax, qword [rbp + 0x1b8]
lea rcx, [rsp + 0x50]
cmp rcx, rax
jae 0x140044952
mov rcx, qword [rbp + 0x1b0]
lea rdx, [rsp + 0x50]
cmp rcx, rdx
ja 0x140044952
lea rsi, [rsp + 0x50]
sub rsi, rcx
sar rsi, 3
cmp rax, qword [rbp + 0x1c0]
jne 0x140044936
lea rcx, [rbp + 0x1b0]
mov edx, 1
call fcn.140043e60
mov rdx, qword [rbp + 0x1b8]
test rdx, rdx
je 0x14004497b
mov rax, qword [rbp + 0x1b0]
mov rcx, qword [rax + rsi*8]
mov qword [rdx], rcx
jmp 0x14004497b
cmp rax, qword [rbp + 0x1c0]
jne 0x14004496c
lea rcx, [rbp + 0x1b0]
mov edx, 1
call fcn.140043e60
mov rcx, qword [rbp + 0x1b8]
test rcx, rcx
je 0x14004497b
mov qword [rcx], rsi
add qword [rbp + 0x1b8], 8
inc edi
cmp edi, dword [rbp + 0x14]
jb 0x1400448c0
mov eax, 1
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x1ac], 8
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r12d
jmp 0x140044993
mov eax, 1
add rsp, 0x30
pop r12
pop rdi
pop rbp
ret

Function at 0x1400457a0
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov eax, r9d
mov rdi, rdx
mov rsi, rcx
cmp r8d, 1
jne 0x1400457fd
lea rbx, [rdx + 0x70]
mov qword [rsp + 0x48], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [rsi]
xor r9d, r9d
lea r8d, [r9 + 5]
mov rdx, rdi
mov rcx, rsi
call qword [rax + 0x220]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140045810
cmp r8d, 2
jne 0x140045810
mov r9d, dword [rsp + 0x60]
mov r8d, eax
call fcn.1400456d0
mov rcx, qword [rdi + 0xc8]
mov qword [rdi + 0xc8], 0xffffffffffffffff
mov r8d, 1
mov edx, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
jmp fcn.140033a00
Function at 0x1400494e0
Capabilities:
Create thread

Disassembly:
push rbp
push rdi
push r12
sub rsp, 0x30
xor r12d, r12d
mov rbp, rcx
mov edi, r12d
cmp dword [rcx + 0x18], r12d
jbe 0x140049613
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rsi
nop word [rax + rax]
lea r8, [0x140049360]
mov r9, rbp
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
call fcn.140057b18
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400495f6
mov rax, qword [rbp + 0xa0]
lea rcx, [rsp + 0x50]
cmp rcx, rax
jae 0x1400495a2
mov rcx, qword [rbp + 0x98]
lea rdx, [rsp + 0x50]
cmp rcx, rdx
ja 0x1400495a2
lea rsi, [rsp + 0x50]
sub rsi, rcx
sar rsi, 3
cmp rax, qword [rbp + 0xa8]
jne 0x140049586
lea rcx, [rbp + 0x98]
mov edx, 1
call fcn.140043e60
mov rdx, qword [rbp + 0xa0]
test rdx, rdx
je 0x1400495cb
mov rax, qword [rbp + 0x98]
mov rcx, qword [rax + rsi*8]
mov qword [rdx], rcx
jmp 0x1400495cb
cmp rax, qword [rbp + 0xa8]
jne 0x1400495bc
lea rcx, [rbp + 0x98]
mov edx, 1
call fcn.140043e60
mov rcx, qword [rbp + 0xa0]
test rcx, rcx
je 0x1400495cb
mov qword [rcx], rsi
add qword [rbp + 0xa0], 8
inc edi
cmp edi, dword [rbp + 0x18]
jb 0x140049510
mov eax, 1
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x94], 8
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r12d
jmp 0x1400495e3
mov eax, 1
add rsp, 0x30
pop r12
pop rdi
pop rbp
ret

Function at 0x140049f50
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov eax, r9d
mov rdi, rdx
mov rsi, rcx
cmp r8d, 1
jne 0x140049fad
lea rbx, [rdx + 0x70]
mov qword [rsp + 0x48], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [rsi]
xor r9d, r9d
lea r8d, [r9 + 5]
mov rdx, rdi
mov rcx, rsi
call qword [rax + 0x208]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140049fc0
cmp r8d, 2
jne 0x140049fc0
mov r9d, dword [rsp + 0x60]
mov r8d, eax
call fcn.140049e70
mov rcx, qword [rdi + 0xc8]
mov qword [rdi + 0xc8], 0xffffffffffffffff
mov r8d, 1
mov edx, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
jmp fcn.140033a00
Function at 0x14004c570
Capabilities:
Connect socket

Disassembly:
push rdi
push r12
push r13
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x78], rsi
mov rbx, r9
mov rdi, r8
mov rsi, rdx
mov r12, rcx
add rcx, 0xe0
call fcn.140045f60
mov r13, rax
mov r10d, dword [r12 + 0x1c]
mov dword [rax + 0x30], r10d
mov r8, rbx
mov rdx, rsi
mov rcx, r12
call fcn.14004b2b0
mov rbp, rax
lea rbx, [rax + 0x70]
mov qword [rsp + 0x60], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsp + 0x88]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdi
mov rdi, qword [rsp + 0x80]
mov r9, rdi
mov r8, rbp
mov rdx, rsi
mov rcx, r12
call fcn.14004c030
mov esi, 1
mov rcx, qword [rbp + 0xc8]
cmp dword [r12 + 0x68], 0
je 0x14004c67a
mov edx, esi
call fcn.1400335b0
xor ecx, ecx
test eax, eax
sete cl
test ecx, ecx
jne 0x14004c636
mov ecx, 0x80004005
call fcn.140028010
int3
xor r9d, r9d
mov r8, rbp
mov rdx, qword [r12 + 0x70]
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test rax, rax
je 0x14004c66f
mov r9, r13
mov r8, rdi
mov rdx, qword [rbp + 0xc8]
mov rcx, qword [r12 + 0x50]
call fcn.140035720
jmp 0x14004c71b
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14004c71b
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
cmp word [rdi], 2
cmove r8d, eax
mov rdx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14004c715
mov edx, esi
mov rcx, qword [rbp + 0xc8]
call fcn.1400335b0
xor ecx, ecx
test eax, eax
sete cl
test ecx, ecx
jne 0x14004c6bf
mov ecx, 0x80004005
call fcn.140028010
int3
xor r9d, r9d
mov r8, rbp
mov rdx, qword [r12 + 0x70]
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test rax, rax
je 0x14004c66f
mov dword [rbp + 0x60], esi
mov rdx, rbp
mov rcx, r12
call fcn.140049d50
cmp eax, 2
je 0x14004c701
mov r8, r13
mov rdx, rbp
mov rcx, r12
call fcn.14004c440
xor esi, esi
jmp 0x14004c71b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, 0x4c7
test edi, edi
cmove edi, eax
jmp 0x14004c71d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
test edi, edi
je 0x14004c765
test esi, esi
je 0x14004c765
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov rcx, r12
call fcn.14004bf50
lea rcx, [r12 + 0x110]
mov rdx, r13
call fcn.140052ab0
test eax, eax
jne 0x14004c765
mov rcx, qword [r13 + 0x20]
mov r8, r13
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r13
pop r12
pop rdi
ret