joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4127c0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x412815
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x412800
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x412890
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
mov r8d, 1
cmovl r12d, edx
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
add r12d, 1
mov dword [rbx + 0xc], eax
call sym.__pformat_emit_float
mov ecx, dword [rbx + 8]
mov rdx, rbx
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call sym.__pformat_putc
mov rdx, rbx
mov rcx, rsi
add dword [rbx + 0xc], r12d
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sym.__pformat_int.isra.0
mov eax, dword [0x00560570]
cmp eax, 0xffffffff
je 0x4128c6
test eax, eax
je 0x4128b6
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x41281d
mov dword [0x00560570], 0
call sym._get_output_format
mov edx, 3
test al, 1
jne 0x41289f
jmp 0x4128a4
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sym.getenv
test rax, rax
je 0x4128ac
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
ja 0x4128ac
mov dword [0x00560570], 1
jmp 0x41289f

Function at 0x4198a0
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
test rax, rax
jle 0x4198d1
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
mov dword [rbx + 0x48], 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x41a630
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0xb0
lea rax, [sym.__gxx_personality_sj0]
mov qword [rsp + 0x60], rax
lea rax, [0x00660f20]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
lea rax, [0x0041a81d]
mov qword [rsp + 0x80], rsp
mov qword [rsp + 0x78], rax
call dbg._Unwind_SjLj_Register
cmp byte [0x00563610], 0
jne 0x41a797
mov byte [0x00563610], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x41a7e3
mov rax, qword [rax + 8]
cmp byte [rax], 0x2a
mov qword [rsp + 0x28], rax
je 0x41a7c9
mov rcx, qword [rsp + 0x28]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x38], 0xffffffff
lea r9, [rsp + 0xac]
mov dword [rsp + 0xac], 0xffffffff
call sym.__cxa_demangle
mov rdx, qword [sym.__acrt_iob_func]
mov ecx, 2
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x20], rdx
call rdx
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov edx, 1
mov r9, rax
call sym.fwrite
cmp dword [rsp + 0xac], 0
mov ecx, 2
je 0x41a77e
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov r8d, 2
mov edx, 1
lea rcx, [0x0063db71]
mov r9, rax
call sym.fwrite
cmp dword [rsp + 0xac], 0
je 0x41a7d4
mov dword [rsp + 0x38], 1
call sym.__cxa_rethrow
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x98]
mov rdx, rax
call sym.fputs
jmp 0x41a739
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
add qword [rsp + 0x28], 1
jmp 0x41a6af
mov rcx, qword [rsp + 0x98]
call sym.free
jmp 0x41a771
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov dword [rsp + 0x38], 0xffffffff
call sym.abort
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x41a83f
sub eax, 1
je 0x41a8cb
ud2
sub rdx, 1
mov rcx, qword [rsp + 0x28]
jne 0x41a8e2
call sym.__cxa_begin_catch
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x10]
mov ecx, 2
mov dword [rsp + 0x38], 2
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
call rdx
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov rdx, qword [rsp + 0x20]
call rdx
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x41a810
call sym.__cxa_end_catch
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0x38], 0xffffffff
call dbg._Unwind_SjLj_Resume
call sym.__cxa_begin_catch
mov dword [rsp + 0x38], 0xffffffff
call sym.__cxa_end_catch
jmp 0x41a810
Function at 0x41a81d
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0xb0
lea rax, [sym.__gxx_personality_sj0]
mov qword [rsp + 0x60], rax
lea rax, [0x00660f20]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
lea rax, [0x0041a81d]
mov qword [rsp + 0x80], rsp
mov qword [rsp + 0x78], rax
call dbg._Unwind_SjLj_Register
cmp byte [0x00563610], 0
jne 0x41a797
mov byte [0x00563610], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x41a7e3
mov rax, qword [rax + 8]
cmp byte [rax], 0x2a
mov qword [rsp + 0x28], rax
je 0x41a7c9
mov rcx, qword [rsp + 0x28]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x38], 0xffffffff
lea r9, [rsp + 0xac]
mov dword [rsp + 0xac], 0xffffffff
call sym.__cxa_demangle
mov rdx, qword [sym.__acrt_iob_func]
mov ecx, 2
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x20], rdx
call rdx
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov edx, 1
mov r9, rax
call sym.fwrite
cmp dword [rsp + 0xac], 0
mov ecx, 2
je 0x41a77e
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov r8d, 2
mov edx, 1
lea rcx, [0x0063db71]
mov r9, rax
call sym.fwrite
cmp dword [rsp + 0xac], 0
je 0x41a7d4
mov dword [rsp + 0x38], 1
call sym.__cxa_rethrow
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x98]
mov rdx, rax
call sym.fputs
jmp 0x41a739
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
add qword [rsp + 0x28], 1
jmp 0x41a6af
mov rcx, qword [rsp + 0x98]
call sym.free
jmp 0x41a771
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov dword [rsp + 0x38], 0xffffffff
call sym.abort
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x41a83f
sub eax, 1
je 0x41a8cb
ud2
sub rdx, 1
mov rcx, qword [rsp + 0x28]
jne 0x41a8e2
call sym.__cxa_begin_catch
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x10]
mov ecx, 2
mov dword [rsp + 0x38], 2
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
call rdx
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov rdx, qword [rsp + 0x20]
call rdx
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x41a810
call sym.__cxa_end_catch
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0x38], 0xffffffff
call dbg._Unwind_SjLj_Resume
call sym.__cxa_begin_catch
mov dword [rsp + 0x38], 0xffffffff
call sym.__cxa_end_catch
jmp 0x41a810
Function at 0x483300
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
jmp 0x483328
call r12
cmp dword [rax], 4
jne 0x483346
mov rcx, rbp
call method.std::__basic_file_char_.fd__
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sym.read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x483320
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4a14f0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rsi, rdx
mov rbx, rcx
lea rdx, str.mt19937
mov rcx, rsi
call method.std::string.compare_char_const__const
mov ecx, 0x1571
test eax, eax
jne 0x4a1555
mov dword [rbx], ecx
mov edx, 1
jmp 0x4a1524
mov ecx, dword [rbx + rdx*4 - 4]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul eax, eax, 0x6c078965
add eax, edx
mov dword [rbx + rdx*4], eax
add rdx, 1
cmp rdx, 0x270
jne 0x4a1520
mov qword [rbx + 0x9c0], 0x270
add rsp, 0x38
pop rbx
pop rsi
ret
mov rsi, qword [rsi]
lea rdx, [rsp + 0x28]
xor r8d, r8d
mov rcx, rsi
call sym.strtoul
cmp byte [rsi], 0
mov ecx, eax
je 0x4a1579
mov rax, qword [rsp + 0x28]
cmp byte [rax], 0
je 0x4a1514
lea rcx, str.random_device::random_device_const_std::string_
call method.std.__throw_runtime_error_char_const_
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x4d7f70
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
nop
nop
nop
nop
nop
nop
Function at 0x1400111ea
Capabilities:
Terminate process

