joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001a450
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [rcx]
mov rbx, rcx
mov rsi, rdx
test rdx, rdx
je 0x14001a578
cmp eax, 1
je 0x14001a4ab
call fcn.1400193a0
lea rbp, [rax + 8]
mov rdi, rax
mov rcx, rbp
call fcn.140018cb0
mov r12d, dword [rbx]
test r12d, r12d
je 0x14001a4c0
cmp r12d, 1
jne 0x14001a550
mov rcx, rbp
call fcn.140018fa0
test rdi, rdi
je 0x14001a4ab
mov rcx, rdi
call fcn.140019740
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rax, [0x140019820]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140019ac0
mov ecx, dword [0x1400be178]
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r12
test rax, rax
je 0x14001a5d0
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call r12
test rax, rax
je 0x14001a5b0
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call r12
test rax, rax
je 0x14001a590
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x14001a496
mov ecx, 2
call qword [fcn.1400170d0]
mov r9d, r12d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x14001a496
mov eax, 0x16
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140019b80
test rax, rax
jne 0x14001a539
mov rax, qword [rsp + 0x30]
mov qword [0], rax
ud2
call fcn.140019b80
test rax, rax
jne 0x14001a515
lea rax, [rsp + 0x20]
mov qword [0], rax
ud2
call fcn.140019b80
test rax, rax
jne 0x14001a4ef
mov rax, qword [pe_dos_header]
ud2

Function at 0x14001a860
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001a8d8
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.1400192b0
cmp esi, dword [rbx + 0x48]
jae 0x14001a8b3
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x14001a8b3
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.1400192f0
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140019b80
mov rbx, rax
jmp 0x14001a88d
Function at 0x14001a8f0
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001a9f0
lea r13, [rbx + 0x68]
mov rcx, r13
call fcn.1400192b0
cmp esi, dword [rbx + 0x48]
jae 0x14001a970
mov rdi, qword [rbx + 0x50]
mov qword [rdi + rsi*8], r12
mov rax, qword [rbx + 0x58]
mov rcx, r13
mov byte [rax + rsi], 1
call fcn.1400192f0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea r15d, [rsi + 1]
mov rcx, qword [rbx + 0x50]
movsxd r14, r15d
lea rdx, [r14*8]
call sub.msvcrt.dll_realloc
mov rdi, rax
test rax, rax
je 0x14001a9fd
mov rcx, qword [rbx + 0x58]
mov rdx, r14
call sub.msvcrt.dll_realloc
mov r14, rax
test rax, rax
je 0x14001a9fd
mov eax, dword [rbx + 0x48]
mov edx, r15d
sub edx, eax
lea rcx, [rdi + rax*8]
lea r8, [rdx*8]
xor edx, edx
call sub.msvcrt.dll_memset
mov ecx, dword [rbx + 0x48]
mov r8d, r15d
xor edx, edx
mov rax, rcx
add rcx, r14
sub r8d, eax
call sub.msvcrt.dll_memset
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], r14
mov dword [rbx + 0x48], r15d
jmp 0x14001a93f
call fcn.140019b80
mov rbx, rax
jmp 0x14001a92a
mov rcx, r13
call fcn.1400192f0
mov eax, 0xc
jmp 0x14001a95d

Function at 0x14001aa80
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001aaa8
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.140019b80
test rax, rax
jne 0x14001aa9a
add rsp, 0x28
ret

Function at 0x14001ab10
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001ab38
add rax, 0x18
add rsp, 0x28
ret
call fcn.140019b80
test rax, rax
jne 0x14001ab2a
jmp 0x14001ab2e

Function at 0x14001ac50
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x1400fbd68]
test eax, eax
jne 0x14001ac68
xor eax, eax
add rsp, 0x28
ret
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001ac98
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x14001ac5e
test byte [rax + 0x40], 3
je 0x14001ac5e
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x14001ac60
call fcn.140019b80
test rax, rax
jne 0x14001ac7e
jmp 0x14001ac5e

