joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001c180
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.140016b50
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140016980
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 0x140018d46
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140018d42
mov eax, dword [r14]
or eax, 6
mov dword [r14], eax
test ebp, ebp
js 0x140018cbe
or eax, 8
mov dword [r14], eax
jmp 0x140018cc0
xor ebp, ebp
mov dword [r14 + 0x10], ebp
mov rax, qword [r14 + 0x20]
test rax, rax
je 0x140018cd5
mov rdx, qword [r14 + 0x28]
mov cl, 1
call rax
lea rcx, [r14 + 0x30]
call fcn.140015e10
mov rax, qword [r14 + 0x20]
test rax, rax
je 0x140018cef
mov rdx, qword [r14 + 0x28]
xor ecx, ecx
call rax
test byte [r14 + 4], 8
jne 0x140018d3b
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 0x140018d3b
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140018d46
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 0x140018d46
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 0x14001c166
mov rax, qword [rax + 0x28]
test rax, rax
je 0x14001c166
cmp byte [rax + 0x14], 0
je 0x14001c166
xor r8d, r8d
mov qword [rax + 0x18], rcx
xor edx, edx
call fcn.14001b7b0
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 0x140018c30
mov r8, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x14001c180
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 0x14001c213
mov rdi, qword [rcx]
test rdi, rdi
je 0x14001c213
mov qword [rsp + 0x30], r14
xor r8d, r8d
mov r14d, dword [rcx + 0x24]
xor edx, edx
call fcn.14001b7b0
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 0x14001c20f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14001c20f
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call fcn.14001b5e0
test eax, eax
jns 0x14001c20d
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 0x14001c1f3
mov eax, 1
jmp 0x14001c1f8
Function at 0x14001d8c0
Capabilities:
Get remote cert context via schannel

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x160
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov r14, qword [rcx + 8]
xor ebx, ebx
mov r15, qword [rcx + 0x10]
mov r12d, edx
mov rdi, qword [r14 + 0x40]
mov rax, qword [rdi + 0x440]
mov rcx, qword [rdi + 0x3d8]
mov rdx, qword [rdi + 0x3e0]
test rax, rax
je 0x14001d920
mov rsi, qword [rax + 0x10]
mov rbp, qword [rax + 0x18]
jmp 0x14001d926
mov rsi, rbx
mov rbp, rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], 0x100
mov qword [rsp + 0x28], rax
mov r9, rbp
lea rax, [rsp + 0x48]
mov qword [rsp + 0x40], rbx
mov r8, rsi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], rbx
call fcn.14001ead0
test eax, eax
jne 0x14001d994
lea rcx, [r15 + 0x30]
lea r8, [rsp + 0x40]
lea edx, [rax + 0x53]
call sub.Secur32.dll_QueryContextAttributesA
test eax, eax
je 0x14001da06
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT__failed.
mov edx, 0x100
mov r8d, eax
lea rcx, [rsp + 0x50]
call fcn.14001f720
mov r8, qword [str.HY000]
lea rax, [rsp + 0x50]
lea r9, str.SSL_connection_error:__s
mov qword [rsp + 0x20], rax
mov edx, 0x7ea
mov rcx, rdi
call qword [r14 + 0x50]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14001d9c8
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14001d9d7
call fcn.14001edd0
movzx eax, bl
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.1400623a0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
test rsi, rsi
jne 0x14001da13
mov r8d, ebx
test rbp, rbp
je 0x14001da19
mov r8d, 1
mov r9, qword [rdi + 0x298]
lea rax, [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x30], 0x100
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
call fcn.14001ede0
test eax, eax
jne 0x14001d994
lea ebx, [rax + 1]
jmp 0x14001d9b8
Function at 0x14001da60
Capabilities:
Encrypt data via sspi

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rax, qword [rcx + 0x38]
mov rsi, rcx
mov rdi, qword [rax + 0x10]
mov ebp, dword [rdi + 0x24]
mov ecx, dword [rdi + 0x1c]
cmp r8, rbp
cmovb rbp, r8
add rcx, qword [rdi + 0x10]
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x10]
lea rcx, [rdi + 0x30]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x20]
mov eax, dword [rdi + 0x1c]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor edx, edx
mov dword [rsp + 0x34], 7
mov eax, dword [rdi + 0x1c]
add rax, qword [rdi + 0x10]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], ebp
mov dword [rsp + 0x44], 1
mov eax, dword [rdi + 0x1c]
add rax, rbp
add rax, qword [rdi + 0x10]
mov qword [rsp + 0x58], rax
mov eax, dword [rdi + 0x20]
mov dword [rsp + 0x50], eax
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x20], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x54], 6
mov dword [rsp + 0x24], 4
call sub.Secur32.dll_EncryptMessage
test eax, eax
je 0x14001db2e
mov rax, 0xffffffffffffffff
jmp 0x14001db6f
mov r8d, dword [rsp + 0x50]
mov rcx, rsi
add r8d, dword [rsp + 0x40]
add r8d, dword [rsp + 0x30]
mov rax, qword [rsi + 0x48]
mov rdx, qword [rdi + 0x10]
mov qword [rsp + 0xb8], rbx
mov ebx, r8d
call qword [rax + 0x20]
cmp rax, rbx
mov rcx, 0xffffffffffffffff
mov rbx, qword [rsp + 0xb8]
cmove rcx, rbp
mov rax, rcx
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
Function at 0x14001e120
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x3b0
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rsp + 0x390], rax
mov r14, rcx
mov rsi, r9
mov rcx, rdx
mov r15d, r8d
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14001e193
mov ecx, 0x8009035d
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.14001e4d0
lea r9, str.directory__s_does_not_exist
mov rdx, qword [rsp + 0x400]
mov r8d, eax
mov rcx, rsi
mov qword [rsp + 0x20], rdi
mov ebx, eax
call fcn.14001f720
mov eax, ebx
jmp 0x14001e29d
test al, 0x10
jne 0x14001e1b0
mov ecx, 0x8009035d
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.14001e4d0
lea r9, str._s_is_not_a_directory
jmp 0x14001e172
mov r9, rdi
lea r8, str._s
mov edx, 0x104
lea rcx, [rsp + 0x170]
call fcn.14001ef20
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14001e21d
call fcn.14001e4d0
mov rdx, qword [rsp + 0x400]
lea r9, str.FindFirstFile__s__failed
mov ebx, eax
mov rcx, rsi
lea rax, [rsp + 0x170]
mov r8d, ebx
mov qword [rsp + 0x20], rax
call fcn.14001f720
mov eax, ebx
jmp 0x14001e29d
mov qword [rsp + 0x3a8], rbp
mov rbp, qword [rsp + 0x400]
nop dword [rax]
test byte [rsp + 0x30], 0x10
jne 0x14001e278
lea rax, [rsp + 0x5c]
mov r9, rdi
lea r8, [0x140072c04]
mov qword [rsp + 0x20], rax
mov edx, 0x104
lea rcx, [rsp + 0x280]
call fcn.14001ef20
mov r9, rsi
mov qword [rsp + 0x20], rbp
mov r8d, r15d
lea rdx, [rsp + 0x280]
mov rcx, r14
call fcn.14001de90
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x14001e230
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rbp, qword [rsp + 0x3a8]
xor eax, eax
mov rcx, qword [rsp + 0x390]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0x3b0
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
Function at 0x14001e750
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push r14
sub rsp, 0x80
mov qword [rax + 0x10], rbx
xor r9d, r9d
mov qword [rax - 0x10], rbp
xor ebx, ebx
mov qword [rax - 0x18], rsi
xor r14d, r14d
mov qword [rax - 0x28], r12
mov rsi, rcx
mov qword [rax - 0x30], r13
mov r12, r8
mov qword [rax - 0x58], rbx
lea r8d, [rbx + 1]
mov r13, rdx
mov dword [rax - 0x60], 0x80
mov edx, 0x80000000
mov qword [rax - 0x38], r15
xor ebp, ebp
mov dword [rax - 0x68], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x14001e7db
call fcn.14001e4d0
lea r9, str.failed_to_open_file__s
mov qword [rsp + 0x20], rsi
mov r8d, eax
mov rdx, r12
mov rcx, r13
mov ebp, eax
call fcn.14001f720
jmp 0x14001e8ff
lea rdx, [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14001e813
call fcn.14001e4d0
lea r9, str.GetFileSizeEx_failed_on__s
mov qword [rsp + 0x20], rsi
mov r8d, eax
mov rdx, r12
mov rcx, r13
mov ebp, eax
call fcn.14001f720
jmp 0x14001e8f6
mov qword [rsp + 0x68], rdi
mov eax, 0xfffffffe
mov rdi, qword [rsp + 0x40]
cmp rdi, rax
jle 0x14001e858
mov ecx, 0x8009035d
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.14001e4d0
lea r9, str.file__s_too_large
mov qword [rsp + 0x20], rsi
mov r8d, eax
mov rdx, r12
mov rcx, r13
mov ebp, eax
call fcn.14001f720
jmp 0x14001e8f1
lea rsi, [rdi + 1]
xor ecx, ecx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x14001e892
call fcn.14001e4d0
lea r9, str.LocalAlloc_0__zu__failed
mov qword [rsp + 0x20], rsi
mov r8d, eax
mov rdx, r12
mov rcx, r13
mov ebp, eax
call fcn.14001f720
jmp 0x14001e8f1
test rdi, rdi
je 0x14001e8ed
nop word [rax + rax]
xor eax, eax
lea rdx, [r14 + rbx]
mov rsi, rdi
mov dword [rsp + 0xa8], eax
sub edi, ebx
mov qword [rsp + 0x20], rax
mov r8d, edi
lea r9, [rsp + 0xa8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001e93e
mov eax, dword [rsp + 0xa8]
test eax, eax
je 0x14001e939
add rbx, rax
mov qword [rsp + 0xa8], rsi
mov rdi, rsi
cmp rbx, rsi
jb 0x14001e8a0
mov byte [r14 + rdi], bpl
mov rdi, qword [rsp + 0x68]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x50]
test ebp, ebp
mov rbp, qword [rsp + 0x78]
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x98]
je 0x14001e969
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
add rsp, 0x80
pop r14
ret
mov rdi, rbx
jmp 0x14001e8ed
call fcn.14001e4d0
mov ebp, eax
lea r9, str.ReadFile___failed_to_read__file__s
mov rax, qword [rsp + 0x90]
mov r8d, ebp
mov rdx, r12
mov qword [rsp + 0x20], rax
mov rcx, r13
call fcn.14001f720
jmp 0x14001e8f1
mov rax, r14
add rsp, 0x80
pop r14
ret
Function at 0x14001f310
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push rdi
sub rsp, 0x68
mov r9, r8
mov rbp, rdx
mov rdi, rcx
test r8, r8
je 0x14001f4cf
cmp byte [r8], 0
je 0x14001f4cf
mov qword [rax + 0x10], rbx
mov rbx, rcx
mov qword [rax + 0x20], rsi
mov qword [rax - 0x18], r14
lea r14, [rdx + 8]
movaps xmmword [rax - 0x38], xmm7
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r8 + rax], 0
jne 0x14001f353
mov r8d, eax
lea rcx, [rsp + 0x80]
mov rdx, r9
call fcn.14001f220
mov esi, 8
lea rcx, [rsp + 0x90]
mov r8d, esi
mov rdx, rbp
call fcn.14001f220
mov r8d, dword [rsp + 0x84]
lea rcx, [rsp + 0x20]
mov edx, dword [rsp + 0x80]
xor r8d, dword [rsp + 0x94]
xor edx, dword [rsp + 0x90]
call fcn.14001f2a0
movsd xmm7, qword [0x140072fb8]
cmp rbp, r14
mov r14, qword [rsp + 0x60]
jae 0x14001f3fb
movaps xmmword [rsp + 0x50], xmm6
movsd xmm6, qword [0x140072fc0]
nop
lea rcx, [rsp + 0x20]
call fcn.14001f6e0
mulsd xmm0, xmm7
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
addsd xmm0, xmm6
cvttsd2si eax, xmm0
mov byte [rdi], al
inc rdi
sub rsi, 1
jne 0x14001f3d0
movaps xmm6, xmmword [rsp + 0x50]
lea rcx, [rsp + 0x20]
call fcn.14001f6e0
mulsd xmm0, xmm7
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movaps xmm7, xmmword [rsp + 0x40]
xor edx, edx
mov rsi, qword [rsp + 0x98]
cvttsd2si ecx, xmm0
movsx eax, cl
movd xmm1, eax
mov rax, rdi
sub rax, rbx
punpcklbw xmm1, xmm1
cmp rbx, rdi
punpcklwd xmm1, xmm1
pshufd xmm1, xmm1, 0
cmova rax, rdx
test rax, rax
je 0x14001f4a3
cmp rax, 0x40
jb 0x14001f4a3
and rax, 0xffffffffffffffc0
nop dword [rax]
nop word [rax + rax]
movdqu xmm0, xmmword [rbx]
add rdx, 0x40
pxor xmm0, xmm1
movdqu xmmword [rbx], xmm0
movdqu xmm0, xmmword [rbx + 0x10]
pxor xmm0, xmm1
movdqu xmmword [rbx + 0x10], xmm0
movdqu xmm0, xmmword [rbx + 0x20]
pxor xmm0, xmm1
movdqu xmmword [rbx + 0x20], xmm0
movdqu xmm0, xmmword [rbx + 0x30]
pxor xmm0, xmm1
movdqu xmmword [rbx + 0x30], xmm0
add rbx, 0x40
cmp rdx, rax
jne 0x14001f460
cmp rbx, rdi
je 0x14001f4ba
nop dword [rax + rax]
xor byte [rbx], cl
inc rbx
cmp rbx, rdi
jne 0x14001f4b0
mov rbx, qword [rsp + 0x88]
mov rax, rdi
mov byte [rdi], 0
add rsp, 0x68
pop rdi
pop rbp
ret
mov byte [rcx], 0
mov rax, rcx
add rsp, 0x68
pop rdi
pop rbp
ret
Function at 0x14001f600
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
xor ebx, ebx
lea r10, [rdx + r9]
cmp rdx, r10
cmova r9, rbx
test r9, r9
je 0x14001f6b4
cmp r9, 0x40
jb 0x14001f6b4
lea r11, [rcx - 1]
lea rax, [r8 - 1]
add r11, r9
add rax, r9
cmp rcx, rax
ja 0x14001f63d
cmp r11, r8
jae 0x14001f6b4
lea rax, [rdx - 1]
add rax, r9
cmp rcx, rax
ja 0x14001f64e
cmp r11, rdx
jae 0x14001f6b4
and r9, 0xffffffffffffffc0
movdqu xmm0, xmmword [r8]
add rbx, 0x40
movdqu xmm1, xmmword [rdx]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rcx], xmm1
movdqu xmm1, xmmword [rdx + 0x10]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmm1, xmmword [rdx + 0x20]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x30]
add r8, 0x40
movdqu xmmword [rcx + 0x20], xmm1
movdqu xmm1, xmmword [rdx + 0x30]
add rdx, 0x40
pxor xmm1, xmm0
movdqu xmmword [rcx + 0x30], xmm1
add rcx, 0x40
cmp rbx, r9
jb 0x14001f652
cmp rdx, r10
jae 0x14001f6d2
sub r8, rdx
sub rcx, rdx
nop
movzx eax, byte [r8 + rdx]
xor al, byte [rdx]
mov byte [rcx + rdx], al
inc rdx
cmp rdx, r10
jb 0x14001f6c0
mov rbx, qword [rsp + 8]
ret
Function at 0x140020d50
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x48
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rax, qword [0x14037f138]
test rax, rax
jne 0x140020e07
movzx eax, word [0x1400741f0]
lea r8, [rsp + 0x22]
mov word [rsp + 0x20], ax
mov edx, 0x1004
movzx eax, byte [0x1400741f2]
mov ecx, 0x800
mov byte [rsp + 0x22], al
xor eax, eax
mov dword [rsp + 0x23], eax
mov word [rsp + 0x27], ax
mov byte [rsp + 0x29], al
lea r9d, [rax + 7]
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
xor edx, edx
lea r8, [rsp + 0x20]
mov eax, edx
lea r9, str.cp932
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rax]
inc rax
cmp cl, byte [r9 + rax - 1]
jne 0x140020de7
cmp rax, 6
jne 0x140020dd0
jmp 0x140020dec
sbb edx, edx
or edx, 1
test edx, edx
lea rcx, [0x1401cdc20]
lea rax, [0x1401c7e00]
cmove rax, rcx
mov qword [0x14037f138], rax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0x48
ret

