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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov eax, dword [0x1400566e8]
test eax, eax
jne 0x140029fd3
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x140029fb3
mov dword [0x1400566e8], 1
jmp 0x140029fee
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x140029fcd
mov dword [0x1400566e8], 2
jmp 0x14002a0c9
mov eax, dword [0x1400566e8]
cmp eax, 1
jne 0x14002a0c0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14002a113
cmp word [rdi], 0
mov qword [rsp + 0x50], rbp
mov rbx, rdi
mov qword [rsp + 0x58], r12
je 0x14002a015
add rbx, 2
cmp word [rbx], 0
jne 0x14002a001
add rbx, 2
cmp word [rbx], 0
jne 0x14002a001
xor r12d, r12d
sub rbx, rdi
mov r8, rdi
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
sar rbx, 1
lea r9d, [rbx + 1]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
movsxd rbp, eax
je 0x14002a0b3
mov rcx, rbp
call fcn.140029560
test rax, rax
mov rsi, rax
je 0x14002a0b3
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
lea r9d, [rbx + 1]
mov r8, rdi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x14002a08d
mov rcx, rsi
call fcn.14001ff60
mov rsi, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbp, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x14002a099
cmp eax, 2
je 0x14002a0c9
test eax, eax
jne 0x14002a113
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test rax, rax
mov rbx, rax
je 0x14002a113
cmp byte [rax], 0
je 0x14002a0f2
nop
add rax, 1
cmp byte [rax], 0
jne 0x14002a0e0
add rax, 1
cmp byte [rax], 0
jne 0x14002a0e0
sub eax, ebx
add eax, 1
movsxd rsi, eax
mov rcx, rsi
call fcn.140029560
test rax, rax
mov rdi, rax
jne 0x14002a125
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140021f50
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rax, rdi
add rsp, 0x40
pop rdi
ret