Disassembly:
jmp 0x140014fe0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x14001126c
Capabilities:
Parse pe header

Disassembly:
jmp 0x140012cf0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140012d10
xor al, al
jmp 0x140012d91
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140012d23
xor al, al
jmp 0x140012d91
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140012d4d
xor al, al
jmp 0x140012d91
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140012d61
xor al, al
jmp 0x140012d91
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140012d73
xor al, al
jmp 0x140012d91
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140012d8f
xor al, al
jmp 0x140012d91
mov al, 1
add rsp, 0x38
ret
Function at 0x1400113ca
Capabilities:
Terminate process

Disassembly:
jmp 0x14001c0a0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x1400114c4
Capabilities:
Parse pe header

Disassembly:
jmp 0x14001de60
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14001de80
xor al, al
jmp 0x14001df01
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14001de93
xor al, al
jmp 0x14001df01
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001debd
xor al, al
jmp 0x14001df01
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x14001ded1
xor al, al
jmp 0x14001df01
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x14001dee3
xor al, al
jmp 0x14001df01
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001deff
xor al, al
jmp 0x14001df01
mov al, 1
add rsp, 0x38
ret
Function at 0x180003220
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x1d0
mov rax, qword [0x180039a90]
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.180013370
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1d0
pop rdi
ret