Function at 0x140020e20
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbp, rcx
mov rdi, r9
mov ecx, reloc.WS2_32.dll_recv
mov rsi, r8
mov rbx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
test rax, rax
je 0x140020e93
mov qword [rax], rsi
mov qword [rax + 8], rdi
test rbx, rbx
je 0x140020e60
mov edx, dword [rbx]
jmp 0x140020e62
xor edx, edx
mov qword [rsp + 0x28], rbp
lea r8, [0x140020eb0]
mov r9, rax
mov dword [rsp + 0x20], 0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
test rax, rax
je 0x140020e93
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140020e9b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [rax]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x140021f50
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
cmp byte [0x14038314c], 0
jne 0x140022083
inc dword [0x140383148]
lea rcx, str.UMASK
mov byte [0x14038314c], 1
mov dword [0x1401c6fcc], 0x1b0
mov dword [0x1401c6fd8], 0x1c0
mov dword [0x1403837dc], 0
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140021fb1
mov rcx, rax
call fcn.140021d90
or eax, 0x180
mov dword [0x1401c6fcc], eax
lea rcx, str.UMASK_DIR
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140021fd6
mov rcx, rax
call fcn.140021d90
or eax, 0x1c0
mov dword [0x1401c6fd8], eax
call fcn.140007600
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, qword [0x1403835b8]
mov qword [0x140383158], rax
lea rax, [0x140383158]
mov qword [0x140383150], rax
lea rax, str.unknown
mov qword [0x1403835c0], rax
mov qword [0x140383160], 0
test rcx, rcx
je 0x140022030
call fcn.140026f40
add rax, qword [0x1403835b8]
mov qword [0x1403835c0], rax
call fcn.140007600
call fcn.1400275d0
test al, al
je 0x140022045
mov al, 1
add rsp, 0x28
ret
lea rcx, str.HOME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov qword [0x1403835b0], rax
test rax, rax
je 0x140022074
mov rdx, rax
lea rcx, [0x1403837f0]
call fcn.140028b00
mov qword [0x1403835b0], rax
call fcn.1400225f0
call fcn.1400220a0
call fcn.140022180
xor al, al
add rsp, 0x28
ret
Function at 0x1400220a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x28
lea rcx, [0x140022090]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__tzset]
add rsp, 0x28
jmp 0x140022230
push rbp
lea rbp, [rsp - 0x980]
sub rsp, 0xa80
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rbp + 0x970], rax
lea rax, [rsp + 0x50]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMySQL
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1400223ae
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x44]
lea rax, [rbp + 0x60]
mov qword [rsp + 0xa90], rbx
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x60]
lea rax, [rsp + 0x48]
mov qword [rsp + 0xa98], rdi
xor edi, edi
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rdi
mov ebx, edi
mov dword [rsp + 0x44], 0xff
mov dword [rsp + 0x40], 0x3ff
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
je 0x140022393
nop dword [rax]
inc ebx
cmp eax, 0xea
je 0x14002233f
test eax, eax
jne 0x140022393
cmp dword [rsp + 0x48], 1
jne 0x14002233f
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], rdi
lea r8, [0x140074500]
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x460]
call fcn.140032ea0
lea rcx, [rbp + 0x460]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x44]
lea rax, [rbp + 0x60]
mov dword [rsp + 0x44], 0xff
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x60]
lea rax, [rsp + 0x48]
mov dword [rsp + 0x40], 0x3ff
mov qword [rsp + 0x28], rax
mov edx, ebx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x1400222f0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0xa98]
mov rbx, qword [rsp + 0xa90]
mov rcx, qword [rbp + 0x970]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0xa80
pop rbp
ret
Function at 0x1400220c0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x38
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesTcpipParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140022167
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesWinsock2Parameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140022167
lea rax, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesWinsockParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140022167
lea rcx, str.HAVE_TCPIP
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140022160
cmp byte [0x14038314d], 0
je 0x140022167
xor al, al
add rsp, 0x38
ret
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
add rsp, 0x38
ret

Function at 0x140022180
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x14037ac60]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
call fcn.1400220c0
test al, al
je 0x140022207
mov qword [rsp + 0x1d0], rbx
lea rdx, [rsp + 0x20]
mov ebx, 0x202
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400221c7
cmp word [rsp + 0x20], bx
je 0x1400221de
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, ebx
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400221e5
mov byte [0x14038314d], 1
mov rbx, qword [rsp + 0x1d0]
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0x1d8
ret
xor al, al
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400623a0
add rsp, 0x1d8
ret