joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001005
Capabilities:
Create thread
Query environment variable

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x158
mov esi, 1
cmp edx, 1
jne 0x1000110c
test byte [0x10068008], 1
jne 0x1000110c
mov byte [0x10068008], 1
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x1000110a
mov rdi, rax
mov r8d, 0x28
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x1000110a
mov rbx, rax
lea rcx, [rsp + 0x38]
and qword [rcx], 0
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], 0x28
mov edx, 0x20
mov r8b, 3
call fcn.10001e73
mov r14, rax
mov byte [rax + 0x18], 0
mov qword [rax], rbx
mov qword [rax + 8], rdi
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea r8, [0x1000111b]
mov edx, 0x1000000
xor ecx, ecx
mov r9, rax
call sub.KERNEL32.dll_CreateThread
test rax, rax
je 0x100010f8
mov qword [r14 + 0x10], rax
mov rcx, rax
call sub.ntdll.dll_NtClose
mov al, 1
xchg byte [r14 + 0x18], al
test al, al
je 0x100010d4
mov rcx, r14
call fcn.10001ed3
lea rcx, str._AppData_Decodeco.dll
lea rdi, [rsp + 0x57]
mov rdx, rdi
mov r8d, 0x100
call sub.KERNEL32.dll_ExpandEnvironmentStringsA
mov rcx, rdi
call sub.KERNEL32.dll_LoadLibraryA
jmp 0x1000110c
call sub.KERNEL32.dll_GetLastError
mov rcx, rdi
xor edx, edx
mov r8, rbx
call fcn.10004190
xor esi, esi
mov eax, esi
add rsp, 0x158
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x10002bcb
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov esi, edx
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x18]
add rax, 0x20
xor edi, edi
mov rax, qword [rax]
mov rbx, qword [rax + 0x20]
test rbx, rbx
je 0x10002cb2
add rax, 0xfffffffffffffff0
movsxd rdx, dword [rbx + 0x3c]
mov edx, dword [rdx + rbx + 0x88]
test rdx, rdx
je 0x10002c5d
mov r8, qword [rax + 0x60]
test r8, r8
je 0x10002c5d
movzx r9d, word [rax + 0x58]
shr r9d, 1
mov r10d, 0x4d2
xor r11d, r11d
cmp r9, r11
je 0x10002c58
movzx r14d, word [r8 + r11*2]
lea ebp, [r14 - 0x20]
cmp r14w, 0x61
cmovb ebp, r14d
rol r10d, 0x1b
movzx ebp, bp
add r10d, ebp
inc r11
jmp 0x10002c32
cmp r10d, ecx
je 0x10002c63
add rax, 0x10
jmp 0x10002bf4
mov r14d, dword [rdx + rbx + 0x20]
add r14, rbx
mov r15d, dword [rdx + rbx + 0x24]
add r15, rbx
mov r13d, dword [rdx + rbx + 0x18]
mov r12d, dword [rdx + rbx + 0x1c]
add r12, rbx
xor edi, edi
xor ebp, ebp
cmp r13, rbp
je 0x10002cb2
mov ecx, dword [r14 + rbp*4]
add rcx, rbx
call fcn.10002cc6
mov rcx, rax
call fcn.10002e16
cmp eax, esi
je 0x10002ca6
inc rbp
jmp 0x10002c84
movzx eax, word [r15 + rbp*2]
mov edi, dword [r12 + rax*4]
add rdi, rbx
mov rax, rdi
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x100034e3
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0x40
mov rax, r8
mov rsi, rcx
mov rcx, qword [rdx]
mov r8d, 0xffffffff
cmp r9, r8
cmovb r8, r9
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x3c]
mov rdx, rax
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x10003520
mov ecx, dword [rsp + 0x3c]
xor eax, eax
jmp 0x100035c5
call sub.KERNEL32.dll_GetLastError
cmp ax, 6
je 0x100035b6
movzx eax, ax
cmp eax, 8
je 0x1000355b
cmp eax, 0x21
je 0x100035a5
cmp eax, 0x40
je 0x10003594
cmp eax, 0x6d
je 0x1000356c
cmp eax, 0x3e3
je 0x1000357d
cmp eax, 0x6f8
je 0x1000355b
cmp eax, 0x718
jne 0x1000358e
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 2
jmp 0x100035c5
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 0xe
jmp 0x100035c5
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 0xf
jmp 0x100035c5
mov ax, 5
jmp 0x100035c5
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 0x13
jmp 0x100035c5
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 0x11
jmp 0x100035c5
and word [rsp + 0x38], 0
and dword [rsp + 0x34], 0
mov ax, 0x10
mov qword [rsi], rcx
mov word [rsi + 8], ax
mov eax, dword [rsp + 0x34]
mov dword [rsi + 0xa], eax
movzx eax, word [rsp + 0x38]
mov word [rsi + 0xe], ax
mov rax, rsi
add rsp, 0x40
pop rsi
ret
Function at 0x140001a70
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
xor rax, rax
dec eax
inc eax
xor rax, rax
xor rax, rax
call fcn.140001a9a