Function at 0x14001acb0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001acf0
test ebx, ebx
jle 0x14001ace0
lock add dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
lock sub dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
call fcn.140019b80
test rax, rax
jne 0x14001accd
add rsp, 0x20
pop rbx
ret
Function at 0x14001ade0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001ae58
test byte [rbx + 0x40], 0xc
jne 0x14001ae0f
mov eax, dword [0x1400fbd68]
test eax, eax
jne 0x14001ae20
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.140018cb0
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x14001ae43
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x14001ae43
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x14001ae6c
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.140018fa0
call fcn.140019b80
mov rbx, rax
test rax, rax
jne 0x14001adff
add rsp, 0x28
pop rbx
pop rsi
ret
and eax, 0xfffffff3
mov rcx, qword [rbx + 0x30]
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x14001ae8a
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.140018fa0
call fcn.14001ad00
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14001af10
call fcn.140018a60
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x14001af48
call fcn.140019ac0
mov ecx, dword [0x1400be178]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001afa0
test esi, esi
je 0x14001af26
call fcn.14001ade0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001af80
mov edx, edi
call fcn.140018b10
call fcn.14001ade0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001af90
call fcn.14001ade0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001ade0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140019ac0
mov ecx, dword [0x1400be178]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x14001aee5
call fcn.140019b80
mov rbx, rax
jmp 0x14001aee5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001aefe
call fcn.140019b80
jmp 0x14001af26
call fcn.140019b80
mov rbx, rax
jmp 0x14001aee1
Function at 0x14001aea0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001ae58
test byte [rbx + 0x40], 0xc
jne 0x14001ae0f
mov eax, dword [0x1400fbd68]
test eax, eax
jne 0x14001ae20
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.140018cb0
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x14001ae43
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x14001ae43
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x14001ae6c
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.140018fa0
call fcn.140019b80
mov rbx, rax
test rax, rax
jne 0x14001adff
add rsp, 0x28
pop rbx
pop rsi
ret
and eax, 0xfffffff3
mov rcx, qword [rbx + 0x30]
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x14001ae8a
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.140018fa0
call fcn.14001ad00
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14001af10
call fcn.140018a60
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x14001af48
call fcn.140019ac0
mov ecx, dword [0x1400be178]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001afa0
test esi, esi
je 0x14001af26
call fcn.14001ade0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001af80
mov edx, edi
call fcn.140018b10
call fcn.14001ade0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001af90
call fcn.14001ade0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001ade0
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140019ac0
mov ecx, dword [0x1400be178]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x14001aee5
call fcn.140019b80
mov rbx, rax
jmp 0x14001aee5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001aefe
call fcn.140019b80
jmp 0x14001af26
call fcn.140019b80
mov rbx, rax
jmp 0x14001aee1

Function at 0x14001afb0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
call fcn.140019ac0
mov ecx, dword [0x1400be178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001b020
test esi, esi
je 0x14001b000
call fcn.14001ade0
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001b030
mov edx, esi
call fcn.140018b10
call fcn.14001ade0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.14001ade0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14001ade0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.140019b80
mov rbx, rax
jmp 0x14001afd1
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001afea
Function at 0x140080f10
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 rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sub.msvcrt.dll__fileno_1
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sub.msvcrt.dll__read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x140080f58
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x140080f2a
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x14000228c
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push r12
sub rsp, 0x40
xor ebx, ebx
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 1]
mov dword [rsp + 0x28], 0x80
mov r12, rcx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18000217a
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x58], rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rsi
movsxd rdi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jle 0x180002175
mov rcx, qword [0x18003be50]
mov eax, select
mov qword [rsp + 0x50], rbp
lea ebp, [rdi + 1]
cmp ebp, eax
cmovl ebp, eax
test ebp, ebp
cmovle ebp, eax
call fcn.1800010a0
mov rsi, rax
test rax, rax
je 0x18000213a
mov rdx, rax
mov ecx, ebp
mov dword [rax + 4], ebx
call fcn.180001120
mov qword [rsi + 8], rax
mov byte [rax], bl
mov rbx, rsi
mov rdx, qword [rbx + 8]
mov r9d, edi
xor r8d, r8d
mov rcx, r12
call fcn.180003a80
mov rcx, qword [rbx + 8]
mov rbp, qword [rsp + 0x50]
mov dword [rbx + 4], edi
mov rax, rbx
mov byte [rdi + rcx], 0
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop r12
ret
mov rax, rbx
jmp 0x18000215f
mov rsi, qword [rsp + 0x68]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r12
ret

Function at 0x180002190
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rbp, rdx
xor r9d, r9d
mov rbx, rcx
mov qword [rsp + 0x30], 0
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov rcx, rbp
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180002239
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rsi
movsxd rdi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x180002239
mov edx, dword [rbx]
cmp edi, edx
jl 0x18000221a
mov rcx, qword [rbx + 8]
call fcn.180001240
lea ecx, [rdi + 1]
mov rdx, rbx
call fcn.180001120
mov qword [rbx + 8], rax
mov rdx, qword [rbx + 8]
mov r9d, edi
xor r8d, r8d
mov rcx, rbp
mov dword [rbx + 4], edi
call fcn.180003a80
mov rax, qword [rbx + 8]
mov byte [rdi + rax], 0
jmp 0x180002248
lea rdx, [0x18002e55b]
mov rcx, rbx
call fcn.180001ab0
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rax, rbx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x1800034b0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x20
mov rsi, rdx
mov rbx, rcx
call fcn.180003070
test eax, eax
jne 0x1800034d4
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret
mov qword [rsp + 0x30], rbp
movsxd rbp, eax
mov r9d, 0x40
mov r8d, 0x3000
xor ecx, ecx
mov rdx, rbp
mov qword [rsp + 0x38], rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
je 0x1800035b5
mov r8, rsi
mov rdx, rax
mov rcx, rbx
call fcn.180003100
mov rax, qword [rbx + 0x20]
cmp dword [rax + 0xb0], 0
jbe 0x180003533
cmp dword [rax + 0xb4], 0
jbe 0x180003533
mov rdx, rdi
mov rcx, rbx
call fcn.1800031d0
mov rdx, rdi
mov rcx, rbx
call fcn.1800032a0
test eax, eax
jne 0x180003557
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x1800035c9
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r11, qword [rbx + 0x20]
xor r8d, r8d
mov qword [r11 + 0x30], rdi
mov rax, qword [rbx + 0x20]
lea edx, [r8 + 1]
mov eax, dword [rax + 0x28]
mov rcx, rdi
add rax, rdi
mov qword [rbx], rax
call rax
test eax, eax
jne 0x1800035b9
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [rbx]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [rbx], 0
xor eax, eax
jmp 0x1800035c9
mov dword [rbx + 8], 1
mov qword [rbx + 0x10], rdi
mov eax, 1
mov rbp, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret

Function at 0x180003a80
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov esi, r9d
xor r9d, r9d
mov rbp, rdx
mov qword [rsp + 0x30], 0
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov rdi, rcx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180003aec
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
xor eax, eax
jmp 0x180003b63
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x180003b26
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetFilePoint_Errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180003b63
lea r9, [rsp + 0x40]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180003b56
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ReadFile_errors__d__s_r_n
jmp 0x180003b0f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x180003b80
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x40
mov qword [rax - 0x18], 0
xor r9d, r9d
mov esi, r8d
mov rbp, rdx
mov dword [rax - 0x20], 0x80
lea r8d, [r9 + 2]
mov edx, 0x40000000
mov rdi, rcx
mov dword [rax + 0x20], 0
mov dword [rax - 0x28], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180003bf0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
xor eax, eax
jmp 0x180003c42
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, rbp
mov rcx, rax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180003c35
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WriteFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180003c42
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret

Function at 0x180003c60
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x40
mov qword [rax - 0x18], 0
xor r9d, r9d
mov esi, r8d
mov rbp, rdx
mov dword [rax - 0x20], 0x80
lea r8d, [r9 + 2]
mov edx, 0x40000000
mov rdi, rcx
mov dword [rax + 0x20], 0
mov dword [rax - 0x28], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180003cd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
xor eax, eax
jmp 0x180003d4a
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x180003d0d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetFilePoint_Errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003e10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180003d4a
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180003d3d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WriteFile_errors__d__s_r_n
jmp 0x180003cf6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x180004000
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor eax, eax
movzx edi, r8b
movzx ebx, cx
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], eax
test rdx, rdx
je 0x18000404b
cmp byte [rdx], al
je 0x18000404b
mov rcx, rdx
call qword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x180004053
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov esi, 2
movzx ecx, bx
mov dword [rsp + 0x3c], eax
mov word [rsp + 0x38], si
call qword [sym.imp.WS2_32.dll_htons]
lea edx, [rsi - 1]
xor r8d, r8d
mov ecx, esi
mov word [rsp + 0x3a], ax
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
test dil, dil
je 0x1800040ac
lea r9, [rsp + 0x30]
lea r8d, [rsi + 2]
mov edx, 0xffff
mov rcx, rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rdx, [rsp + 0x38]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_bind]
mov rcx, rbx
cmp eax, 0xffffffff
jne 0x1800040df
mov edx, esi
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x1800040f7
mov edx, 5
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x1800040f4
mov rcx, rbx
jmp 0x1800040c8
mov rax, rbx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180018330
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x180004120
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x270
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov ebp, r8d
xor r8d, r8d
mov rdi, rdx
movzx esi, cx
mov r12d, 2
lea edx, [r8 + 1]
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
xor eax, eax
mov dword [rsp + 0x250], eax
mov dword [rsp + 0x254], eax
mov dword [rsp + 0x258], eax
mov dword [rsp + 0x25c], eax
test rdi, rdi
je 0x180004194
cmp byte [rdi], al
je 0x180004194
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x18000419c
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
movzx ecx, si
mov dword [rsp + 0x254], eax
mov word [rsp + 0x250], r12w
call qword [sym.imp.WS2_32.dll_htons]
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rsp + 0x30], 1
mov word [rsp + 0x252], ax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rdx, [rsp + 0x250]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
mov eax, 0x10624dd3
lea ecx, [rbx + 1]
imul ebp
sar edx, 6
lea r8, [rsp + 0x40]
mov eax, edx
xor edi, edi
xor r9d, r9d
shr eax, 0x1f
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 1
add edx, eax
lea rax, [rsp + 0x38]
mov dword [rsp + 0x3c], edi
mov dword [rsp + 0x38], edx
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov rcx, rbx
test eax, eax
jg 0x180004253
mov edx, r12d
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x18000426a
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov dword [rsp + 0x30], edi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, rbx
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.180018330
add rsp, 0x270
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x180004290
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x240
mov r8d, edx
mov rbx, rcx
test edx, edx
jg 0x1800042ae
mov al, 1
add rsp, 0x240
pop rbx
ret
mov eax, 0x10624dd3
mov qword [rsp + 0x38], rcx
xor r9d, r9d
inc ecx
mov dword [rsp + 0x30], 1
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
lea rax, [rsp + 0x260]
mov dword [rsp + 0x260], edx
mov qword [rsp + 0x20], rax
imul edx, edx, 0x3e8
sub r8d, edx
lea rdx, [rsp + 0x30]
imul r8d, r8d, 0x3e8
mov dword [rsp + 0x264], r8d
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x18000431c
xor al, al
add rsp, 0x240
pop rbx
ret
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
setne al
add rsp, 0x240
pop rbx
ret