Function at 0x14002edb0
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140050688]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x20]
mov r9d, 6
mov edx, 0x1004
mov byte [rsp + 0x26], 0
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x14002edf7
or eax, 0xffffffff
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14001f810
add rsp, 0x38
ret
lea rcx, [rsp + 0x20]
call fcn.140022b30
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14001f810
add rsp, 0x38
ret
Function at 0x140030650
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x50
mov edi, r8d
mov r13, rdx
mov r14, rcx
call fcn.140024050
xor ebx, ebx
cmp qword [0x140056a40], rbx
mov rbp, rax
mov dword [rsp + 0x98], ebx
mov dword [rsp + 0x30], ebx
jne 0x14003077c
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rsi, rax
je 0x14003088f
lea rdx, [0x140042e88]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14003088f
mov rcx, rax
call fcn.140023f80
lea rdx, [0x140042e78]
mov rcx, rsi
mov qword [0x140056a40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140023f80
lea rdx, [0x140042e60]
mov rcx, rsi
mov qword [0x140056a48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140023f80
lea rcx, [rsp + 0x98]
mov qword [0x140056a50], rax
call fcn.1400215a0
test eax, eax
je 0x14003072f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.140024ff0
cmp dword [rsp + 0x98], 2
jne 0x14003077c
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140023f80
test rax, rax
mov qword [0x140056a60], rax
je 0x14003077c
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140023f80
mov qword [0x140056a58], rax
mov rcx, qword [0x140056a58]
mov qword [rsp + 0x80], r12
cmp rcx, rbp
je 0x140030828
cmp qword [0x140056a60], rbp
je 0x140030828
call fcn.140024140
mov rcx, qword [0x140056a60]
mov rsi, rax
call fcn.140024140
test rsi, rsi
mov r12, rax
je 0x140030828
test rax, rax
je 0x140030828
call rsi
test rax, rax
je 0x1400307f3
lea rcx, [rsp + 0x34]
mov r9d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x1400307f3
test byte [rsp + 0x40], 1
jne 0x140030828
lea rcx, [rsp + 0x30]
call fcn.1400215f0
test eax, eax
je 0x140030815
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.140024ff0
cmp dword [rsp + 0x30], 4
jb 0x140030822
bts edi, 0x15
jmp 0x140030866
bts edi, 0x12
jmp 0x140030866
mov rcx, qword [0x140056a48]
cmp rcx, rbp
je 0x140030866
call fcn.140024140
test rax, rax
je 0x140030866
call rax
test rax, rax
mov rbx, rax
je 0x140030866
mov rcx, qword [0x140056a50]
cmp rcx, rbp
je 0x140030866
call fcn.140024140
test rax, rax
je 0x140030866
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140056a40]
call fcn.140024140
mov r12, qword [rsp + 0x80]
test rax, rax
je 0x14003088f
mov r9d, edi
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x140030891
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
Function at 0x140035cc4
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x140050688]
xor rax, rsp
mov qword [rsp + 0xc0], rax
xor edx, edx
mov rbx, rcx
lea r8d, [rdx + 0x28]
add rcx, r8
call fcn.140020cb0
and qword [rbx + 0x50], 0
and dword [rbx + 0x58], 0
and dword [rbx + 0x5c], 0
lea rax, [0x140000000]
mov esi, 0x94
lea rcx, [rsp + 0x20]
mov r8, rsi
xor edx, edx
mov qword [rbx + 0x10], rax
mov qword [rbx + 8], rax
mov dword [rbx], 0x60
mov byte [rbx + 0x18], 0
call fcn.140020cb0
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [rsp + 0x30], 2
mov esi, 1
jne 0x140035d57
cmp dword [rsp + 0x24], 5
jb 0x140035d71
jmp 0x140035d6d
cmp dword [rsp + 0x30], esi
jne 0x140035d71
cmp dword [rsp + 0x24], 4
ja 0x140035d6d
jne 0x140035d71
cmp dword [rsp + 0x28], 0
jbe 0x140035d71
mov byte [rbx + 0x18], sil
lea rax, [0x140043878]
lea rcx, [rbx + 0x28]
mov dword [rbx + 0x1c], 0x800
mov qword [rbx + 0x20], rax
call fcn.140035b84
movzx ecx, byte [0x1400522f4]
test eax, eax
mov rax, rbx
cmovs ecx, esi
mov byte [0x1400522f4], cl
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.14001f810
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140001000
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, rdx
mov rbx, rcx
call fcn.140004950
mov rcx, rbx
mov rdi, rax
call fcn.140004940
mov r9d, eax
mov qword [rsp + 0x28], rsi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.Got_error:__d:__s__s
xor ecx, ecx
call fcn.1400213c0
mov ecx, 2
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp 0x140003280
push rbx
sub rsp, 0x20
mov eax, dword [0x140375004]
mov ebx, ecx
test eax, eax
cmove eax, ecx
cmp byte [0x140374aeb], 0
mov dword [0x140375004], eax
jne 0x1400032c6
mov rcx, qword [0x140374b38]
test rcx, rcx
je 0x1400032b3
call fcn.140005670
mov ecx, ebx
mov dword [0x14037da90], 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
add rsp, 0x20
pop rbx
ret
Function at 0x140003280
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, rdx
mov rbx, rcx
call fcn.140004950
mov rcx, rbx
mov rdi, rax
call fcn.140004940
mov r9d, eax
mov qword [rsp + 0x28], rsi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.Got_error:__d:__s__s
xor ecx, ecx
call fcn.1400213c0
mov ecx, 2
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp 0x140003280
push rbx
sub rsp, 0x20
mov eax, dword [0x140375004]
mov ebx, ecx
test eax, eax
cmove eax, ecx
cmp byte [0x140374aeb], 0
mov dword [0x140375004], eax
jne 0x1400032c6
mov rcx, qword [0x140374b38]
test rcx, rcx
je 0x1400032b3
call fcn.140005670
mov ecx, ebx
mov dword [0x14037da90], 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
add rsp, 0x20
pop rbx
ret

Function at 0x140009950
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
call fcn.1400103f0
call fcn.140013b50
call fcn.140015980
xor edx, edx
lea rcx, str.latin1
call fcn.140016030
call fcn.140012cb0
test eax, eax
je 0x140009984
mov eax, 1
add rsp, 0x28
ret
cmp dword [0x140375018], 0
jne 0x1400099e4
lea rdx, [0x14005fbc8]
mov dword [0x140375018], 0xcea
lea rcx, str.mysql
call qword [sym.imp.WS2_32.dll_getservbyname]
test rax, rax
je 0x1400099c3
movzx ecx, word [rax + 0x18]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [0x140375018], eax
lea rcx, str.MYSQL_TCP_PORT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1400099e4
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [0x140375018], eax
cmp qword [0x140375020], 0
jne 0x140009a27
lea rax, str.MySQL
lea rcx, str.MYSQL_UNIX_PORT
mov qword [0x140375020], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
jne 0x140009a20
lea rcx, str.MARIADB_UNIX_PORT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140009a27
mov qword [0x140375020], rax
cmp byte [0x14037503a], 0
jne 0x140009a35
call fcn.140011960
xor edx, edx
xor ecx, ecx
call fcn.140014190
xor eax, eax
mov byte [0x140375028], 1
add rsp, 0x28
ret

