joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140070370
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x50
mov rax, qword [0x1400ae010]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor edx, edx
lea r9, [rsp + 0x20]
mov rsi, rcx
xor r14d, r14d
xor r8d, r8d
mov dword [rsp + 0x20], r14d
mov ebx, r14d
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x1400703f9
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rax
mov ecx, 0xb
mov rbx, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x1400703b0
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x80], rdi
test eax, eax
js 0x1400704d4
mov edi, r14d
cmp dword [rbx], r14d
jbe 0x1400704d4
nop word [rax + rax]
mov ebp, edi
lea rdx, [rbx + 0x30]
imul rax, rbp, 0x128
mov qword [rsp + 0x28], r14
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x40], 0xf
movzx ecx, word [rax + rbx + 0x2e]
add rcx, rax
add rdx, rcx
inc r8
cmp byte [rdx + r8], r14b
jne 0x140070452
lea rcx, [rsp + 0x28]
call fcn.140069430
cmp qword [rsi + 0x18], 0x10
mov rdx, rsi
jb 0x140070472
mov rdx, qword [rsi]
cmp qword [rsp + 0x40], 0x10
lea rcx, [rsp + 0x28]
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x14007050a
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x1400704ca
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400704c5
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14007055b
call fcn.140070b28
inc edi
cmp edi, dword [rbx]
jb 0x140070420
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rdi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140070580
add rsp, 0x50
pop r14
pop rsi
pop rbx
ret
imul rax, rbp, 0x128
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
mov rdi, qword [rax + rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x140070567
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140070562
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140070562
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140070b28
mov rax, rdi
jmp 0x1400704e7
Function at 0x1410201b8
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14102033f
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1410201e9
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1410201cf
add dl, dl
jne 0x1410201f6
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141020256
xor eax, eax
add dl, dl
jne 0x141020205
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14102030d
add dl, dl
jne 0x141020216
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141020223
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141020230
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14102023d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14102024a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1410201de
mov eax, 1
add dl, dl
jne 0x141020266
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141020273
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14102025b
sub eax, ebx
mov ebx, 1
jne 0x1410202ac
mov ecx, 1
add dl, dl
jne 0x14102028e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14102029b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141020283
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1410201de
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1410202c8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1410202d5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1410202bd
cmp eax, 0x7d00
jae 0x1410202fb
cmp eax, 0x500
jb 0x1410202f6
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1410201de
cmp eax, 0x7f
ja 0x1410202fe
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1410201de
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x141020332
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1410201de
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1400111d1
Capabilities:
Parse pe header

Disassembly:
jmp 0x140011a90
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x128
lea rbp, [rsp + 0x20]
lea rcx, [0x1400230ac]
call fcn.140011389
mov rax, qword [rbp + 0x120]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140011ad1
xor eax, eax
jmp 0x140011b2a
mov rax, qword [rbp + 8]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0x120]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
cmp dword [rax], 0x4550
je 0x140011afa
xor eax, eax
jmp 0x140011b2a
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rbp + 0x28]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rbp + 0x120]
add rcx, rax
mov rax, rcx
mov rcx, qword [rbp + 0x128]
mov qword [rcx], rax
mov eax, 1
lea rsp, [rbp + 0x108]
pop rdi
pop rbp
ret

Function at 0x1400111f9
Capabilities:
Terminate process

Disassembly:
jmp 0x140013890
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 0x14001128a
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014be0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014c00
xor al, al
jmp 0x140014c81
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014c13
xor al, al
jmp 0x140014c81
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 0x140014c3d
xor al, al
jmp 0x140014c81
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014c51
xor al, al
jmp 0x140014c81
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014c63
xor al, al
jmp 0x140014c81
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140014c7f
xor al, al
jmp 0x140014c81
mov al, 1
add rsp, 0x38
ret
Function at 0x14001135c
Capabilities:
Contain obfuscated stackstrings