Function at 0x140003b90
Capabilities:
Enumerate process modules
Link many functions at runtime
Parse credit card information

Disassembly:
mov eax, 0x20d8
call fcn.140018db0
sub rsp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x80], rax
jmp 0x140003bb0
nop
cmp eax, ecx
mov rax, rcx
dec eax
cmc
inc eax
dec rax
pushfq
cmp ecx, edx
popfq
push rax
pop rax
dec rax
inc eax
add eax, 0x432296dc
jmp 0x140003bd3
nop
cmp eax, ecx
mov rax, rcx
xor eax, eax
call fcn.140003b80
inc rax
add rax, 0xffffffffff5ba502
cmp rax, 0xffffffffffffffda
cmp eax, ecx
inc rax
call fcn.140003bf7

Function at 0x140006db0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 8]
mov qword [rsp + 0x50], rax
movabs rax, 0x28ee1eec7e3f511c
inc rax
inc rax
mov eax, 0x4914ba09
push rax
pop rax
jmp 0x140006df8
nop
mov rax, rcx
cmp rax, 0xffffffffea179902
cmp cx, cx
inc rax
push r8
pop rax
cmc
call fcn.140003b80
mov dword [rsp + 0x38], 0
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov ecx, 8
imul rcx, rcx, 0
lea rax, [rax + rcx + 0x88]
mov qword [rsp + 0x68], rax
cmp al, cl
mov rax, r8
mov rax, rcx
pushfq
cmp ecx, edx
popfq
dec eax
push r8
pop rax
mov eax, 0xf94f8a70
cmp rax, 0x3e
xor eax, eax
mov rax, rcx
inc eax
push rax
pop rax
cmp al, cl
xor rax, rax
call fcn.140006e64
Function at 0x14000a5d0
Capabilities:
Accept command line arguments
Parse pe header
Read file on windows
Set current directory

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x2350
call fcn.140018db0
sub rsp, rax
call fcn.14000a5f7

Function at 0x140019970
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400199ba
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400199ba
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400199ba
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400199ba
cmp dword [rcx + 0x84], 0xe
jbe 0x1400199ba
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400199bc
xor al, al
add rsp, 0x28
ret

