joyce8/EMBER2024-capa huggingface dataset:
Function at 0x476cd0
Capabilities:
Encode data using base64

Disassembly:
mov eax, 0x68
call fcn.005555e0
sub rsp, rax
mov qword [rsp + 0x58], rbp
movsxd rbp, dword [rsp + 0x90]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r14
xor r14d, r14d
test ebp, ebp
mov qword [rsp + 0x28], r15
mov r13, r9
mov rdi, rdx
mov rsi, rcx
mov dword [r8], r14d
mov r15, r8
je 0x476f0a
cmp dword [rcx + 4], 0x50
jle 0x476d39
lea r8, str.ctx__length____int_sizeof_ctx__enc_data_
lea edx, [rax + 0x23]
lea rcx, [0x005c5668]
call fcn.00473480
movsxd rcx, dword [rsi]
mov qword [rsp + 0x40], r12
mov r12d, dword [rsi + 4]
lea eax, [rcx + rbp]
cmp eax, r12d
jge 0x476d64
lea rcx, [rcx + rsi + 8]
mov r8, rbp
mov rdx, r13
call sub.msvcrt.dll_memcpy
add dword [rsi], ebp
jmp 0x476f05
test ecx, ecx
mov qword [rsp + 0x60], rbx
je 0x476db0
sub r12d, ecx
lea rcx, [rcx + rsi + 8]
mov rdx, r13
movsxd rbx, r12d
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsi + 4]
lea rdx, [rsi + 8]
mov rcx, rdi
add r13, rbx
sub ebp, r12d
call fcn.004769f0
mov dword [rsi], r14d
movsxd rcx, eax
add rdi, rcx
inc rdi
mov byte [rdi - 1], 0xa
mov byte [rdi], r14b
lea r14d, [rax + 1]
cmp ebp, dword [rsi + 4]
jl 0x476ee8
lea r12, [0x00566780]
mov r9d, dword [rsi + 4]
xor r11d, r11d
xor ebx, ebx
test r9d, r9d
mov r8, rdi
jle 0x476ec1
lea r10, [r13 + 1]
nop
nop
cmp r9d, 3
jl 0x476e47
movzx eax, byte [r10]
movzx ecx, byte [r10 - 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [r10 + 1]
shl ecx, 8
or ecx, eax
mov eax, ecx
shr rax, 0x12
and eax, 0x3f
movzx eax, byte [rax + r12]
mov byte [r8], al
mov eax, ecx
shr rax, 0xc
and eax, 0x3f
movzx eax, byte [rax + r12]
mov byte [r8 + 1], al
mov eax, ecx
shr rax, 6
and eax, 0x3f
movzx eax, byte [rax + r12]
mov byte [r8 + 2], al
mov al, cl
and eax, 0x3f
add r8, 4
movzx eax, byte [rax + r12]
mov byte [r8 - 1], al
jmp 0x476ea8
movzx ecx, byte [r10 - 1]
shl ecx, 0x10
cmp r9d, 2
jne 0x476e5e
movzx eax, byte [r10]
shl eax, 8
or ecx, eax
mov rax, rcx
shr rax, 0x12
and eax, 0x3f
movzx eax, byte [rax + r12]
mov byte [r8], al
mov rax, rcx
shr rax, 0xc
and eax, 0x3f
cmp r9d, 1
movzx eax, byte [rax + r12]
mov byte [r8 + 1], al
jne 0x476e8f
lea eax, [r9 + 0x3c]
jmp 0x476e9b
shr rcx, 6
and ecx, 0x3f
movzx eax, byte [rcx + r12]
mov byte [r8 + 2], al
mov byte [r8 + 3], 0x3d
add r8, 4
sub r9d, 3
add r11d, 4
add rbx, 4
add r10, 3
test r9d, r9d
jg 0x476de0
mov byte [r8], 0
movsxd rcx, dword [rsi + 4]
add rdi, rbx
mov byte [rdi], 0xa
inc rdi
sub ebp, ecx
add r13, rcx
mov byte [rdi], 0
cmp ebp, dword [rsi + 4]
lea r14d, [r14 + r11 + 1]
jge 0x476dc0
test ebp, ebp
mov rbx, qword [rsp + 0x60]
je 0x476f00
lea rcx, [rsi + 8]
movsxd r8, ebp
mov rdx, r13
call sub.msvcrt.dll_memcpy
mov dword [rsi], ebp
mov dword [r15], r14d
mov r12, qword [rsp + 0x40]
mov r15, qword [rsp + 0x28]
mov r14, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
add rsp, 0x68
ret
Function at 0x4777a0
Capabilities:
Encode data using xor

Disassembly:
xor r8d, r8d
test rcx, rcx
mov r9, rcx
je 0x4777f7
movzx eax, byte [rcx]
test al, al
je 0x4777f7
mov r10d, 0x100
nop
nop
movsx edx, al
inc r9
or edx, r10d
add r10d, 0x100
mov eax, edx
shr eax, 2
xor eax, edx
and eax, 0xf
movzx ecx, al
mov al, byte [r9]
imul edx, edx
rol r8d, cl
xor r8d, edx
test al, al
jne 0x4777c0
mov eax, r8d
shr eax, 0x10
xor eax, r8d
ret
xor eax, eax
ret
Function at 0x47e6b0
Capabilities:
Check if file exists

Disassembly:
push rbp
mov eax, reloc.WS2_32.dll_WSASetLastError
call fcn.005555e0
sub rsp, rax
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x68], rsi
mov qword [rbp + 0x38], rdi
mov qword [rbp + 0x30], r12
mov qword [rbp + 0x28], r13
mov rax, qword [0x005c3458]
mov qword [rbp + 0x10], rax
xor edi, edi
mov rsi, rdx
mov r12, rcx
mov ebx, edi
mov rax, rcx
cmp byte [rcx], bl
je 0x47e706
cmp ebx, 0x80000000
jae 0x47e706
inc rax
inc ebx
cmp byte [rax], dil
jne 0x47e6f4
mov r8, rcx
btr ebx, 0x1f
mov edx, 8
lea r9d, [rbx + 1]
mov ecx, 0xfde9
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
movsxd r9, eax
jle 0x47e7e4
mov rax, r9
add rax, rax
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.005555e0
sub rsp, rax
mov r8, r12
mov dword [rsp + 0x28], r9d
lea r13, [rsp + 0x30]
lea r9d, [rbx + 1]
mov edx, 8
mov ecx, 0xfde9
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x47e808
cmp byte [rsi], dil
mov rax, rsi
je 0x47e793
cmp edi, 0x80000000
jae 0x47e793
inc rax
inc edi
cmp byte [rax], 0
jne 0x47e781
lea rax, [rbp]
btr edi, 0x1f
mov r8, rsi
lea r9d, [rdi + 1]
xor edx, edx
mov ecx, 0xfde9
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x47e808
lea rdx, [rbp]
mov rcx, r13
call sub.msvcrt.dll__wfopen
test rax, rax
mov rbx, rax
jne 0x47e8a5
call sub.msvcrt.dll__errno
cmp dword [rax], 2
jne 0x47e7ff
jmp 0x47e7f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
jne 0x47e808
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_fopen
mov rbx, rax
test rbx, rbx
jne 0x47e8a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 1
lea r9, [0x005ce990]
lea ecx, [rdx + 1]
mov r8d, eax
mov dword [rsp + 0x20], 0xa3
call fcn.00475480
lea r11, [0x005ce9a8]
lea r9, [0x005ce9ac]
mov qword [rsp + 0x28], r11
lea rdx, [0x005ce9b0]
mov r8, r12
mov ecx, 5
mov qword [rsp + 0x20], rsi
call fcn.00474e50
call sub.msvcrt.dll__errno
mov edx, WSAGetLastError
cmp dword [rax], 2
lea ecx, [rdx - 0x4d]
jne 0x47e887
lea r9, [0x005ce9b8]
lea r8d, [rdx + 0x13]
mov dword [rsp + 0x20], 0xa6
call fcn.00475480
xor eax, eax
jmp 0x47e8e6
lea r9, [0x005ce9d0]
mov r8d, 2
mov dword [rsp + 0x20], 0xa8
call fcn.00475480
xor eax, eax
jmp 0x47e8e6
lea rcx, [0x005ce940]
call fcn.0046f130
test rax, rax
mov rdi, rax
jne 0x47e8c5
mov rcx, rbx
call sub.msvcrt.dll_fclose
xor eax, eax
jmp 0x47e8e6
xor edx, edx
mov rcx, rax
call fcn.0046e2a0
mov edx, 0x6a
mov r9, rbx
lea r8d, [rdx - 0x69]
mov rcx, rdi
call fcn.0046e920
mov rax, rdi
mov rcx, qword [rbp + 0x10]
call fcn.005555b0
mov rbx, qword [rbp + 0x60]
mov rsi, qword [rbp + 0x68]
mov rdi, qword [rbp + 0x38]
mov r12, qword [rbp + 0x30]
mov r13, qword [rbp + 0x28]
lea rsp, [rbp + 0x40]
pop rbp
ret
Function at 0x487cb0
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rsi
mov rbx, rcx
mov rcx, qword [rcx]
mov qword [rsp + 0x48], rdi
cmp dword [rcx + 8], 2
mov rbp, r8
mov rdi, rdx
sete sil
test sil, sil
je 0x487cf5
mov r9, qword [rcx + 0x10]
mov edx, 1
mov rcx, rdi
call qword [rbx + 0x18]
mov rdi, rax
jmp 0x487d37
cmp qword [rbx + 0x10], 0
jne 0x487d1f
mov rcx, qword [rcx + 0x10]
lea rdx, [0x0055bca4]
call qword [sym.imp.msvcrt.dll_fopen]
test rax, rax
mov qword [rbx + 0x10], rax
jne 0x487d1f
mov rax, 0xffffffffffffffff
jmp 0x487d64
mov r9, qword [rbx + 0x10]
mov r8, rbp
mov edx, 1
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_fread]
mov rdi, rax
test rdi, rdi
je 0x487d41
cmp rdi, rbp
jbe 0x487d61
test sil, sil
jne 0x487d58
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.msvcrt.dll_fclose]
mov qword [rbx + 0x10], 0
mov rax, qword [rbx]
mov rcx, qword [rax]
mov qword [rbx], rcx
mov rax, rdi
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
Function at 0x488ee0
Capabilities:
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x1d0
mov rax, qword [0x005c3458]
mov qword [rsp + 0x1c0], rax
mov eax, dword [0x005e60a4]
mov ebx, ecx
mov edx, eax
inc eax
test edx, edx
mov dword [0x005e60a4], eax
jne 0x488fad
test cl, 2
mov rax, qword [sym.imp.msvcrt.dll_malloc]
mov qword [sub.msvcrt.dll_malloc], rax
mov rax, qword [sym.imp.msvcrt.dll_free]
mov qword [sub.msvcrt.dll_free], rax
mov rax, qword [sym.imp.msvcrt.dll_realloc]
mov qword [case.0x49474c.0], rax
mov rax, qword [sym.imp.msvcrt.dll__strdup]
mov qword [case.0x49474c.1], rax
mov rax, qword [sym.imp.msvcrt.dll_calloc]
mov qword [case.0x49474c.2], rax
je 0x488fa2
lea rdx, [rsp + 0x20]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x488f87
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x488f81
shr ax, 8
cmp al, 2
je 0x488fa2
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
call fcn.005555b0
add rsp, 0x1d0
pop rbx
ret
mov dword [0x005e60a8], ebx
call fcn.0048bce0
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
call fcn.005555b0
add rsp, 0x1d0
pop rbx
ret