Disassembly:
jmp 0x140011eb0
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14001e188]
xor rax, rbp
mov qword [rbp + 0x158], rax
lea rcx, [0x1400230ac]
call fcn.140011389
mov dword [rbp + 4], 0
mov byte [rbp + 0x28], 0x41
mov byte [rbp + 0x29], 0x64
mov byte [rbp + 0x2a], 0x76
mov byte [rbp + 0x2b], 0x61
mov byte [rbp + 0x2c], 0x70
mov byte [rbp + 0x2d], 0x69
mov byte [rbp + 0x2e], 0x33
mov byte [rbp + 0x2f], 0x32
mov byte [rbp + 0x30], 0x2e
mov byte [rbp + 0x31], 0x64
mov byte [rbp + 0x32], 0x6c
mov byte [rbp + 0x33], 0x6c
mov byte [rbp + 0x34], 0
mov byte [rbp + 0x58], 0x53
mov byte [rbp + 0x59], 0x79
mov byte [rbp + 0x5a], 0x73
mov byte [rbp + 0x5b], 0x74
mov byte [rbp + 0x5c], 0x65
mov byte [rbp + 0x5d], 0x6d
mov byte [rbp + 0x5e], 0x46
mov byte [rbp + 0x5f], 0x75
mov byte [rbp + 0x60], 0x6e
mov byte [rbp + 0x61], 0x63
mov byte [rbp + 0x62], 0x74
mov byte [rbp + 0x63], 0x69
mov byte [rbp + 0x64], 0x6f
mov byte [rbp + 0x65], 0x6e
mov byte [rbp + 0x66], 0x30
mov byte [rbp + 0x67], 0x33
mov byte [rbp + 0x68], 0x32
mov byte [rbp + 0x69], 0
lea rcx, [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, [rbp + 0x58]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x88], rax
cmp qword [rbp + 0x88], 0
jne 0x140011f9c
xor eax, eax
jmp 0x140012016
lea rax, str.JWuNkGdL7sTcQPP
mov qword [0x14001ea58], rax
mov eax, dword [0x14001e11c]
mov dword [0x14001ea50], eax
lea rax, section..data
mov qword [0x14001ea78], rax
mov eax, dword [0x14001e118]
mov dword [0x14001ea70], eax
lea rdx, [0x14001ea50]
lea rcx, [0x14001ea70]
call qword [rbp + 0x88]
test eax, eax
je 0x140011ff4
mov dword [rbp + 0x154], 1
jmp 0x140011ffe
mov dword [rbp + 0x154], 0
mov eax, dword [rbp + 0x154]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
je 0x140012011
xor eax, eax
jmp 0x140012016
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14001ac60]
call fcn.140011320
mov rax, rdi
mov rcx, qword [rbp + 0x158]
xor rcx, rbp
call fcn.1400111ae
lea rsp, [rbp + 0x168]
pop rdi
pop rbp
ret

Function at 0x1400113cf
Capabilities:
Execute syscall