Function at 0x14002e1d8
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x14002dfc7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002dfc7
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002dfc7
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002dfc7
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002dfc7
cmp dword [rcx + 0x84], 0xe
jbe 0x14002dfc7
cmp dword [rcx + 0xf8], 0
je 0x14002dfc7
mov ecx, ebx
call fcn.14002e0f8
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.14002dd44
cmp dword [rbp + 0x20], 0
je 0x14002e014
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14002e01c
int3
xor r8d, r8d
xor edx, edx
jmp 0x14002df60
Function at 0x140001080
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r15
sub rsp, 0x28
mov qword [rsp + 0x60], r13
xor r15d, r15d
mov qword [rsp + 0x20], r14
mov r13d, r9d
mov edi, r8d
mov r14, rdx
mov rbx, rcx
cmp qword [rcx + 8], r15
jne 0x1400010ae
mov eax, r15d
jmp 0x1400010b4
mov eax, dword [rcx + 0x10]
sub eax, dword [rcx + 8]
lea ecx, [rax + rdi]
mov qword [rsp + 0x50], rbp
cmp ecx, dword [rbx + 0x18]
jb 0x14000114d
pxor xmm0, xmm0
mov eax, ecx
mov qword [rsp + 0x58], r12
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x1400286e8]
call fcn.14001eda0
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
cvttsd2si rbp, xmm0
shl ebp, 0xa
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, qword [rbx + 8]
mov rsi, rax
test rdx, rdx
jne 0x14000110f
mov ecx, r15d
jmp 0x140001114
mov ecx, dword [rbx + 0x10]
sub ecx, edx
mov r12d, ecx
mov r8d, ecx
mov rcx, rax
call fcn.14000ecf0
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140001139
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rax, [r12 + rsi]
mov r12, qword [rsp + 0x58]
mov qword [rbx + 8], rsi
mov qword [rbx + 0x10], rax
mov dword [rbx + 0x18], ebp
mov rcx, qword [rbx + 0x10]
mov r8, rdi
mov rdx, r14
call fcn.14000ecf0
mov r14, qword [rsp + 0x20]
test r13d, r13d
mov r13, qword [rsp + 0x60]
je 0x1400011d0
mov r10d, r15d
mov r9, r15
mov r11, r15
test edi, edi
jle 0x1400011d0
mov rbp, qword [rsp + 0x70]
nop dword [rax]
movzx ecx, byte [r9 + rbp]
mov r8, qword [rbx + 0x10]
inc r9
mov eax, 0x8fb823ef
imul ecx
add edx, ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0xcccccccd
imul edx, edx, 0x1c8
sub ecx, edx
mul r10d
add cl, 0x36
xor byte [r11 + r8], cl
shr edx, 3
lea ecx, [rdx + rdx*4]
add ecx, ecx
cmp r10d, ecx
cmove r9, r15
inc r10d
inc r11
cmp r10d, edi
jl 0x140001180
add qword [rbx + 0x10], rdi
mov rbp, qword [rsp + 0x50]
mov eax, edi
add rsp, 0x28
pop r15
pop rdi
pop rsi
pop rbx
ret
Function at 0x140003240
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x1d0
mov rax, qword [0x14002eb60]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
xor edi, edi
lea rax, vtable.CTcpSocket.0
mov rbx, rcx
mov qword [rcx + 0x10], rdi
mov dword [rcx + 0x18], edi
mov qword [rcx], rax
mov dword [rcx + 0x58], edi
mov qword [rcx + 0x48], rdi
mov qword [rcx + 0x50], rdi
lea rax, vtable.CBuffer.0
lea rdx, [rsp + 0x20]
mov qword [rcx + 0x40], rax
mov qword [rcx + 0x60], rax
mov dword [rcx + 0x78], edi
mov qword [rcx + 0x68], rdi
mov qword [rcx + 0x70], rdi
mov qword [rcx + 0x80], rax
mov dword [rcx + 0x98], edi
mov qword [rcx + 0x88], rdi
mov qword [rcx + 0x90], rdi
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edx, [rdi + 1]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, edi
mov qword [rbx + 8], rax
xchg dword [rbx + 0x20], ecx
mov qword [rbx + 0xb0], 0xffffffffffffffff
mov qword [rbx + 0xa0], rdi
mov qword [rbx + 0xa8], rdi
mov dword [rbx + 0x1c], edi
mov rax, rbx
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14000ecc0
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1d0
pop rdi
ret