Function at 0x4890c0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1e8
mov rax, qword [0x005c3458]
mov qword [rsp + 0x1d0], rax
cmp dword [0x005e60a4], 0
jne 0x489183
mov rax, qword [sym.imp.msvcrt.dll_malloc]
lea rdx, [rsp + 0x30]
mov cx, 0x202
mov qword [sub.msvcrt.dll_malloc], rax
mov rax, qword [sym.imp.msvcrt.dll_free]
mov dword [0x005e60a4], 1
mov qword [sub.msvcrt.dll_free], rax
mov rax, qword [sym.imp.msvcrt.dll_realloc]
mov qword [case.0x49474c.0], rax
mov rax, qword [sym.imp.msvcrt.dll__strdup]
mov qword [case.0x49474c.1], rax
mov rax, qword [sym.imp.msvcrt.dll_calloc]
mov qword [case.0x49474c.2], rax
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x48915d
movzx eax, word [rsp + 0x30]
cmp al, 2
jne 0x489157
shr ax, 8
cmp al, 2
je 0x489174
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov rcx, qword [rsp + 0x1d0]
call fcn.005555b0
add rsp, 0x1e8
ret
mov dword [0x005e60a8], 3
call fcn.0048bce0
lea rcx, [rsp + 0x20]
call fcn.0048c930
mov rcx, qword [rsp + 0x20]
xor edx, edx
test eax, eax
cmovne rcx, rdx
mov rax, rcx
mov rcx, qword [rsp + 0x1d0]
call fcn.005555b0
add rsp, 0x1e8
ret

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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x49684b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, reloc.WS2_32.dll_getservbyport
mov edx, 0xffffffff
cmp eax, 0x2733
cmove ecx, edx
mov eax, ecx
add rsp, 0x20
pop rbx
ret
mov qword [rbx], rcx
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x496860
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub rsp, 0x58
mov rax, qword [rcx]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x28], r13
mov rbx, rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x20], r14
mov rdi, r9
test rcx, rcx
mov r13, r8
mov r14, rdx
je 0x4968a3
call fcn.004aece0
test al, al
je 0x4968a3
mov bpl, 1
jmp 0x4968a6
xor bpl, bpl
xor r8d, r8d
cmp r14, qword [rbx + 0x120]
mov qword [rsp + 0x40], rsi
mov rsi, qword [rsp + 0x80]
sete r8b
test bpl, bpl
mov qword [rsp + 0x30], r12
mov qword [rsi], 0
je 0x496933
mov rcx, qword [rbx + 0x248]
mov rax, qword [rbx + 0x250]
mov r12, rdi
sub rax, rcx
cmp rax, rdi
cmovb r12, rax
test r12, r12
je 0x49691e
mov rax, qword [rbx + 0x240]
mov r8, r12
lea rdx, [rcx + rax]
mov rcx, r13
call sub.msvcrt.dll_memcpy
add qword [rbx + 0x248], r12
mov byte [rbx + 0x1b5], 0
mov qword [rsi], r12
jmp 0x4969d3
mov rdx, qword [rbx + 0x240]
mov ecx, 0x4000
cmp rdi, rcx
cmovb rcx, rdi
jmp 0x496959
mov rax, qword [rbx]
mov ecx, 0x4000
mov edx, dword [rax + reloc.MFC42u.dll_COleDateTime::operator]
mov eax, ecx
test edx, edx
cmovne eax, edx
cmp edi, eax
jl 0x496953
test edx, edx
cmovne ecx, edx
mov edi, ecx
movsxd rcx, edi
mov rdx, r13
movsxd rax, r8d
cmp dword [rbx + rax*8 + 0x12c], 2
jne 0x49696d
mov eax, 0xffffffff
jmp 0x4969d5
cmp dword [rbx + 0x218], 0
jne 0x4969d3
mov r8d, ecx
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
movsxd rdi, eax
cmp rdi, 0xffffffffffffffff
jne 0x4969a7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, reloc.WS2_32.dll_getservbyport
mov edx, edi
cmp eax, 0x2733
cmove ecx, edi
mov eax, ecx
jmp 0x4969d5
test eax, eax
js 0x4969d3
test bpl, bpl
je 0x4969d0
mov rdx, qword [rbx + 0x240]
mov r8, rdi
mov rcx, r13
call sub.msvcrt.dll_memcpy
mov qword [rbx + 0x250], rdi
mov qword [rbx + 0x248], rdi
add qword [rsi], rdi
xor eax, eax
mov r14, qword [rsp + 0x20]
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x58
ret
Function at 0x496ab0
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
sub rsp, 0x118
mov rax, qword [0x005c3458]
mov qword [rsp + 0xd0], rax
cmp byte [rcx + reloc.MFC42u.dll_COleSafeArray::operator], 0
mov rax, qword [rsp + 0x140]
mov qword [r11 - 8], rbx
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov rbp, r9
lea r13, [0x00575728]
mov r12, r8
movsxd rsi, edx
mov rbx, rcx
je 0x496bc6
test rax, rax
je 0x496bc6
mov rdx, qword [rax + 0xa8]
test rdx, rdx
je 0x496bc6
mov ecx, esi
lea r9, str.Data
dec ecx
je 0x496b50
dec ecx
je 0x496b40
dec ecx
je 0x496b57
dec ecx
je 0x496b47
jmp 0x496bc6
lea r9, str.Header
lea rax, [0x00575754]
jmp 0x496b5e
lea r9, str.Header
lea rax, str.from
mov qword [rsp + 0x28], rdx
lea r8, str.__s__s__s_
lea rcx, [rsp + 0x30]
mov edx, 0xa0
mov qword [rsp + 0x20], rax
call fcn.0048ae70
mov r10, qword [rbx + 0x1d0]
xor eax, eax
lea rdi, [rsp + 0x30]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
test r10, r10
not rcx
lea rdi, [rcx - 1]
je 0x496bed
mov rax, qword [rbx + 0x138]
lea r9, [rcx - 1]
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call r10
test eax, eax
jne 0x496c64
mov rdi, qword [rbx + 0x1d0]
test rdi, rdi
je 0x496c23
mov rax, qword [rbx + 0x138]
mov r9, rbp
mov r8, r12
mov edx, esi
mov rcx, rbx
mov qword [rsp + 0x20], rax
call rdi
jmp 0x496c64
mov r9, qword [rbx + 0x130]
mov edx, 2
mov rcx, r13
lea r8d, [rdx - 1]
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rbx + 0x130]
lea rcx, [rsp + 0x30]
mov r8d, 1
mov rdx, rdi
call qword [sym.imp.msvcrt.dll_fwrite]
jmp 0x496bc6
test esi, esi
js 0x496c62
cmp esi, 2
jg 0x496c62
mov r9, qword [rbx + 0x130]
mov edx, 2
lea rcx, [rsi + rsi*2]
lea r8d, [rdx - 1]
add rcx, r13
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rbx + 0x130]
mov r8d, 1
mov rdx, rbp
mov rcx, r12
call qword [sym.imp.msvcrt.dll_fwrite]
xor eax, eax
mov r13, qword [rsp + 0xe8]
mov r12, qword [rsp + 0xf0]
mov rdi, qword [rsp + 0xf8]
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x110]
mov rcx, qword [rsp + 0xd0]
call fcn.005555b0
add rsp, 0x118
ret
Function at 0x496cb0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
mov r11, rsp
sub rsp, 0x868
mov rax, qword [0x005c3458]
mov qword [rsp + 0x840], rax
test rcx, rcx
mov qword [r11 - 8], rbx
mov rbx, rcx
je 0x496d91
cmp byte [rcx + 0x3a0], 0
je 0x496d91
mov r8, rdx
lea r9, [r11 + 0x18]
lea rcx, [rsp + 0x30]
mov edx, 0x801
mov qword [r11 - 0x10], rdi
call fcn.0048ae10
mov r10, qword [rbx + 0x1d0]
xor eax, eax
lea rdi, [rsp + 0x30]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
test r10, r10
not rcx
lea rdi, [rcx - 1]
je 0x496d51
mov rax, qword [rbx + 0x138]
lea r9, [rcx - 1]
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call r10
jmp 0x496d89
mov r9, qword [rbx + 0x130]
mov edx, 2
lea rcx, [0x00575728]
lea r8d, [rdx - 1]
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rbx + 0x130]
lea rcx, [rsp + 0x30]
mov r8d, 1
mov rdx, rdi
call qword [sym.imp.msvcrt.dll_fwrite]
mov rdi, qword [rsp + 0x858]
mov rbx, qword [rsp + 0x860]
mov rcx, qword [rsp + 0x840]
call fcn.005555b0
add rsp, 0x868
ret

Function at 0x496db0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x58
mov rax, qword [0x005c3458]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x50], rbx
mov r8, rdx
mov rbx, rcx
lea r9, [rsp + 0x70]
add rcx, 0x678
mov edx, 0x4000
mov qword [rsp + 0x48], rsi
call fcn.0048ae10
mov rcx, qword [rbx + 0x140]
test rcx, rcx
je 0x496e29
cmp byte [rbx + 0x86c8], 0
jne 0x496e29
lea r9, [rbx + 0x678]
lea r8, [0x005754ec]
mov edx, 0x100
call fcn.0048ae70
mov byte [rbx + 0x86c8], 1
cmp byte [rbx + 0x3a0], 0
je 0x496edc
mov qword [rsp + 0x40], rdi
xor eax, eax
lea rdi, [rbx + 0x678]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0x3fff
mov rdi, rcx
jae 0x496e71
inc rdi
mov byte [rcx + rbx + 0x678], 0xa
mov byte [rdi + rbx + 0x678], al
mov r10, qword [rbx + 0x1d0]
test r10, r10
je 0x496e9d
mov rax, qword [rbx + 0x138]
lea r8, [rbx + 0x678]
mov r9, rdi
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call r10
jmp 0x496ed7
mov r9, qword [rbx + 0x130]
mov edx, 2
lea rcx, [0x00575728]
lea r8d, [rdx - 1]
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rbx + 0x130]
lea rcx, [rbx + 0x678]
mov r8d, 1
mov rdx, rdi
call qword [sym.imp.msvcrt.dll_fwrite]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
call fcn.005555b0
add rsp, 0x58
ret
Function at 0x496f00
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x28
movsxd rax, edx
mov r10, r9
mov r11, r8
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rdi
mov rdi, rcx
mov rcx, qword [rcx + rax*8 + 0x118]
xor r9d, r9d
mov r8d, r10d
mov rdx, r11
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
jne 0x496f74
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x496f58
xor eax, eax
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
add rsp, 0x28
ret
mov edx, eax
mov rcx, rdi
call fcn.0048a2b0
mov rcx, qword [rdi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.00496db0
mov rdi, qword [rsp + 0x48]
mov rax, rbx
mov rbx, qword [rsp + 0x40]
add rsp, 0x28
ret

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

Disassembly:
sub rsp, 0x38
mov r10, r9
mov r11, r8
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rsi
xor esi, esi
cmp rdx, qword [rcx + 0x120]
mov rax, rsi
sete al
mov qword [rsp + 0x20], rdi
mov rdi, rcx
mov rcx, qword [rcx + rax*8 + 0x118]
mov r8d, r10d
xor r9d, r9d
mov rdx, r11
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
jne 0x497069
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x49704d
mov rbx, rsi
jmp 0x497069
mov edx, eax
mov rcx, rdi
call fcn.0048a2b0
mov rcx, qword [rdi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.00496db0
mov rax, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x20]
cmp rbx, 0xffffffffffffffff
mov qword [rax], rbx
mov rbx, qword [rsp + 0x30]
mov eax, reloc.WS2_32.dll_getservbyname
cmovne eax, esi
mov rsi, qword [rsp + 0x28]
add rsp, 0x38
ret
Function at 0x497bc0
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 0x1001
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x497c0f
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x497c30
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x30
pop rbx
ret
Function at 0x498230
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov rax, rcx
movsxd rcx, dword [rcx + 0x660]
mov rbx, rdx
cmp ecx, 0xffffffff
je 0x498296
mov rax, qword [rax + 0x650]
mov rdx, qword [rax]
cmp qword [rdx + rcx*8], 0
je 0x498296
test r8, r8
mov rcx, qword [rdx + rcx*8]
je 0x498265
mov qword [r8], rcx
mov eax, dword [rcx + 0x118]
mov dword [rbx], eax
cmp byte [rcx + 0x128], 0
jne 0x498296
mov rcx, qword [rcx + 0x118]
mov r9d, 2
lea rdx, [rsp + 0x30]
lea r8d, [r9 - 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x49829c
mov dword [rbx], 0xffffffff
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x498c20
Capabilities:
Resolve dns

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x68
mov qword [rsp + 0x58], rbp
mov rbp, qword [rsp + 0x98]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r13
mov r13, qword [rsp + 0x90]
mov qword [rsp + 0x30], r14
mov qword [rbp], 0
mov qword [rsp + 0x28], r15
movzx r14d, r9w
mov byte [r13], 0
mov r15d, r8d
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
mov r12, rax
je 0x498d7e
cmp word [rax + 0x10], 2
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rdi
jne 0x498d2d
cmp word [rax + 0x12], 4
jne 0x498d2d
mov rdi, qword [rax + 0x18]
mov rcx, qword [rdi]
test rcx, rcx
je 0x498d2d
nop
mov esi, dword [rcx]
mov edx, gethostbyname
lea ecx, [rdx - 0x2f]
call qword [sym.imp.msvcrt.dll_calloc]
test rax, rax
mov rbx, rax
je 0x498d13
mov edx, reloc.WS2_32.dll_recv
lea ecx, [rdx - 0xf]
call qword [sym.imp.msvcrt.dll_calloc]
test rax, rax
jne 0x498ce8
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
xor ebx, ebx
jmp 0x498d13
mov ecx, dword [rsp + 0x78]
mov word [rax], 2
mov word [rax + 2], r14w
mov dword [rax + 4], esi
mov dword [rbx + 8], ecx
mov dword [rbx + 4], 2
mov dword [rbx + 0xc], r15d
mov qword [rbx + reloc.WS2_32.dll_recv], 0x10
mov qword [rbx + 0x20], rax
test rbx, rbx
mov qword [rbp], rbx
je 0x498d77
mov rcx, qword [rdi + 8]
add rdi, 8
lea rbp, [rbx + 0x28]
test rcx, rcx
jne 0x498cb0
mov rdx, qword [r12]
mov r8d, 0x400
mov rcx, r13
call qword [sym.imp.msvcrt.dll_strncpy]
mov byte [r13 + 0x400], 0
xor eax, eax
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x48]
mov r15, qword [rsp + 0x28]
mov r14, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x58]
add rsp, 0x68
ret
mov eax, 8
jmp 0x498d4a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2af9
je 0x498d95
dec eax
je 0x498da3
dec eax
je 0x498d9c
dec eax
mov eax, 0x2af9
jmp 0x498d59
mov eax, 0x2afb
jmp 0x498d59
mov eax, 0x2afa
jmp 0x498d59