Function at 0x140009b80
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
lea rcx, str.USERNAME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
lea rdx, str.ODBC
mov r8d, 0x200
test rax, rax
mov rcx, rbx
cmovne rdx, rax
add rsp, 0x20
pop rbx
jmp fcn.14000ffb0
Function at 0x1400103f0
Capabilities:
Initialize winsock library

Disassembly:
cmp byte [0x140375039], 0
jne 0x140010405
mov byte [0x140375039], 1
jmp 0x140010410
ret
sub rsp, 0x1d8
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140010475
movzx ecx, word [rsp + 0x20]
movzx eax, cl
lea edx, [rax + rax*4]
mov eax, ecx
shr eax, 8
lea eax, [rax + rdx*2]
cmp eax, 0x16
jae 0x140010475
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov al, 1
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x1d8
ret
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x1d8
ret

Function at 0x140010410
Capabilities:
Initialize winsock library

Disassembly:
cmp byte [0x140375039], 0
jne 0x140010405
mov byte [0x140375039], 1
jmp 0x140010410
ret
sub rsp, 0x1d8
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140010475
movzx ecx, word [rsp + 0x20]
movzx eax, cl
lea edx, [rax + rax*4]
mov eax, ecx
shr eax, 8
lea eax, [rax + rdx*2]
cmp eax, 0x16
jae 0x140010475
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov al, 1
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x1d8
ret
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x1d8
ret

Function at 0x140012a50
Capabilities:
Query environment variable

Disassembly:
push rbp
sub rsp, 0x20
mov rbp, rcx
lea rcx, str.LIBMYSQL_PLUGINS
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140012b2b
xor r8d, r8d
mov rdx, rax
cmp byte [rdx], 0
je 0x140012ab2
cmp byte [rdx + 1], 0
je 0x140012aaf
cmp byte [rdx + 2], 0
je 0x140012aa9
cmp byte [rdx + 3], 0
je 0x140012aa3
add rdx, 4
add r8d, 4
cmp r8d, 0x400
jb 0x140012a75
add rsp, 0x20
pop rbp
ret
add r8d, 3
jmp 0x140012ab2
add r8d, 2
jmp 0x140012ab2
inc r8d
cmp r8d, 0x400
jae 0x140012b2b
mov qword [rsp + 0x30], rbx
mov rcx, rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rsi, rax
mov rdi, rax
nop dword [rax]
mov edx, 0x3b
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbx, rax
test rax, rax
je 0x140012af8
mov byte [rax], 0
xor r9d, r9d
mov rdx, rdi
mov rcx, rbp
lea r8d, [r9 - 1]
call fcn.140012de0
lea rdi, [rbx + 1]
test rbx, rbx
jne 0x140012ae0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rbp
ret
Function at 0x140013f80
Capabilities:
Get remote cert context via schannel

Disassembly:
mov dword [rsp + 0x18], r8d
push rbx
sub rsp, 0x20
mov rcx, qword [rcx + 0x10]
lea r8, [rsp + 0x30]
mov rbx, rdx
mov qword [rsp + 0x30], 0
add rcx, 0x50
mov edx, 0x53
call sub.Secur32.dll_QueryContextAttributesA
test eax, eax
je 0x140013fb9
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x40]
mov r8, rbx
mov edx, 3
call qword [sym.imp.CRYPT32.dll_CertGetCertificateContextProperty]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, dword [rsp + 0x40]
add rsp, 0x20
pop rbx
ret

Function at 0x140015980
Capabilities:
Get common file path
Query environment variable

Disassembly:
sub rsp, 0x238
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov edx, 0x38
lea ecx, [rdx - 0x37]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [0x1403750d8], rax
test rax, rax
je 0x140015aad
mov edx, 0x200
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
test eax, eax
je 0x140015aab
mov rcx, qword [0x1403750d8]
lea rdx, [rsp + 0x20]
call fcn.140015900
test eax, eax
jne 0x140015aab
mov edx, 0x200
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x140015aab
mov rcx, qword [0x1403750d8]
lea rdx, [rsp + 0x20]
call fcn.140015900
test eax, eax
jne 0x140015aab
mov rcx, qword [0x1403750d8]
lea rdx, [0x14006ad6c]
call fcn.140015900
test eax, eax
jne 0x140015aab
mov r8d, 0x200
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x140015a67
lea rcx, [rsp + 0x20]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov rcx, qword [0x1403750d8]
lea rdx, [rsp + 0x20]
call fcn.140015900
test eax, eax
jne 0x140015aab
lea rcx, str.MYSQL_HOME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140015a8c
mov rcx, qword [0x1403750d8]
mov rdx, rax
call fcn.140015900
test eax, eax
jne 0x140015aab
mov rax, qword [0x1403750d8]
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x238
ret
xor eax, eax
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x238
ret
Function at 0x140016c20
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rax, qword [rcx + 0x40]
mov rsi, rdx
lea rdx, [rsp + 0x38]
mov ebp, r9d
mov edi, r8d
mov rbx, rcx
mov r10, qword [rax + 0x440]
mov r14, qword [r10 + 0x28]
call fcn.140014ac0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140014900
mov dword [r14], 0
mov r8d, edi
mov rcx, qword [rsp + 0x38]
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0x60], eax
test eax, eax
je 0x140016d36
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140016d32
mov eax, dword [r14]
or eax, 6
mov dword [r14], eax
test ebp, ebp
js 0x140016cae
or eax, 8
mov dword [r14], eax
jmp 0x140016cb0
xor ebp, ebp
mov dword [r14 + 0x10], ebp
mov rax, qword [r14 + 0x20]
test rax, rax
je 0x140016cc5
mov rdx, qword [r14 + 0x28]
mov cl, 1
call rax
lea rcx, [r14 + 0x30]
call fcn.140013b30
mov rax, qword [r14 + 0x20]
test rax, rax
je 0x140016cdf
mov rdx, qword [r14 + 0x28]
xor ecx, ecx
call rax
test byte [r14 + 4], 8
jne 0x140016d2b
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x30], 4
mov r8d, 0x1007
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140016d2b
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140016d36
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rsp + 0x60]
mov dword [rax], ecx
mov eax, 0xffffffff
jmp 0x140016d36
mov eax, dword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rax, qword [rcx + 0x40]
mov rsi, rdx
mov edi, r8d
mov rbx, rcx
mov rax, qword [rax + 0x440]
test rax, rax
je 0x14001b966
mov rax, qword [rax + 0x28]
test rax, rax
je 0x14001b966
cmp byte [rax + 0x14], 0
je 0x14001b966
xor r8d, r8d
mov qword [rax + 0x18], rcx
xor edx, edx
call fcn.14001afb0
mov r9d, dword [rbx + 0x24]
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x140016c20
mov r8, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x14001b980
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rsi, r8
mov rbp, rdx
mov rbx, rcx
test rcx, rcx
je 0x14001ba13
mov rdi, qword [rcx]
test rdi, rdi
je 0x14001ba13
mov qword [rsp + 0x30], r14
xor r8d, r8d
mov r14d, dword [rcx + 0x24]
xor edx, edx
call fcn.14001afb0
mov rcx, qword [rdi]
mov r8d, esi
mov rdx, rbp
call qword [sym.imp.WS2_32.dll_connect]
mov edi, eax
cmp eax, 0xffffffff
jne 0x14001ba0f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14001ba0f
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call fcn.14001add0
test eax, eax
jns 0x14001ba0d
mov eax, edi
mov r14, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
xor edi, edi
mov eax, edi
jmp 0x14001b9f3
mov eax, 1
jmp 0x14001b9f8
Function at 0x1400177f0
Capabilities:
Link many functions at runtime

Disassembly:
sub rsp, 0x28
cmp qword [0x1403750e0], 0
je 0x140017808
mov eax, 1
add rsp, 0x28
ret
lea rcx, str.mlang.dll
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
jne 0x14001782c
mov rbx, qword [rsp + 0x20]
add rsp, 0x28
ret
lea rdx, str.ConvertINetString
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ConvertINetMultiByteToUnicode
mov rcx, rbx
mov qword [0x1403750e0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ConvertINetUnicodeToMultiByte
mov rcx, rbx
mov qword [0x1403750e8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.IsConvertINetStringAvailable
mov rcx, rbx
mov qword [0x1403750f0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.LcidToRfc1766A
mov rcx, rbx
mov qword [0x1403750f8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.Rfc1766ToLcidA
mov rcx, rbx
mov qword [0x140375100], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, qword [rsp + 0x20]
mov qword [0x140375108], rax
mov eax, 1
add rsp, 0x28
ret
Function at 0x14001add0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x480
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x470], rax
xor r9d, r9d
mov edi, r8d
mov qword [rsp + 0x38], r9
movzx ebp, dl
test rcx, rcx
je 0x14001af81
mov rbx, qword [rcx]
test rbx, rbx
je 0x14001af81
mov rax, qword [rcx + 0x40]
mov r8, qword [rax + 0x440]
test r8, r8
je 0x14001ae55
mov rsi, qword [r8 + 0x140]
test rsi, rsi
je 0x14001ae55
lea rdx, [rsp + 0x40]
call fcn.14001b680
test al, al
jne 0x14001af81
mov rcx, qword [rsp + 0x40]
mov r8d, edi
movzx edx, bpl
call rsi
jmp 0x14001af83
mov rax, qword [rbx]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x50], 1
mov rax, qword [rbx]
mov qword [rsp + 0x268], rax
mov dword [rsp + 0x260], 1
test edi, edi
js 0x14001aea8
mov eax, 0x10624dd3
mov ecx, edi
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x38], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x3c], eax
test edi, edi
lea rax, [rsp + 0x38]
lea r8, [rsp + 0x50]
cmovs rax, r9
lea rdx, [rsp + 0x50]
test bpl, bpl
mov qword [rsp + 0x20], rax
cmovne r8, r9
cmove rdx, r9
lea r9, [rsp + 0x260]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
cmp eax, 0xffffffff
jne 0x14001aefc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx], eax
mov eax, edi
jmp 0x14001af83
test eax, eax
jne 0x14001af1e
mov ecx, 0x274c
lea edi, [rax - 1]
call qword [sym.imp.WS2_32.dll_WSASetLastError]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x8a
mov eax, edi
jmp 0x14001af83
mov rcx, qword [rbx]
lea rdx, [rsp + 0x260]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14001af7d
mov rcx, qword [rbx]
lea rax, [rsp + 0x40]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x40], 4
mov r8d, 0x1007
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
je 0x14001af78
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSASetLastError]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rsp + 0x30]
mov dword [rax], ecx
mov edi, 0xffffffff
mov eax, edi
jmp 0x14001af83
xor eax, eax
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.14005bc60
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x480
pop rdi
pop rsi
pop rbp
ret
Function at 0x14001afb0
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14001b037
mov rbx, qword [rcx]
test rbx, rbx
je 0x14001b037
movzx eax, byte [rbx + 8]
not al
and al, 1
test r8, r8
je 0x14001afd3
mov byte [r8], al
cmp al, dl
jne 0x14001afdf
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov rcx, qword [rbx]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x38], rdi
mov edi, dword [rbx + 8]
mov eax, edi
or eax, 1
and edi, 0xfffffffe
test dl, dl
cmove edi, eax
xor eax, eax
test dl, dl
mov edx, 0x8004667e
sete al
mov dword [rsp + 0x30], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x14001b027
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
mov dword [rbx + 8], edi
xor eax, eax
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
mov eax, 1
add rsp, 0x20
pop rbx
ret

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

Disassembly:
sub rsp, 0x28
call qword [sym.imp.WS2_32.dll_recv]
cdqe
add rsp, 0x28
ret

Function at 0x14001b880
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x28
call qword [sym.imp.WS2_32.dll_send]
cdqe
add rsp, 0x28
ret

Function at 0x14001b8a0
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x18], r8d
sub rsp, 0x38
xor r8d, r8d
test rcx, rcx
je 0x14001b8f8
mov rcx, qword [rcx]
test rcx, rcx
je 0x14001b8f8
sub edx, 1
je 0x14001b8cb
cmp edx, 1
jne 0x14001b8ef
mov r8d, 0x1005
jmp 0x14001b8d1
mov r8d, 0x1006
mov rcx, qword [rcx]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov r8d, eax
movzx eax, r8b
add rsp, 0x38
ret
mov al, 1
add rsp, 0x38
ret