Function at 0x140003320
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x20], 0
mov rdi, rcx
je 0x14000339a
mov rcx, qword [rcx + 0xb0]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x80
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 1
xor ebx, ebx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.KERNEL32.dll_CancelIo]
xchg dword [rdi + 0x20], ebx
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rsp + 0x48]
mov qword [rdi + 0xb0], 0xffffffffffffffff
add rsp, 0x30
pop rdi
ret
Function at 0x140003ef0
Capabilities:
Create thread
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 0x21c]
movzx ebx, r8w
mov rbp, rdx
mov rdi, rcx
test eax, eax
jne 0x140003f1f
mov dword [rcx + 0x23c], 0x598
jmp 0x140003f3e
cmp eax, 0x598
jbe 0x140003f38
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
mov dword [rcx + 0x23c], eax
mov qword [rsp + 0x48], rsi
xor esi, esi
mov dword [rcx + 0x8c], esi
call fcn.1400040a0
mov dword [rdi + 0x48], 1
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
mov eax, 1
lock xadd qword [0x140034370], rax
inc rax
mov qword [rdi + 0x68], rax
jne 0x140003f92
mov eax, 1
lock xadd qword [0x140034370], rax
inc rax
mov qword [rdi + 0x68], rax
mov rcx, qword [rdi + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x1001
mov dword [rsp + 0x40], 0x40000
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x1002
mov dword [rsp + 0x40], 0x40000
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
movzx r8d, bx
mov rdx, rbp
mov rcx, rdi
call fcn.140004220
test eax, eax
je 0x140004047
lea rax, [rdi + 0x80]
lea r8, [0x140004430]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call fcn.14000f738
mov qword [rdi + 0x78], rax
test rax, rax
je 0x140004036
mov rcx, qword [rdi + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x140004089
mov dword [rdi + 0x84], 8
mov ecx, 0x65f
jmp 0x140004059
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x84], select
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rdi + 0x48], esi
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call fcn.140004d80
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov eax, esi
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140004220
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x80
mov rax, qword [0x14002eb60]
xor rax, rsp
mov qword [rsp + 0x68], rax
movzx r12d, r8w
mov r14d, 2
mov r13, rdx
mov rbp, rcx
xor esi, esi
mov edx, r14d
lea r8d, [rsi + 0x11]
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x140004272
xor eax, eax
jmp 0x140004405
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea rcx, [rsp + 0x54]
mov qword [rsp + 0x30], rcx
lea r8, [rsp + 0x50]
mov r9d, 4
mov rcx, rax
mov edx, 0x9800000c
mov qword [rsp + 0x78], rbx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x50], esi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rcx, qword [rbp + 0x58]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0xfffffffb
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbp + 0x58]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 4
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov rcx, r13
mov qword [rbp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov r8, r13
xor edx, edx
xor ecx, ecx
mov r9d, eax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
lea eax, [rbx + 1]
movsxd rcx, eax
call fcn.14000c778
mov rcx, r13
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov r8, r13
xor edx, edx
mov r9d, eax
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, rdi
mov byte [rbx + rdi], sil
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rcx, rdi
mov rbx, rax
call fcn.14000eca0
mov rdi, qword [rsp + 0x70]
test rbx, rbx
jne 0x140004393
xor eax, eax
jmp 0x140004400
movzx ecx, r12w
mov word [rsp + 0x58], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov rdx, qword [rbp + 0x60]
mov r8d, gethostbyname
mov word [rsp + 0x5a], ax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov rcx, qword [rbp + 0x58]
mov dword [rsp + 0x5c], eax
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x1400043fe
mov rcx, qword [rbp + 0x58]
lea rdx, [rsp + 0x58]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1400043f9
cmp eax, 0xffffffff
jne 0x1400043fe
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400043fe
mov esi, 1
mov eax, esi
mov rbx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14000ecc0
add rsp, 0x80
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
Function at 0x140004850
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [rdx + 0x14]
mov rbx, rcx
test eax, eax
je 0x140004880
mov dword [rcx + 0x50], eax
mov dword [rcx + 0x48], 1
mov dword [rcx + 0x4c], 2
xor eax, eax
mov dword [rcx + 0x54], 1
add rsp, 0x20
pop rbx
ret
mov rdx, qword [rcx + 0x60]
mov rcx, qword [rcx + 0x58]
mov r8d, 0x23
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1400048bf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x48], 1
mov dword [rbx + 0x4c], 2
mov dword [rbx + 0x50], eax
xor eax, eax
mov dword [rbx + 0x54], 1
add rsp, 0x20
pop rbx
ret
mov dword [rbx + 0x88], 1
lea r9, [rbx + 0x220]
lea rcx, [rbx + 0x268]
mov r8, rbx
mov rdx, rbx
mov qword [rsp + 0x30], rdi
mov dword [rbx + 0x8c], 1
call fcn.140005d90
mov rcx, qword [rbx + 0x58]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor edi, edi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x14000491a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
cmove eax, edi
mov edi, eax
mov rcx, qword [rbx + 0x68]
call fcn.140003220
test edi, edi
mov rdi, qword [rsp + 0x30]
je 0x140004937
mov ecx, 0x80004005
call fcn.1400012d0
int3
mov eax, 1
add rsp, 0x20
pop rbx
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rdi
sub rsp, 0x30
mov rbx, rcx
lea rbp, [0x1400280e0]
nop dword [rax]
mov rdx, qword [rbx + 0xa0]
mov rcx, qword [rbx + 0x58]
xor r9d, r9d
mov r8d, 0x598
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test eax, eax
jle 0x140004a09
cmp eax, 0x10
jne 0x1400049bc
mov rax, qword [rbx + 0xa0]
mov rdx, qword [rax]
cmp rdx, qword [rbp]
jne 0x1400049b3
mov rdx, qword [rax + 8]
cmp rdx, qword [rbp + 8]
jne 0x1400049b3
xor eax, eax
jmp 0x1400049b8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140004a3b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r11d, dword [rbx + 0x244]
mov rdx, qword [rbx + 0xa0]
lea rcx, [rbx + 0x268]
cmp edi, 0x18
jl 0x1400049f4
mov r9, qword [rbx + 0x250]
mov r8d, edi
mov dword [rsp + 0x20], r11d
call fcn.1400063e0
jmp 0x1400049fe
cmp edi, 0xc
jne 0x140004a63
call fcn.140006250
cmp eax, 2
jne 0x140004970
jmp 0x140004a6e
cmp eax, 0xffffffff
jne 0x140004970
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140004ab1
cmp eax, 0x2744
je 0x140004970
cmp eax, 0x2746
je 0x140004970
jmp 0x140004a87
mov dword [rbx + 0x48], 1
mov qword [rbx + 0x4c], 5
mov dword [rbx + 0x54], 0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov ecx, recv
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [rbx + 0x68]
call fcn.140003220
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov dword [rbx + 0x48], 1
mov dword [rbx + 0x4c], 4
mov dword [rbx + 0x50], eax
mov dword [rbx + 0x54], 1
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov eax, 1
add rsp, 0x30
pop rdi
ret
Function at 0x140004d80
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rbx
mov edi, eax
call fcn.140004160
test eax, eax
jne 0x140004dac
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov edx, edi
mov rcx, rbx
call fcn.140004fa0
mov eax, dword [rbx + 0x88]
xor edi, edi
test eax, eax
je 0x140004de5
cmp dword [rbx + 0x54], edi
je 0x140004ddf
mov rcx, qword [rbx + 0x58]
lea r8d, [rdi + 0x10]
lea rdx, [0x1400280e0]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbx + 0x88], edi
cmp dword [rbx + 0x48], edi
je 0x140004e02
mov rcx, qword [rbx + 0x68]
call fcn.140003220
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, edi
xchg dword [rbx + 0x20], eax
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x140004e15
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov qword [rbx + 0x60], rdi
mov rcx, qword [rbx + 0x58]
cmp rcx, 0xffffffffffffffff
je 0x140004e3c
mov edx, 1
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x58], 0xffffffffffffffff
mov rcx, rbx
call fcn.140004e60
mov rbx, qword [rsp + 0x30]
mov eax, 1
add rsp, 0x20
pop rdi
ret