Disassembly:
jmp 0x140012451
mov r10, rcx
mov eax, dword [0x14001e170]
syscall
ret
Function at 0x180001a00
Capabilities:
Hash data with md5

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x90
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rdi, rcx
mov dword [rsp + 0x20], 0x67452301
xor ebx, ebx
mov dword [rsp + 0x24], 0xefcdab89
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x98badcfe
mov dword [rsp + 0x2c], 0x10325476
call sym.ProxyProtocol.dll_MD4Update
mov r8d, ebx
lea rdx, [rsp + 0x82]
lea r9d, [rbx + 2]
mov eax, r8d
lea rdx, [rdx + 4]
inc r8d
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0x30]
mov byte [rdx - 6], al
movzx eax, byte [rsp + rcx + 0x31]
mov byte [rdx - 5], al
movzx eax, byte [rsp + rcx + 0x32]
mov byte [rdx - 4], al
movzx eax, byte [rsp + rcx + 0x33]
mov byte [rdx - 3], al
sub r9, 1
jne 0x180001a62
mov ecx, dword [rsp + 0x30]
lea rdx, section..data
shr ecx, 3
mov eax, 0x78
and ecx, 0x3f
mov r8d, gethostname
sub eax, ecx
sub r8d, ecx
cmp ecx, 0x38
lea rcx, [rsp + 0x20]
cmovae r8d, eax
call sym.ProxyProtocol.dll_MD4Update
mov r8d, 8
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x20]
call sym.ProxyProtocol.dll_MD4Update
lea rax, [rdi + 2]
mov r8d, 4
nop
lea rdx, [rbx*4]
movzx ecx, byte [rsp + rdx + 0x20]
lea ebx, [rbx + 1]
mov byte [rax - 2], cl
lea rax, [rax + 4]
movzx ecx, byte [rsp + rdx + 0x21]
mov byte [rax - 5], cl
movzx ecx, byte [rsp + rdx + 0x22]
mov byte [rax - 4], cl
movzx ecx, byte [rsp + rdx + 0x23]
mov byte [rax - 3], cl
sub r8, 1
jne 0x180001af0
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.180027140
mov rbx, qword [rsp + 0xb8]
add rsp, 0x90
pop rdi
ret
Function at 0x180002650
Capabilities:
Hash data with md5

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x90
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rdi, rcx
mov dword [rsp + 0x20], 0x67452301
xor ebx, ebx
mov dword [rsp + 0x24], 0xefcdab89
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x98badcfe
mov dword [rsp + 0x2c], 0x10325476
call sym.ProxyProtocol.dll_librad_MD5Update
mov r8d, ebx
lea rdx, [rsp + 0x82]
lea r9d, [rbx + 2]
mov eax, r8d
lea rdx, [rdx + 4]
inc r8d
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0x30]
mov byte [rdx - 6], al
movzx eax, byte [rsp + rcx + 0x31]
mov byte [rdx - 5], al
movzx eax, byte [rsp + rcx + 0x32]
mov byte [rdx - 4], al
movzx eax, byte [rsp + rcx + 0x33]
mov byte [rdx - 3], al
sub r9, 1
jne 0x1800026b2
mov ecx, dword [rsp + 0x30]
lea rdx, [0x18004d4f0]
shr ecx, 3
mov eax, 0x78
and ecx, 0x3f
mov r8d, gethostname
sub eax, ecx
sub r8d, ecx
cmp ecx, 0x38
lea rcx, [rsp + 0x20]
cmovae r8d, eax
call sym.ProxyProtocol.dll_librad_MD5Update
mov r8d, 8
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x20]
call sym.ProxyProtocol.dll_librad_MD5Update
lea rax, [rdi + 2]
mov r8d, 4
nop
lea rdx, [rbx*4]
movzx ecx, byte [rsp + rdx + 0x20]
lea ebx, [rbx + 1]
mov byte [rax - 2], cl
lea rax, [rax + 4]
movzx ecx, byte [rsp + rdx + 0x21]
mov byte [rax - 5], cl
movzx ecx, byte [rsp + rdx + 0x22]
mov byte [rax - 4], cl
movzx ecx, byte [rsp + rdx + 0x23]
mov byte [rax - 3], cl
sub r8, 1
jne 0x180002740
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.180027140
mov rbx, qword [rsp + 0xb8]
add rsp, 0x90
pop rdi
ret
Function at 0x180011880
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x4b0
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
mov r15, r8
mov rsi, rdx
mov r14, rcx
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0xa0]
call fcn.180027fa0
movabs rax, 0x5053534d4c544e
mov byte [rsp + 0xa8], 2
mov edx, 0x80
mov qword [rsp + 0xa0], rax
lea rcx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_gethostname]
lea rcx, [rsp + 0x20]
mov byte [rsp + 0x2f], 0
mov rax, 0xffffffffffffffff
nop
cmp byte [rcx + rax + 1], 0
lea rax, [rax + 1]
jne 0x180011900
lea ebp, [rax + rax]
mov byte [rsp + 0xb0], gethostbyname
movzx eax, byte [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov byte [rsp + 0xac], bpl
xor ebx, ebx
mov byte [rsp + 0xae], bpl
mov dword [rsp + 0xb4], 0xa0818203
nop dword [rax]
movsx ecx, al
call fcn.18002be68
mov byte [rsp + rbx + 0xd0], al
lea rdi, [rdi + 1]
movzx eax, byte [rdi]
mov byte [rsp + rbx + 0xd1], 0
add rbx, 2
test al, al
je 0x18001196c
cmp rbx, 0x40
jl 0x180011940
mov rcx, rsi
call fcn.18003606c
mov eax, dword [r14 + 0x18c]
mov edx, 8
mov dword [rsi + 4], eax
mov rcx, rsi
movzx eax, byte [r14 + 0x18a]
xor byte [rsi + 1], al
call sym.ProxyProtocol.dll_myrand
xor byte [rsi], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 1], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 2], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 3], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 4], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 5], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 6], al
mov edx, 8
mov rcx, rsi
call sym.ProxyProtocol.dll_myrand
xor byte [rsi + 7], al
lea r8d, [rbp + 0x30]
mov rax, qword [rsi]
lea rcx, [rsp + 0xa0]
mov rdx, r15
mov qword [rsp + 0xb8], rax
call sym.ProxyProtocol.dll_en64
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.180027140
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x4b0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x180016390
Capabilities:
Encode data using base64

Disassembly:
test r8d, r8d
jle 0x18001644f
lea r9, [rcx + 2]
lea r11, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [r9 - 2]
shr rax, 2
movzx eax, byte [rax + r11]
mov byte [rdx], al
cmp r8d, 1
jbe 0x1800163d0
movzx eax, byte [r9 - 1]
shr eax, 4
jmp 0x1800163d2
xor eax, eax
movzx ecx, byte [r9 - 2]
and ecx, 3
shl rcx, 4
or rcx, rax
movzx eax, byte [rcx + r11]
mov byte [rdx + 1], al
cmp r8d, 1
jbe 0x18001642f
cmp r8d, 2
jbe 0x1800163fe
movzx eax, byte [r9]
shr eax, 6
jmp 0x180016400
xor eax, eax
movzx ecx, byte [r9 - 1]
and ecx, 0xf
shl rcx, 2
or rcx, rax
movzx eax, byte [rcx + r11]
mov byte [rdx + 2], al
add rdx, 3
cmp r8d, 2
jbe 0x180016437
movzx eax, byte [r9]
and eax, 0x3f
movzx ecx, byte [rax + r11]
jmp 0x180016439
mov byte [rdx + 2], 0x3d
add rdx, 3
mov cl, 0x3d
mov byte [rdx], cl
sub r8d, 3
inc rdx
add r9, 3
test r8d, r8d
jg 0x1800163b0
mov rax, rdx
mov byte [rdx], 0
ret
Function at 0x18001bf30
Capabilities:
Set socket configuration

Disassembly:
push rbp
push rsi
sub rsp, 0x38
mov eax, 1
mov esi, edx
mov rbp, rcx
cmp edx, eax
jl 0x18001bfc2
mov qword [rsp + 0x50], rbx
mov ebx, eax
mov qword [rsp + 0x60], rdi
lea rdi, sym.ProxyProtocol.dll_sockopts
mov qword [rsp + 0x30], r14
mov r14d, 0xfffb
mov dword [rsp + 0x58], 1
test esi, eax
je 0x18001bfa7
mov rax, qword [rdi + 8]
movzx ecx, byte [rax]
cmp cl, 0x54
jne 0x18001bf82
mov edx, 6
jmp 0x18001bf8e
cmp cl, 0x49
mov edx, 0xffff
cmove edx, r14d
mov r8d, dword [rdi]
lea r9, [rsp + 0x58]
mov rcx, rbp
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
rol ebx, 1
add rdi, 0x10
mov eax, ebx
cmp esi, ebx
jge 0x18001bf63
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
add rsp, 0x38
pop rsi
pop rbp
ret

Function at 0x18001c3c0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rdi, qword [rcx + 0x10]
mov rbx, rcx
mov rax, qword [rdi + 0x40]
cmp rax, 0xffffffffffffffff
je 0x18001c528
mov dword [rsp + 0x30], reloc.WS2_32.dll_recv
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x40], 0x300
mov edi, dword [rdi + 0x4c]
sar edi, 0xa
add edi, 5
je 0x18001c560
nop word [rax + rax]
mov edx, 1
lea rcx, [rsp + 0x38]
mov r8d, 0x2328
call qword [sym.ProxyProtocol.dll_mypoll]
cmp eax, 1
jne 0x18001c551
mov rcx, qword [rbx + 0x10]
lea r8, [rsp + 0x30]
lea rdx, [rbx + 0x1a8]
mov rcx, qword [rcx + 0x40]
call qword [0x180064838]
mov qword [rbx + 0x78], rax
cmp rax, 0xffffffffffffffff
jne 0x18001c477
lea rdx, str.Connect_back_accept___failed
mov rcx, rbx
call sym.ProxyProtocol.dll_dolog
jmp 0x18001c519
lea r8, [rsp + 0x34]
mov dword [rsp + 0x34], 1
mov edx, 0x8004667e
mov rcx, rax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movups xmm0, xmmword [rbx + 0x1a8]
mov rax, qword [rbx + 0x10]
movups xmmword [rbx + 0x1b8], xmm0
cmp qword [rax + 0x140], 0
je 0x18001c4bc
mov rcx, rbx
call sym.ProxyProtocol.dll_checkACL
mov dword [rbx + 0xdc], eax
cmp dword [rbx + 0xdc], 0
je 0x18001c4ce
lea rdx, str.Connect_back_ACL_failed
jmp 0x18001c4ff
mov rcx, qword [rbx + 0x78]
lea r8, [0x18004ed4c]
mov r9d, 1
mov dword [rsp + 0x20], 0x2328
lea rdx, [rbx + 0x1a8]
call sym.ProxyProtocol.dll_socksendto
cmp eax, 1
je 0x18001c524
lea rdx, str.Connect_back_sending_command_failed
mov rcx, rbx
call sym.ProxyProtocol.dll_dolog
mov rcx, qword [rbx + 0x78]
call qword [0x1800648a8]
mov qword [rbx + 0x78], 0xffffffffffffffff
sub edi, 1
jne 0x18001c420
jmp 0x18001c560
test edi, edi
je 0x18001c560
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [rax + 0x30]
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180027140
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea rdx, str.Connect_back_not_received__check_connback_client
mov rcx, rbx
call sym.ProxyProtocol.dll_dolog
mov rcx, rbx
mov dword [rbx + reloc.WS2_32.dll_listenc], 0xd
call sym.ProxyProtocol.dll_freeparam
jmp 0x18001c532
Function at 0x180020180
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
mov edx, dword [0x180064958]
lea rax, [rsp + 0x48]
mov r9, rcx
mov qword [rsp + 0x28], rax
add edx, 0x4000
mov dword [rsp + 0x20], 0
lea r8, [sym.ProxyProtocol.dll_startsrv]
mov dword [0x18006495c], 1
xor ecx, ecx
call fcn.180036854
test rax, rax
je 0x1800201cb
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x18006495c], 0
je 0x1800201e8
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x18006495c], 0
jne 0x1800201d4
mov eax, dword [sym.ProxyProtocol.dll_haveerror]
test eax, eax
je 0x18002023e
lea rcx, str.:_insufficient_memory
mov qword [rsp + 0x30], rbx
cmp eax, 2
lea rbx, [0x18004d577]
cmove rbx, rcx
mov ecx, 2
call fcn.180036240
mov r8d, dword [sym.ProxyProtocol.dll_linenum]
lea rdx, str.Service_not_started_on_line:__d_s_n
mov rcx, rax
mov r9, rbx
call sym.ProxyProtocol.dll_fprintf
mov rbx, qword [rsp + 0x30]
mov eax, 0x28
add rsp, 0x38
ret
xor eax, eax
add rsp, 0x38
ret
Function at 0x180020bf0
Capabilities:
Get socket status

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x590]
sub rsp, 0x690
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rbp + 0x580], rax
mov r12d, edx
mov eax, 0x10624dd3
imul r8d
mov qword [rsp + 0x6d8], r13
mov r15, rcx
xor r13d, r13d
sar edx, 6
mov eax, edx
mov qword [rsp + 0x40], rcx
shr eax, 0x1f
mov edi, r13d
add edx, eax
mov dword [rsp + 0x50], r13d
imul eax, edx, 0x3e8
mov r9d, r13d
mov dword [rsp + 0x38], edx
mov esi, r12d
mov edx, r13d
mov dword [rbp + 0x160], r13d
mov dword [rbp + 0x370], edx
mov r14d, 0x400
sub r8d, eax
imul eax, r8d, 0x3e8
mov r8d, r13d
mov dword [rsp + 0x3c], eax
test r12d, r12d
je 0x180020da1
mov r10, rcx
mov r14d, r12d
mov r15d, 0x300
nop word [rax + rax]
movzx ebx, word [r10 + 8]
test r15w, bx
je 0x180020ce4
mov ecx, r13d
test r8d, r8d
je 0x180020cc4
mov r11, qword [r10]
cmp qword [rsp + rcx*8 + 0x58], r11
je 0x180020cc4
inc ecx
cmp ecx, r8d
jb 0x180020cb6
cmp ecx, r8d
jne 0x180020ce4
cmp r8d, 0x40
jae 0x180020ce4
mov rax, qword [r10]
mov qword [rsp + rcx*8 + 0x58], rax
mov r8d, dword [rsp + 0x50]
inc r8d
mov dword [rsp + 0x50], r8d
test bl, 0x10
je 0x180020d2c
mov ecx, r13d
test r9d, r9d
je 0x180020d05
mov r11, qword [r10]
cmp qword [rbp + rcx*8 + 0x168], r11
je 0x180020d05
inc ecx
cmp ecx, r9d
jb 0x180020cf4
cmp ecx, r9d
jne 0x180020d2c
cmp r9d, 0x40
jae 0x180020d2c
mov rax, qword [r10]
mov qword [rbp + rcx*8 + 0x168], rax
mov r9d, dword [rbp + 0x160]
inc r9d
mov dword [rbp + 0x160], r9d
bt bx, 0xa
jae 0x180020d76
mov eax, r13d
test edx, edx
je 0x180020d52
mov r11, qword [r10]
nop dword [rax]
mov ecx, eax
cmp qword [rbp + rcx*8 + 0x378], r11
je 0x180020d52
inc eax
cmp eax, edx
jb 0x180020d40
cmp eax, edx
jne 0x180020d76
cmp edx, 0x40
jae 0x180020d76
mov ecx, eax
mov rax, qword [r10]
mov qword [rbp + rcx*8 + 0x378], rax
mov edx, dword [rbp + 0x370]
inc edx
mov dword [rbp + 0x370], edx
mov rax, qword [r10]
cmp rax, rdi
mov word [r10 + 0xa], r13w
cmovbe rax, rdi
add r10, 0x10
mov rdi, rax
sub r14, 1
jne 0x180020ca0
mov r15, qword [rsp + 0x40]
mov r14d, 0x400
lea rax, [rsp + 0x38]
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x370]
lea r8, [rbp + 0x160]
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_select]
mov r13, qword [rsp + 0x6d8]
mov edi, eax
cmp eax, 1
jl 0x180020e42
test r12d, r12d
je 0x180020e42
lea rbx, [r15 + 0xa]
mov r15d, 0x300
nop word [rax + rax]
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x50]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180020e06
or word [rbx], r15w
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x160]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180020e1e
or word [rbx], 0x10
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x370]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180020e36
or word [rbx], r14w
add rbx, 0x10
sub rsi, 1
jne 0x180020df0
mov eax, edi
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.180027140
add rsp, 0x690
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret