joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002efc
Capabilities:
Compute adler32 checksum

Disassembly:
movzx r9d, cx
shr ecx, 0x10
mov r10, rdx
test rdx, rdx
jne 0x140003033
lea eax, [rdx + 1]
ret
mov edx, 0x15b0
cmp r8d, edx
cmovb edx, r8d
sub r8d, edx
cmp edx, 0x10
jl 0x140002ff8
mov r11d, edx
shr r11, 4
mov eax, r11d
neg eax
shl eax, 4
add edx, eax
movzx eax, byte [r10]
add r10, 0x10
add r9d, eax
movzx eax, byte [r10 - 0xf]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 0xe]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 0xd]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 0xc]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 0xb]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 0xa]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 9]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 8]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 7]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 6]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 5]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 4]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 3]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 2]
add ecx, r9d
add r9d, eax
movzx eax, byte [r10 - 1]
add ecx, r9d
add r9d, eax
add ecx, r9d
dec r11
jne 0x140002f3c
test edx, edx
je 0x14000300d
movzx eax, byte [r10]
inc r10
add r9d, eax
add ecx, r9d
dec edx
jne 0x140002ffc
mov eax, 0x80078071
mul r9d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xffff000f
add r9d, edx
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff000f
add ecx, edx
test r8d, r8d
jne 0x140002f13
shl ecx, 0x10
or ecx, r9d
mov eax, ecx
ret

Function at 0x1400067b0
Capabilities:
Delete file
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x20
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea r8, [0x140063ba0]
mov edx, 0x65
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rbx, rax
test rax, rax
jne 0x1400067ea
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rsi
ret
mov rdx, rax
mov qword [rsp + 0x30], rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdx, rbx
xor ecx, ecx
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x14000683c
test edi, edi
je 0x14000683c
mov r8d, edi
mov rdx, rax
mov rcx, rsi
call fcn.140007a00
mov rdi, qword [rsp + 0x30]
test al, al
setne al
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rsi
ret
mov rdi, qword [rsp + 0x30]
xor al, al
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rsi
ret
Function at 0x140007870
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov dword [rax + 0x20], r9d
push rdi
sub rsp, 0x40
mov qword [rax - 0x18], 0
xor r9d, r9d
mov edi, r8d
mov dword [rax - 0x20], 0x80
mov rsi, rdx
mov dword [rax + 0x20], 0
mov edx, 0x80000000
mov dword [rax - 0x28], 4
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
test rax, rax
je 0x140007901
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbx
cmp eax, 0xffffffff
je 0x1400078fb
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], 0
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
test eax, eax
jne 0x140007913
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
cmp dword [rsp + 0x68], 0
je 0x1400078fb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x50]
mov eax, 1
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x140007940
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
xor edi, edi
mov rsi, rdx
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 4
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
test rax, rax
je 0x1400079c5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbx
cmp eax, 0xffffffff
je 0x1400079bf
mov qword [rsp + 0x20], rdi
mov r8d, 0x100000
mov rdi, qword [rsp + 0x70]
mov rdx, rsi
mov r9, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
test eax, eax
jne 0x1400079d7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
cmp dword [rdi], 0
je 0x1400079bf
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x50]
mov eax, 1
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x140007a00
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov edi, r8d
mov dword [rsp + 0x28], 0x80
mov rsi, rdx
mov dword [rsp + 0x68], 0
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
test rax, rax
je 0x140007a7a
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], 0
mov r8d, edi
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
test eax, eax
jne 0x140007a8c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x50]
mov al, 1
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
Function at 0x140007ab0
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0xc0
xor r14d, r14d
mov rbx, r8
mov rsi, rdx
mov dword [rsp + 0x50], r14d
mov rbp, rcx
xor edx, edx
lea rcx, [rsp + 0x58]
lea r8d, [r14 + 0x60]
call fcn.140039060
lea ecx, [r14 + 0x18]
call fcn.140017e94
xor edx, edx
lea r8d, [r14 + 0x68]
lea rcx, [rsp + 0x50]
mov rdi, rax
call fcn.140039060
xor eax, eax
lea rcx, [rsp + 0x50]
mov qword [rdi], rax
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov qword [rsp + 0x48], rdi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov qword [rsp + 0x38], rbx
xor r8d, r8d
mov qword [rsp + 0x30], r14
mov rdx, rsi
mov dword [rsp + 0x28], 0x20
mov rcx, rbp
mov dword [rsp + 0x20], r14d
mov dword [rsp + 0x50], 0x68
mov word [rsp + 0x90], r14w
mov dword [rsp + 0x8c], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
lea r11, [rsp + 0xc0]
test eax, eax
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
cmovne r14, rdi
mov rsi, qword [r11 + 0x20]
mov rax, r14
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret

Function at 0x140007da0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x50
xor r15d, r15d
mov rdi, r8
mov r14, rdx
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r15 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140007dfb
xor al, al
mov rsi, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop rdi
ret
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x78], rbp
mov rcx, rsi
mov qword [rsp + 0x40], r15
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebp, dword [rsp + 0x40]
mov ecx, 0x40
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r14], rax
test rax, rax
jne 0x140007e39
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140007eae
mov qword [rsp + 0x70], rbx
mov ebx, ebp
mov dword [rdi], r15d
test ebp, ebp
jle 0x140007e87
nop word [rax + rax]
mov rdx, qword [r14]
lea r9, [rsp + 0x88]
mov r8d, ebx
mov dword [rsp + 0x88], r15d
mov rcx, rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x88]
test eax, eax
je 0x140007e87
add dword [rdi], eax
sub ebx, eax
test ebx, ebx
jg 0x140007e50
mov rcx, rsi
mov rbx, qword [rsp + 0x70]
cmp dword [rdi], ebp
je 0x140007ea6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x140007eae
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop rdi
ret
Function at 0x140008270
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rdi
mov eax, 0x1888
call fcn.140018be0
sub rsp, rax
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x1870], rax
mov rdi, rcx
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x870]
call fcn.140039060
lea rbx, [rsp + 0x18a8]
call fcn.140006180
mov rcx, qword [rax]
or rcx, 1
mov qword [rsp + 0x28], rbx
xor ebx, ebx
mov qword [rsp + 0x20], rbx
mov r9, rdi
mov r8d, 0xfff
lea rdx, [rsp + 0x870]
call fcn.14003cb34
lea rcx, [rsp + 0x870]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], bl
jne 0x140008308
cmp rax, 3
jbe 0x1400083fa
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0x70]
call fcn.140039060
movzx eax, word [rsp + 0x44]
movzx r9d, word [rsp + 0x42]
movzx r8d, word [rsp + 0x40]
lea rcx, [rsp + 0x870]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], eax
lea rdx, str._02d:_02d:_02d__ERR___s
lea rcx, [rsp + 0x70]
call fcn.140006190
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea rcx, [0x140078528]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.140007310
cmp byte [rsp + 0x70], bl
je 0x1400083b9
lea rax, [rsp + 0x70]
or rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400083b0
mov r8, rbx
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call fcn.1400089f0
nop
lea rdx, [rsp + 0x48]
lea rcx, [0x1400786c8]
call fcn.140008750
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x48]
call fcn.140007310
lea rcx, [0x140078528]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x1870]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x1888
pop rdi
pop rbx
ret
Function at 0x140008420
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rdi
mov eax, 0x1888
call fcn.140018be0
sub rsp, rax
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x1870], rax
mov rdi, rcx
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x870]
call fcn.140039060
lea rbx, [rsp + 0x18a8]
call fcn.140006180
mov rcx, qword [rax]
or rcx, 1
mov qword [rsp + 0x28], rbx
xor ebx, ebx
mov qword [rsp + 0x20], rbx
mov r9, rdi
mov r8d, 0xfff
lea rdx, [rsp + 0x870]
call fcn.14003cb34
lea rcx, [rsp + 0x870]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], bl
jne 0x1400084b8
cmp rax, 3
jbe 0x1400085aa
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0x70]
call fcn.140039060
movzx eax, word [rsp + 0x44]
movzx r9d, word [rsp + 0x42]
movzx r8d, word [rsp + 0x40]
lea rcx, [rsp + 0x870]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], eax
lea rdx, str._02d:_02d:_02d__SCAN___s
lea rcx, [rsp + 0x70]
call fcn.140006190
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea rcx, [0x140078550]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.140007310
cmp byte [rsp + 0x70], bl
je 0x140008569
lea rax, [rsp + 0x70]
or rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140008560
mov r8, rbx
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call fcn.1400089f0
nop
lea rdx, [rsp + 0x48]
lea rcx, [0x1400786a0]
call fcn.140008750
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x48]
call fcn.140007310
lea rcx, [0x140078550]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x1870]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x1888
pop rdi
pop rbx
ret
Function at 0x140008d00
Capabilities:
Check for time delay via gettickcount
Check mutex on windows
Create thread
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x1e0
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
lea rcx, [0x140008cf0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov ecx, 0x202
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rcx, [0x140078528]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140078550]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140078500]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r8, str.F5175396_40C2_0218_278D6EE
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
sete al
test rbx, rbx
je 0x140008d9f
test al, al
je 0x140008dc7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str._INF__Mutex_r_n
call fcn.140008270
or eax, 0xffffffff
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x1e0
pop rbx
ret
lea rcx, [0x140078578]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x1400785c8]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x1400785a0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor ebx, ebx
lea r8, [0x140006850]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x14000cad0]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x14000b760]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x14000a250]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x14000df80]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [method.Concurrency::details::ExternalContextBase.virtual_8]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x140008120]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0xa4cb80
jae 0x140008efa
nop dword [rax]
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0xa4cb80
jb 0x140008ee0
xor eax, eax
jmp 0x140008dae
Function at 0x140009340
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
xor ebp, ebp
mov r14, rcx
mov qword [rsp + 0x30], rbp
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
add rcx, 0x114
mov dword [rsp + 0x20], 3
lea r8d, [rbp + 1]
mov ebx, ebp
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400093df
mov eax, ebx
inc ebx
cmp eax, 0xa
jg 0x140009475
mov ecx, 0x12c
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x80
lea rcx, [r14 + 0x114]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140009390
mov ebx, dword [r14 + 0x10]
lea r8, [rsp + 0x60]
mov eax, dword [r14 + 0xc]
mov edx, ebx
xor r9d, r9d
mov dword [rsp + 0x60], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, 0x19000
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], rbp
mov r8d, 0x18ff7
mov rsi, rax
mov byte [rax], gethostbyname
lea rdx, [rax + 9]
mov ecx, dword [rsp + 0x60]
mov dword [rax + 1], ecx
mov rcx, rdi
mov dword [rax + 5], ebx
mov dword [rsp + 0x68], ebp
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x68]
test r8d, r8d
je 0x140009463
add r8d, 9
mov rdx, rsi
mov rcx, r14
call fcn.140009540
jmp 0x14000946c
mov rcx, qword [r14]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret

Function at 0x140009ab0
Capabilities:
Connect socket
Resolve dns

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov esi, r8d
mov rdi, rdx
xor r8d, r8d
mov ebp, 2
mov ecx, ebp
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
test rax, rax
jne 0x140009af4
xor eax, eax
jmp 0x140009b75
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rdi, rax
test rax, rax
je 0x140009aed
xor eax, eax
mov word [rsp + 0x28], bp
movzx ecx, si
mov qword [rsp + 0x2a], rax
mov dword [rsp + 0x32], eax
mov word [rsp + 0x36], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x2a], ax
mov r8d, reloc.WS2_32.dll_recv
mov rax, qword [rdi + 0x18]
lea rdx, [rsp + 0x28]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov rcx, rbx
mov dword [rsp + 0x2c], eax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x140009aed
mov rdx, rbx
call fcn.140009d40
mov ecx, 0x428
call fcn.140017e94
lea rcx, vtable.Tcp.0
mov qword [rsp + 0x20], rax
mov qword [rax], rcx
mov qword [rax + 0x420], rbx
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140017e70
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x140009b90
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov rcx, qword [rcx + 0x420]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov ebx, eax
test eax, eax
jne 0x140009bb5
or eax, 0xffffffff
add rsp, 0x20
pop rbx
ret
jns 0x140009bcb
call fcn.14003d130
cmp dword [rax], 4
jne 0x140009bac
call fcn.14003d130
cmp dword [rax], 0x1c
je 0x140009bac
mov eax, ebx
add rsp, 0x20
pop rbx
ret

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

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx + 0x420]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
mov edx, eax
lea ecx, [rax + 1]
or eax, 0xffffffff
cmp ecx, 1
cmova eax, edx
add rsp, 0x28
ret