Function at 0x140005350
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbx, rcx
mov rcx, qword [rcx + 8]
mov edi, r8d
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rbx + 0x358]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
call qword [sym.imp.WINMM.dll_timeGetTime]
mov dword [rbx + 0x1c], eax
xor eax, eax
xchg dword [rbx + 0x20], eax
xor eax, eax
mov qword [rbx + 0x30], rax
mov word [rbx + 0x38], ax
mov rax, qword [rbx + 0x1c]
mov qword [rbx + 0x30], rax
mov eax, dword [rbx + 0x8c]
mov word [rbx + 0x38], 0x1ca
cmp eax, 3
je 0x1400053b8
mov rcx, rbx
call fcn.140004d80
movzx r8d, di
mov rdx, rsi
mov rcx, rbx
call fcn.140003ef0
mov rcx, qword [rbx + 0x358]
mov edx, 0x1770
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140005408
cmp eax, 0x102
je 0x1400053e9
cmp eax, 0xffffffff
jne 0x1400053f6
mov rcx, qword [rbx + 0x358]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
xor al, al
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov eax, 1
xchg dword [rbx + 0x20], eax
mov rcx, qword [rbx + 0x358]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea r11, [rsp + 0x40]
lea r8, [0x140005460]
mov qword [rsp + 0x28], r11
mov r9, rbx
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
call fcn.14000f738
mov rsi, qword [rsp + 0x50]
mov qword [rbx + 0x360], rax
mov rbx, qword [rsp + 0x48]
mov al, 1
add rsp, 0x30
pop rdi
ret