Function at 0x180003300
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x20], 0
mov rdi, rcx
je 0x18000337a
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 0x180003850
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x20
mov esi, r8d
mov r12, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rdi + 0x14], eax
je 0x180003893
nop dword [rax]
mov r9d, 1
xchg dword [rdi + 0x10], r9d
cmp r9d, 1
je 0x180003880
mov dword [rdi + 0x14], eax
inc dword [rdi + 0x18]
xor r13d, r13d
lea ebp, [rsi + 0xe]
cmp qword [rdi + 0x88], r13
jne 0x1800038aa
mov edx, r13d
jmp 0x1800038b6
mov edx, dword [rdi + 0x90]
sub edx, dword [rdi + 0x88]
lea rcx, [rdi + 0x80]
add edx, 4
call fcn.180001080
mov rax, qword [rdi + 0x90]
mov dword [rax], ebp
add qword [rdi + 0x90], 4
cmp qword [rdi + 0x88], r13
jne 0x1800038e4
mov edx, r13d
jmp 0x1800038f0
mov edx, dword [rdi + 0x90]
sub edx, dword [rdi + 0x88]
lea rcx, [rdi + 0x80]
add edx, 0xa
call fcn.180001080
mov rax, qword [rdi + 0x30]
mov rcx, qword [rdi + 0x90]
mov qword [rcx], rax
movzx eax, word [rdi + 0x38]
mov word [rcx + 8], ax
add qword [rdi + 0x90], 0xa
cmp qword [rdi + 0x88], r13
jne 0x18000392b
mov eax, r13d
jmp 0x180003937
mov eax, dword [rdi + 0x90]
sub eax, dword [rdi + 0x88]
lea edx, [rax + rsi]
lea rcx, [rdi + 0x80]
call fcn.180001080
mov rcx, qword [rdi + 0x90]
mov r8, rsi
mov rdx, r12
call fcn.1800133a0
mov r11d, r13d
mov r9, r13
mov r10, r13
test esi, esi
jle 0x1800039c4
nop word [rax + rax]
movzx ecx, byte [rdi + r9 + 0x30]
mov r8, qword [rdi + 0x90]
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 r11d
add cl, 0x36
xor byte [r10 + r8], cl
shr edx, 3
lea ecx, [rdx + rdx*4]
add ecx, ecx
cmp r11d, ecx
cmove r9, r13
inc r11d
inc r10
cmp r11d, esi
jl 0x180003970
add qword [rdi + 0x90], rsi
cmp qword [rdi + 0x88], r13
jne 0x1800039d9
mov r8d, r13d
jmp 0x1800039e7
mov r8d, dword [rdi + 0x90]
sub r8d, dword [rdi + 0x88]
mov rdx, qword [rdi + 0x88]
mov rcx, rdi
call fcn.180003a50
mov r11, qword [rdi + 0x88]
lea rcx, [rdi + 0x80]
mov edx, 0x400
mov qword [rdi + 0x90], r11
call fcn.180001140
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [rdi + 0x14]
mov eax, 1
jne 0x180003a2e
dec dword [rdi + 0x18]
jne 0x180003a2e
mov qword [rdi + 0x10], r13
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop r12
pop rdi
ret
Function at 0x180003f30
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 0x180003f5f
mov dword [rcx + 0x23c], 0x598
jmp 0x180003f7e
cmp eax, 0x598
jbe 0x180003f78
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
xor r8d, r8d
mov dword [rcx + 0x8c], esi
xor ecx, ecx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
lea rcx, [rdi + 0xb8]
mov dword [rdi + 0xd8], 0x598
mov qword [rdi + 0x258], rax
mov eax, dword [rdi + 0x70]
mov dword [rdi + 0xdc], eax
mov eax, dword [rdi + 0x74]
mov dword [rdi + 0xe0], eax
call fcn.180001370
mov dword [rdi + 0x48], 1
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
mov eax, 1
lock xadd qword [0x180043c70], rax
inc rax
mov qword [rdi + 0x68], rax
jne 0x180004009
mov eax, 1
lock xadd qword [0x180043c70], 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.1800041e0
test eax, eax
je 0x1800040be
lea rax, [rdi + 0x80]
lea r8, [0x1800043f0]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call fcn.180013e0c
mov qword [rdi + 0x78], rax
test rax, rax
je 0x1800040ad
mov rcx, qword [rdi + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x180004100
mov dword [rdi + 0x84], 8
mov ecx, 0x65f
jmp 0x1800040d0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x84], recv
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.180004d40
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 0x1800041e0
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 [0x180039a90]
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 0x180004232
xor eax, eax
jmp 0x1800043c5
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.180010d44
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.180013354
mov rdi, qword [rsp + 0x70]
test rbx, rbx
jne 0x180004353
xor eax, eax
jmp 0x1800043c0
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 0x1800043be
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 0x1800043b9
cmp eax, 0xffffffff
jne 0x1800043be
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1800043be
mov esi, 1
mov eax, esi
mov rbx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.180013370
add rsp, 0x80
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret