joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400f3000
Capabilities:
Move file

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
lea rcx, [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm6
call fcn.1400de1c0
mov rcx, qword [rsp + 0x70]
movups xmm6, xmmword [rax]
call fcn.140188b90
mov rcx, qword [rsp + 0x78]
mov rdi, rax
call fcn.140188b90
mov r8d, 1
mov rdx, rax
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x1400f30b0
nop word [rax + rax]
lea rcx, [rsp + 0x40]
movdqa xmmword [rsp + 0x20], xmm6
call fcn.1400de1c0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x30], xmm0
call fcn.1400de250
cmp rax, 0x3e8
ja 0x1400f30df
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x1400f3060
test rdi, rdi
je 0x1400f30bd
mov rcx, rdi
call fcn.140167c30
test rbx, rbx
je 0x1400f30ca
mov rcx, rbx
call fcn.140167c30
xor eax, eax
mov rbx, qword [rsp + 0x80]
movaps xmm6, xmmword [rsp + 0x50]
add rsp, 0x60
pop rdi
ret
test rdi, rdi
je 0x1400f30ec
mov rcx, rdi
call fcn.140167c30
test rbx, rbx
je 0x1400f30f9
mov rcx, rbx
call fcn.140167c30
mov rbx, qword [rsp + 0x80]
mov eax, 1
movaps xmm6, xmmword [rsp + 0x50]
add rsp, 0x60
pop rdi
ret

Function at 0x1400f7e80
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rsi
sub rsp, 0x58
mov rcx, qword [rax + 0x18]
mov rbx, r9
xor esi, esi
mov dword [rax - 0x34], 4
mov r8, rbx
mov qword [rax - 0x20], rsi
xor edx, edx
mov qword [rax - 0x28], rsi
mov dword [rax - 0x38], esi
mov dword [rax - 0x30], ebx
call fcn.14019b380
lea r9d, [rsi + 0x18]
mov dword [rsp + 0x20], 0xf0000040
xor r8d, r8d
lea rcx, [rsp + 0x48]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1400f7f8f
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x800c
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1400f7f6d
mov r8d, dword [rsp + 0x78]
xor r9d, r9d
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x1400f7f6d
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x34]
lea r8, [rsp + 0x30]
mov dword [rsp + 0x20], esi
lea edx, [rsi + 4]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1400f7f6d
mov eax, dword [rsp + 0x30]
cmp rbx, rax
jb 0x1400f7f6d
mov r8, qword [rsp + 0x80]
lea r9, [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
lea edx, [rsi + 2]
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400f7f7d
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400f7f8f
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
add rsp, 0x58
pop rsi
pop rbx
ret
Function at 0x1400fa590
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 8], rcx
push rsi
push rdi
push r14
sub rsp, 0x20
mov rax, qword [0x140241010]
mov ebx, 1
mov edx, ebx
xor ecx, ecx
xor ebp, ebp
call qword [case.0x1400cd6b1.0]
mov rdi, rax
test rax, rax
je 0x1400fa614
mov r14, qword [rsp + 0x40]
nop dword [rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x1400fa63e
cmp ebx, esi
je 0x1400fa63e
cmp ebx, 0x8000
ja 0x1400fa63e
cmp ebx, esi
jb 0x1400fa639
mov rax, qword [0x140241010]
mov edx, ebx
mov rcx, rdi
call qword [case.0x1400cd6b1.0]
mov rdi, rax
test rax, rax
jne 0x1400fa5d0
mov rcx, rbp
mov rax, qword [fcn.140167c30]
call qword [case.0x1400cd6b1.0]
xor eax, eax
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
mov rax, rdi
jmp 0x1400fa626
mov rcx, rdi
jmp 0x1400fa617
Function at 0x14010c1c0
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x20]
xor eax, eax
mov edx, 0x8004667e
cmp dword [rsp + 0x48], eax
setne al
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
add rsp, 0x38
ret
Function at 0x140111c20
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rdi
sub rsp, 0x48
mov rdi, qword [rsp + 0x60]
mov eax, dword [rdi + 0x18]
lea ecx, [rax + rax]
mov eax, dword [rdi + 0x20]
add rax, 0x18
add rcx, rax
mov rax, qword [section..data]
call qword [case.0x1400cd6b1.0]
mov rbx, rax
test rax, rax
jne 0x140111c66
add rsp, 0x48
pop rdi
pop rbx
ret
lea rcx, [rax + 0x18]
mov qword [rax], rdi
mov qword [rax + 8], rcx
mov eax, dword [rdi + 0x18]
mov qword [rsp + 0x40], rbp
add rax, rcx
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], r14
mov r14d, dword [rsp + 0x70]
mov qword [rbx + 0x10], rax
cmp r14d, dword [rdi + 0x1c]
jbe 0x140111cd6
mov rax, qword [rdi]
call qword [case.0x1400cd6b1.0]
mov rdx, qword [rsp + 0x68]
mov r8d, r14d
mov rcx, qword [rbx + 8]
mov rax, qword [rdi + 8]
call qword [case.0x1400cd6b1.0]
mov esi, dword [rdi + 0x18]
add rsi, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, rsi
mov rax, qword [rdi + 0x10]
call qword [case.0x1400cd6b1.0]
mov rcx, qword [rbx + 8]
mov r14d, dword [rdi + 0x20]
jmp 0x140111cdb
mov rsi, qword [rsp + 0x68]
mov rax, qword [rdi]
call qword [case.0x1400cd6b1.0]
mov rcx, qword [rbx + 0x10]
mov rax, qword [rdi]
call qword [case.0x1400cd6b1.0]
xor ebp, ebp
test r14, r14
je 0x140111d4e
mov rbp, r14
nop dword [rax + rax]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x20]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x20], al
mov rcx, qword [rbx + 8]
mov rax, qword [rdi + 8]
call qword [case.0x1400cd6b1.0]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x20]
xor al, 0x5c
lea rsi, [rsi + 1]
mov byte [rsp + 0x20], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
mov rax, qword [rdi + 8]
call qword [case.0x1400cd6b1.0]
sub r14, 1
jne 0x140111d00
mov eax, dword [rdi + 0x1c]
mov r14, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
cmp rbp, rax
jae 0x140111da1
mov rcx, qword [rbx + 8]
lea rdx, [0x1401c7e69]
mov rax, qword [rdi + 8]
mov r8d, 1
call qword [case.0x1400cd6b1.0]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1401c7e6a]
mov rax, qword [rdi + 8]
mov r8d, 1
call qword [case.0x1400cd6b1.0]
mov eax, dword [rdi + 0x1c]
inc rbp
cmp rbp, rax
jb 0x140111d60
mov rbp, qword [rsp + 0x40]
mov rax, rbx
add rsp, 0x48
pop rdi
pop rbx
ret
Function at 0x140111ff0
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push rbx
push rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140241cc0]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbx, rcx
mov dword [rsp + 0x20], 0xf0000040
mov rdi, rdx
lea rcx, [r11 - 0x30]
mov rsi, r8
xor edx, edx
xor r8d, r8d
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140112049
mov eax, 0x1b
jmp 0x140112112
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x800c
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x140112084
mov rcx, qword [rsp + 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
jmp 0x140112112
mov rcx, rsi
call fcn.1400da2c0
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov r8d, eax
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x20], 0
lea edx, [r8 + 2]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp dword [rsp + 0x30], 0x20
jne 0x1401120ee
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x30]
mov r8, rbx
mov dword [rsp + 0x20], 0
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1401120fe
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140112110
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140144310
add rsp, 0x50
pop rdi
pop rsi
pop rbx
ret
Function at 0x140114640
Capabilities:
Hash data with crc32

Disassembly:
mov r8d, ecx
lea r9, [0x1401c8a50]
shr r8d, 8
movzx ecx, cl
xor r8d, dword [r9 + rcx*4]
movzx ecx, r8b
shr r8d, 8
xor r8d, dword [r9 + rcx*4]
movzx ecx, r8b
shr r8d, 8
xor r8d, dword [r9 + rcx*4]
movzx edx, r8b
shr r8d, 8
xor r8d, dword [r9 + rdx*4]
mov eax, r8d
ret
Function at 0x140127860
Capabilities:
Get hostname

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], rbx
mov qword [r11 + 8], rcx
push rsi
push rdi
push r15
sub rsp, 0x60
mov rax, qword [0x140241cc0]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor r15d, r15d
mov rbx, rcx
test byte [rcx + 0x70], 1
mov esi, r15d
mov edi, r15d
mov qword [r11 - 0x48], r15
jne 0x14012789e
mov dword [rcx], 0x100
cmp qword [rbx + 0x60], rsi
jne 0x1401278ac
mov qword [rbx + 0x60], 0x4d0
cmp qword [rbx + 8], rsi
jne 0x1401278ba
mov qword [rbx + 8], 0x7d0
cmp qword [rbx + 0x10], rsi
jne 0x1401278c8
mov qword [rbx + 0x10], 3
mov rcx, qword [rbx + 0xb8]
call fcn.14012c300
test rax, rax
jne 0x14012794b
test dword [rbx], 0x200
je 0x1401278eb
mov eax, 0x1a
jmp 0x140127aab
mov ecx, 0x7f000001
mov dword [rsp + 0x38], 2
call qword [sym.imp.WS2_32.dll_htonl]
xor r9d, r9d
mov qword [rsp + 0x20], r15
xor r8d, r8d
mov dword [rsp + 0x3c], eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.14012a020
test eax, eax
jne 0x140127aab
mov rdx, qword [rsp + 0x30]
xor r8d, r8d
mov rcx, rbx
call fcn.14012a4b0
mov rcx, qword [rsp + 0x30]
mov edi, eax
call fcn.14012ba00
test edi, edi
je 0x14012794b
mov eax, edi
jmp 0x140127aab
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], r14
cmp qword [rbx + 0x40], rsi
jne 0x140127a35
mov ebp, 0x40
mov qword [rbx + 0x40], r15
mov rax, qword [0x140241ac8]
mov ecx, ebp
mov r14d, ebp
call qword [case.0x1400cd6b1.0]
mov rsi, rax
test rax, rax
jne 0x140127990
lea eax, [rbp - 0x31]
jmp 0x140127a9b
mov edx, ebp
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x1401279cf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x1401279d3
mov rax, qword [0x140241ad0]
add r14, r14
mov rdx, r14
mov rcx, rsi
add ebp, ebp
call qword [case.0x1400cd6b1.0]
test rax, rax
je 0x140127a06
mov rsi, rax
jmp 0x140127990
test eax, eax
je 0x1401279d6
mov byte [rsi], r15b
mov edx, 0x2e
mov rcx, rsi
call fcn.14015a4cc
mov rbp, rax
test rax, rax
je 0x140127a35
mov rax, qword [0x140241ac8]
mov ecx, 8
call qword [case.0x1400cd6b1.0]
mov qword [rbx + 0x38], rax
test rax, rax
jne 0x140127a0d
mov edi, reloc.WS2_32.dll_ntohs
jmp 0x140127a84
lea rcx, [rbp + 1]
call fcn.14012cd10
mov rcx, qword [rbx + 0x38]
mov qword [rcx], rax
mov rax, qword [rbx + 0x38]
cmp qword [rax], r15
jne 0x140127a2d
mov edi, reloc.WS2_32.dll_ntohs
jmp 0x140127a84
mov qword [rbx + 0x40], 1
cmp qword [rbx + 0x50], r15
jne 0x140127a3f
mov qword [rbx + 0x48], r15
cmp qword [rbx + 0x58], r15
jne 0x140127a64
lea rcx, [0x1401d3448]
call fcn.14012cd10
mov ecx, edi
mov qword [rbx + 0x58], rax
mov edi, reloc.WS2_32.dll_ntohs
test rax, rax
cmove ecx, edi
mov edi, ecx
test dword [rbx + 0x70], 0x800000
jne 0x140127a84
mov eax, 0xa
mov qword [rbx + 0x158], 0x1388
mov word [rbx + 0x150], ax
test rsi, rsi
je 0x140127a99
mov rax, qword [0x140241ad8]
mov rcx, rsi
call qword [case.0x1400cd6b1.0]
mov eax, edi
mov rbp, qword [rsp + 0x88]
mov r14, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140144310
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r15
pop rdi
pop rsi
ret
Function at 0x14012b710
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x38
mov rsi, qword [rsp + 0x58]
test rsi, rsi
je 0x14012b7d3
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x14012b7d3
mov ecx, 0x28
mov qword [rsp + 0x30], rbx
call fcn.140127360
mov rbx, rax
test rax, rax
jne 0x14012b767
lea eax, [rbx + 0xf]
mov rbx, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rsi
ret
mov qword [rax + 0x10], rsi
lea r8, [0x14012b7e0]
mov rax, qword [rsp + 0x60]
mov r9, rbx
mov qword [rbx + 0x18], rax
xor edx, edx
lea rax, [rbx + 8]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx], rax
test rax, rax
jne 0x14012b7c2
mov rax, qword [0x140241ad8]
mov rcx, rbx
call qword [case.0x1400cd6b1.0]
mov rbx, qword [rsp + 0x30]
mov eax, 3
add rsp, 0x38
pop rdi
pop rsi
ret
mov qword [rdi], rbx
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rsi
ret
mov eax, 2
add rsp, 0x38
pop rdi
pop rsi
ret

Function at 0x14012d0a0
Capabilities:
Generate random numbers via rtlgenrandom
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
push r14
sub rsp, 0x20
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
lea r14, [rbx + 0x218]
mov rax, qword [r14]
cmp rdi, rax
jbe 0x14012d113
mov esi, 0x100
mov rcx, rbx
cmp rdi, rsi
jae 0x14012d0f9
mov r8d, esi
lea rdx, [rbx + 0x118]
sub r8, rax
call fcn.14012d140
mov qword [r14], rsi
jmp 0x14012d116
mov rdx, qword [rsp + 0x48]
mov r8, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rdi
pop rsi
jmp fcn.14012d140
mov rsi, rax
mov rcx, qword [rsp + 0x48]
sub rbx, rsi
mov r8, rdi
lea rdx, [rbx + 0x218]
call fcn.14019ace0
sub qword [r14], rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
Function at 0x14012d140
Capabilities:
Generate random numbers via rtlgenrandom
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x20
mov rsi, qword [rsp + 0x60]
xor r14d, r14d
mov rbp, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
nop dword [rax + rax]
mov ecx, dword [rdi]
mov rbx, r14
sub ecx, 1
je 0x14012d251
sub ecx, 1
je 0x14012d1f8
cmp ecx, 2
jne 0x14012d236
mov rdx, qword [rdi + 0x108]
mov r8, qword [rdi + 0x110]
test rsi, rsi
je 0x14012d1df
nop
lea rax, [rdx + 1]
movzx edx, al
movzx ecx, byte [rdx + rdi + 8]
lea rax, [rcx + r8]
movzx r8d, al
movzx eax, byte [r8 + rdi + 8]
mov byte [rdx + rdi + 8], al
mov byte [r8 + rdi + 8], cl
movzx eax, byte [rdx + rdi + 8]
add rax, rcx
movzx eax, al
movzx ecx, byte [rax + rdi + 8]
mov byte [r14 + rbp], cl
inc r14
cmp r14, rsi
jb 0x14012d1a0
mov qword [rdi + 0x108], rdx
mov qword [rdi + 0x110], r8
add rsp, 0x20
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r9, qword [rdi + 8]
mov r8, rsi
mov edx, 1
mov rcx, rbp
call fcn.140178650
test rax, rax
je 0x14012d236
add rbx, rax
cmp rbx, rsi
je 0x14012d25b
mov r9, qword [rdi + 8]
lea rcx, [rbx + rbp]
mov r8, rsi
mov edx, 1
sub r8, rbx
call fcn.140178650
test rax, rax
jne 0x14012d211
cmp dword [rdi], 2
jne 0x14012d244
mov rcx, qword [rdi + 8]
call fcn.140178c40
mov rcx, rdi
call fcn.14012ce80
jmp 0x14012d170
mov edx, esi
mov rcx, rbp
call sub.ADVAPI32.dll_SystemFunction036
add rsp, 0x20
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x14012ff00
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
sub rsp, 0x20
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140130028
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x140130028
lea rdx, [0x1401bc368]
mov qword [rsp + 0x48], rdi
call fcn.140180618
mov rdi, rax
test rax, rax
jne 0x14012ff78
call qword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x14012ff66
cmp eax, 1
je 0x14012ff66
mov rdi, qword [rsp + 0x48]
mov ebx, reloc.WS2_32.dll_ntohl
mov eax, ebx
add rsp, 0x20
pop rbx
ret
mov rdi, qword [rsp + 0x48]
mov ebx, 4
mov eax, ebx
add rsp, 0x20
pop rbx
ret
xor edx, edx
mov rcx, rdi
lea r8d, [rdx + 2]
call fcn.140177f48
test eax, eax
je 0x14012ffa4
mov rcx, rdi
mov ebx, reloc.WS2_32.dll_ntohl
call fcn.140178c40
mov rdi, qword [rsp + 0x48]
mov eax, ebx
add rsp, 0x20
pop rbx
ret
mov rcx, rdi
call fcn.140182ab4
test eax, eax
js 0x14012ff8a
mov qword [rsp + 0x40], rsi
xor r8d, r8d
xor edx, edx
movsxd rsi, eax
mov rcx, rdi
call fcn.140177f48
test eax, eax
jne 0x14012fffa
test rsi, rsi
je 0x140130005
mov rdx, rsi
mov rcx, rbx
call fcn.14012f780
test eax, eax
jne 0x140130009
mov rcx, qword [rbx + 0x10]
add rcx, qword [rbx + 8]
je 0x140130009
mov r9, rdi
lea edx, [rax + 1]
mov r8, rsi
call fcn.140178650
cmp rax, rsi
je 0x140130001
mov ebx, reloc.WS2_32.dll_ntohl
jmp 0x14013000e
add qword [rbx + 8], rsi
xor ebx, ebx
jmp 0x14013000e
mov ebx, reloc.WS2_32.dll_ntohs
mov rsi, qword [rsp + 0x40]
mov rcx, rdi
call fcn.140178c40
mov rdi, qword [rsp + 0x48]
mov eax, ebx
add rsp, 0x20
pop rbx
ret
mov eax, 2
add rsp, 0x20
pop rbx
ret
Function at 0x1401317b0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x2a8
mov rax, qword [0x140241cc0]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov rsi, qword [rsp + 0x2c0]
xor edi, edi
mov rcx, qword [rsi + 0x130]
test rcx, rcx
je 0x1401317fb
call fcn.14012cd10
mov rdi, rax
test rax, rax
je 0x140131919
cmp dword [rsp + 0x2c8], 0
je 0x14013182e
test rdi, rdi
je 0x14013181a
mov rax, qword [0x140241ad8]
mov rcx, rdi
call qword [case.0x1400cd6b1.0]
lea rcx, str.CARES_HOSTS
call fcn.14018600c
mov rcx, rax
jmp 0x14013190c
test rdi, rdi
jne 0x140131923
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x104
call fcn.14019b380
lea rax, [rsp + 0x38]
mov dword [rsp + 0x30], 0x104
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SystemCurrentControlSetServicesTcpipParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140131884
lea eax, [rdi + 4]
jmp 0x140131a0d
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str.DatabasePath
lea rax, [rsp + 0x180]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov r8d, 0x104
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x70]
dec rcx
nop
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1401318e0
mov eax, dword [str.hosts]
mov dword [rcx], eax
movzx eax, word [0x1401d37bc]
mov word [rcx + 4], ax
movzx eax, byte [0x1401d37be]
mov byte [rcx + 6], al
lea rcx, [rsp + 0x70]
call fcn.14012cd10
mov rdi, rax
test rax, rax
jne 0x140131923
mov eax, reloc.WS2_32.dll_ntohs
jmp 0x140131a0d
mov qword [rsp + 0x2d0], rbx
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x2a0], rbp
mov rcx, rdi
mov rbp, qword [rsi + 0x140]
call fcn.140184e1c
xor ebx, ebx
test eax, eax
cmove rbx, qword [rsp + 0x60]
test rbp, rbp
je 0x140131990
test rbx, rbx
jne 0x140131966
xor ecx, ecx
call fcn.1401699b4
lea rbx, [rax - 0x3c]
mov rcx, qword [rbp + 8]
mov rdx, rdi
call fcn.140138db0
test eax, eax
jne 0x140131990
cmp qword [rbp], rbx
jle 0x140131990
mov rax, qword [0x140241ad8]
mov rcx, rdi
call qword [case.0x1400cd6b1.0]
xor eax, eax
jmp 0x1401319fd
mov rbx, qword [rsi + 0x140]
test rbx, rbx
je 0x1401319cf
mov rcx, qword [rbx + 8]
mov rax, qword [0x140241ad8]
call qword [case.0x1400cd6b1.0]
mov rcx, qword [rbx + 0x18]
call fcn.14012c860
mov rcx, qword [rbx + 0x10]
call fcn.14012c860
mov rax, qword [0x140241ad8]
mov rcx, rbx
call qword [case.0x1400cd6b1.0]
lea rdx, [rsi + 0x140]
mov qword [rsi + 0x140], 0
mov rcx, rdi
call fcn.140131a30
mov ebx, eax
mov rcx, rdi
mov rax, qword [0x140241ad8]
call qword [case.0x1400cd6b1.0]
mov eax, ebx
mov rbx, qword [rsp + 0x2d0]
mov rbp, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.140144310
add rsp, 0x2a8
pop rdi
pop rsi
ret
Function at 0x140138e40
Capabilities:
Send data
Send data on socket

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
sub rsp, 0x48
mov rax, qword [rcx]
mov r9, qword [rax + 0x228]
mov rax, qword [r9 + 0x118]
test rax, rax
je 0x140138e9d
mov rax, qword [rax + 0x20]
test rax, rax
je 0x140138e9d
mov r9, qword [r9 + 0x120]
mov rcx, qword [rcx + 8]
mov qword [r11 - 0x18], rdx
mov rdx, r8
mov qword [r11 - 0x10], rdx
mov r8d, 1
lea rdx, [r11 - 0x18]
call qword [case.0x1400cd6b1.0]
add rsp, 0x48
ret
mov eax, dword [rcx + 0x24]
test al, 4
je 0x140138eaa
and eax, 0xfffffffb
mov dword [rcx + 0x24], eax
mov r8d, dword [rsp + 0x60]
xor r9d, r9d
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rcx + 8]
call qword [sym.imp.WS2_32.dll_send]
cdqe
add rsp, 0x48
ret

Function at 0x140138ed0
Capabilities:
Connect socket

Disassembly:
mov r11, rsp
mov dword [r11 + 0x20], r9d
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push rbx
sub rsp, 0x30
mov rax, qword [rcx + 0x118]
mov r9, rcx
test rax, rax
je 0x140138f1b
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140138f1b
mov r9, qword [rcx + 0x120]
mov rcx, qword [r11 + 0x10]
mov r8d, dword [r11 + 0x20]
mov rdx, qword [r11 + 0x18]
call qword [case.0x1400cd6b1.0]
jmp 0x140138f30
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp ebx, 0xffffffff
jne 0x140138f52
add eax, 0xffffd8cd
cmp eax, 1
jbe 0x140138f52
mov eax, ntohs
add rsp, 0x30
pop rbx
ret
xor eax, eax
add rsp, 0x30
pop rbx
ret
Function at 0x1401393e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], r9
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
sub rsp, 0x48
mov rax, qword [rcx + 0x118]
test rax, rax
je 0x14013943b
mov rax, qword [rax + 0x18]
test rax, rax
je 0x14013943b
mov rcx, qword [rcx + 0x120]
xor r9d, r9d
mov r8, qword [r11 + 0x20]
mov rdx, qword [r11 + 0x18]
mov qword [r11 - 0x18], rcx
xor ecx, ecx
mov qword [r11 - 0x20], rcx
mov qword [r11 - 0x28], rcx
mov rcx, qword [r11 + 0x10]
call qword [case.0x1400cd6b1.0]
add rsp, 0x48
ret
mov r8d, dword [rsp + 0x68]
xor r9d, r9d
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_recv]
cdqe
add rsp, 0x48
ret

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

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], r9
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
sub rsp, 0x48
mov rax, qword [rcx + 0x118]
test rax, rax
je 0x1401394c8
mov rax, qword [rax + 0x18]
test rax, rax
je 0x1401394c8
mov rcx, qword [rcx + 0x120]
mov r9d, dword [rsp + 0x70]
mov r8, qword [r11 + 0x20]
mov rdx, qword [r11 + 0x18]
mov qword [r11 - 0x18], rcx
mov rcx, qword [rsp + 0x80]
mov qword [r11 - 0x20], rcx
mov rcx, qword [rsp + 0x78]
mov qword [r11 - 0x28], rcx
mov rcx, qword [r11 + 0x10]
call qword [case.0x1400cd6b1.0]
add rsp, 0x48
ret
mov rax, qword [rsp + 0x80]
mov r9d, dword [rsp + 0x70]
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cdqe
add rsp, 0x48
ret