Function at 0x140009c70
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [rcx + 0x420]
lea r8, [rcx + 0x210]
xor ebx, ebx
mov r10, rcx
mov dword [rcx + 8], ebx
mov r9d, ebx
mov dword [r8], ebx
mov qword [rcx + 0x10], rax
inc dword [rcx + 8]
mov ecx, dword [r8]
test ecx, ecx
je 0x140009cc5
mov edx, dword [r10 + 0x420]
nop word [rax + rax]
mov eax, r9d
cmp qword [r10 + rax*8 + 0x218], rdx
je 0x140009cc5
inc r9d
cmp r9d, ecx
jb 0x140009cb0
cmp r9d, ecx
jne 0x140009ce4
cmp ecx, 0x40
jae 0x140009ce4
mov ecx, dword [r10 + 0x420]
mov eax, r9d
mov qword [r10 + rax*8 + 0x218], rcx
inc dword [r8]
mov ecx, dword [r10 + 0x420]
lea rax, [rsp + 0x40]
inc ecx
mov qword [rsp + 0x40], 0x12c
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea rdx, [r10 + 8]
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
jns 0x140009d1d
call fcn.14003d130
cmp dword [rax], 4
jne 0x140009d21
test ebx, ebx
jne 0x140009d2a
or eax, 0xffffffff
add rsp, 0x30
pop rbx
ret
mov eax, ebx
add rsp, 0x30
pop rbx
ret

Function at 0x140009d40
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbx, rdx
mov dword [rsp + 0x50], 1
mov rcx, rbx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x140009dd3
xor ecx, ecx
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x40], rcx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rcx
lea r8, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], ecx
lea r9d, [rcx + 0xc]
mov qword [rsp + 0x20], rcx
mov rcx, rbx
mov dword [rsp + 0x5c], 0x2bf20
mov dword [rsp + 0x60], 0x3e8
call qword [sym.imp.WS2_32.dll_WSAIoctl]
xor eax, eax
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x70
pop rbx
ret
Function at 0x14000c8a0
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov esi, edx
mov rdi, rcx
mov edx, 1
mov ebp, 2
mov ecx, ebp
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14000c91f
mov rcx, rdi
mov word [rsp + 0x20], bp
call qword [sym.imp.WS2_32.dll_inet_addr]
movzx ecx, si
mov dword [rsp + 0x24], eax
call qword [sym.imp.WS2_32.dll_htons]
lea r8d, [rbp + 0xe]
mov rcx, rbx
lea rdx, [rsp + 0x20]
mov word [rsp + 0x22], ax
call qword [sym.imp.WS2_32.dll_connect]
mov rcx, rbx
cmp eax, 0xffffffff
jne 0x14000c923
call qword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x14000c92b
call qword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140017e70
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret

Function at 0x14000deb0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub rsp, 0x138
mov rax, qword [0x1400731c8]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov edx, 0x100
lea rcx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_gethostname]
lea rcx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov r9, rax
test rax, rax
jne 0x14000df06
xor al, al
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x138
ret
mov rcx, qword [rax + 0x18]
nop word [rax + rax]
mov rdx, qword [rcx]
movzx eax, byte [rdx]
movzx r8d, byte [rdx + 1]
cmp eax, 0xa
je 0x14000df2e
cmp eax, 0xc0
je 0x14000df35
cmp eax, 0xac
jne 0x14000deec
cmp eax, 0xc0
jne 0x14000df3e
cmp r8d, 0xa8
jne 0x14000deec
cmp eax, 0xac
jne 0x14000df4e
lea eax, [r8 - 0x10]
cmp eax, 0x10
ja 0x14000deec
movsx rax, word [r9 + 0x12]
add rax, rdx
cmp rax, qword [r9]
jae 0x14000df61
add rcx, 8
jmp 0x14000df10
mov al, 1
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140017e70
add rsp, 0x138
ret