joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001b980
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 0x14001d180
Capabilities:
Get file size
Read file on windows

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov r14, r8
mov dword [r11 + 0x20], r15d
mov rax, rdx
mov dword [r11 + 0x18], r15d
mov rbx, rcx
mov edi, r15d
mov esi, r15d
test r8, r8
jne 0x14001d1bb
xor eax, eax
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rax
mov qword [rsp + 0x70], rbp
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14001d20e
mov rcx, rbx
call fcn.14001db00
mov rbp, qword [rsp + 0x70]
xor eax, eax
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [r14], eax
test eax, eax
jne 0x14001d23f
mov r8, qword [str.HY000]
lea r9, str.SSL_connection_error:_Invalid_pem_format
mov rcx, qword [rbx + 0x40]
mov edx, 0x7ea
call qword [rbx + 0x50]
jmp 0x14001d311
lea ecx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x14001d26b
mov r8, qword [str.HY000]
xor r9d, r9d
mov rcx, qword [rbx + 0x40]
mov edx, 0x7d8
call qword [rbx + 0x50]
jmp 0x14001d311
mov r8d, dword [r14]
lea r9, [rsp + 0x88]
mov rdx, rdi
mov qword [rsp + 0x20], r15
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001d309
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [r14]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov qword [rsp + 0x28], r15
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
je 0x14001d309
mov edx, dword [rsp + 0x80]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x14001d250
mov edx, dword [r14]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x30], r15
mov r9, rsi
mov qword [rsp + 0x28], r15
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x14001d34c
mov rcx, rbx
call fcn.14001db00
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x14001d328
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x14001d336
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbp, qword [rsp + 0x70]
xor eax, eax
mov dword [r14], r15d
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov eax, dword [rsp + 0x80]
mov rcx, rdi
mov dword [r14], eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbp, qword [rsp + 0x70]
mov rax, rsi
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
Function at 0x14001d5d0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
xor ebp, ebp
mov rax, rdx
mov r14, r8
mov qword [rsp + 0x30], rbp
mov rdi, rcx
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x78], ebp
lea r8d, [rbp + 1]
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov rcx, rax
mov ebx, ebp
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001d635
mov rcx, rdi
call fcn.14001db00
xor eax, eax
jmp 0x14001d6e4
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [r14], eax
test eax, eax
jne 0x14001d663
mov r8, qword [str.HY000]
lea r9, str.SSL_connection_error:_Invalid_pem_format
mov rcx, qword [rdi + 0x40]
mov edx, 0x7ea
call qword [rdi + 0x50]
jmp 0x14001d6b3
mov ecx, eax
inc rcx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x14001d68e
mov r8, qword [str.HY000]
xor r9d, r9d
mov rcx, qword [rdi + 0x40]
mov edx, 0x7d8
call qword [rdi + 0x50]
jmp 0x14001d6b3
mov r8d, dword [r14]
lea r9, [rsp + 0x78]
mov rdx, rbx
mov qword [rsp + 0x20], rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14001d6d1
mov rcx, rdi
call fcn.14001db00
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x14001d6ca
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [r14], ebp
xor eax, eax
jmp 0x14001d6e4
mov eax, dword [r14]
mov rcx, rsi
mov byte [rax + rbx], bpl
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret

Function at 0x14001dc00
Capabilities:
Get remote cert context via schannel

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x20
mov rbx, qword [rcx + 8]
xor edi, edi
mov r13, qword [rcx + 0x10]
mov rbp, qword [rbx + 0x40]
mov r14, qword [rbp + 0x440]
mov rdx, qword [rbp + 0x3d8]
test r14, r14
je 0x14001dc3d
mov r14, qword [r14 + 0x10]
jmp 0x14001dc40
mov r14, rdi
mov qword [rsp + 0x58], rdi
mov rsi, rdi
mov r15d, edi
test rdx, rdx
jne 0x14001dc5c
test r14, r14
jne 0x14001dc75
mov al, 1
jmp 0x14001ddc7
mov rcx, rbx
call fcn.14001cbb0
mov rsi, rax
test rax, rax
je 0x14001ddb3
test r14, r14
je 0x14001dc94
mov rdx, qword [rbp + 0x440]
mov rcx, rbx
mov rdx, qword [rdx + 0x10]
Function at 0x14001dde0
Capabilities:
Encrypt data via sspi

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rax, qword [rcx + 0x38]
mov rbp, r8
mov rsi, rcx
mov rdi, qword [rax + 0x10]
mov eax, dword [rdi + 0x44]
mov ecx, dword [rdi + 0x3c]
cmp r8, rax
cmovae rbp, rax
add rcx, qword [rdi + 0x30]
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x30]
lea rcx, [rdi + 0x50]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x20]
mov eax, dword [rdi + 0x3c]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor edx, edx
mov dword [rsp + 0x34], 7
mov eax, dword [rdi + 0x3c]
add rax, qword [rdi + 0x30]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], ebp
mov dword [rsp + 0x44], 1
mov eax, dword [rdi + 0x3c]
add rax, rbp
add rax, qword [rdi + 0x30]
mov qword [rsp + 0x58], rax
mov eax, dword [rdi + 0x40]
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 0x14001deb1
mov rax, 0xffffffffffffffff
jmp 0x14001def2
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 + 0x30]
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.14005bc60
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
Function at 0x14001e370
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
sub rsp, 0x68
mov r9, r8
mov rbp, rdx
mov rdi, rcx
test r8, r8
je 0x14001e51f
cmp byte [r8], 0
je 0x14001e51f
mov qword [rsp + 0x88], rbx
mov rax, 0xffffffffffffffff
mov qword [rsp + 0x60], rsi
mov rbx, rcx
movaps xmmword [rsp + 0x40], xmm7
lea rsi, [rdx + 8]
inc rax
cmp byte [r8 + rax], 0
jne 0x14001e3b3
mov r8d, eax
lea rcx, [rsp + 0x80]
mov rdx, r9
call fcn.14001e280
mov r8d, 8
lea rcx, [rsp + 0x90]
mov rdx, rbp
call fcn.14001e280
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.14001e300
movsd xmm7, qword [0x14006c850]
cmp rbp, rsi
jae 0x14001e45b
movaps xmmword [rsp + 0x50], xmm6
sub rsi, rbp
movsd xmm6, qword [0x14006c858]
nop dword [rax + rax]
lea rcx, [rsp + 0x20]
call fcn.14001e740
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 0x14001e430
movaps xmm6, xmmword [rsp + 0x50]
lea rcx, [rsp + 0x20]
call fcn.14001e740
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 + 0x60]
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 0x14001e4f3
cmp rax, 0x40
jb 0x14001e4f3
and rax, 0xffffffffffffffc0
nop
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 0x14001e4b0
cmp rbx, rdi
je 0x14001e50a
nop dword [rax + rax]
xor byte [rbx], cl
inc rbx
cmp rbx, rdi
jne 0x14001e500
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 0x14001e650
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
lea r10, [rdx + r9]
xor ebx, ebx
mov r9, r10
sub r9, rdx
cmp rdx, r10
cmova r9, rbx
test r9, r9
je 0x14001e712
cmp r9, 0x40
jb 0x14001e712
lea r11, [rcx - 1]
lea rax, [r8 - 1]
add r11, r9
add rax, r9
cmp rcx, rax
ja 0x14001e693
cmp r11, r8
jae 0x14001e712
lea rax, [rdx - 1]
add rax, r9
cmp rcx, rax
ja 0x14001e6a4
cmp r11, rdx
jae 0x14001e712
and r9, 0xffffffffffffffc0
nop dword [rax + rax]
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 0x14001e6b0
cmp rdx, r10
jae 0x14001e732
sub r8, rdx
sub rcx, rdx
nop dword [rax]
movzx eax, byte [r8 + rdx]
xor al, byte [rdx]
mov byte [rcx + rdx], al
inc rdx
cmp rdx, r10
jb 0x14001e720
mov rbx, qword [rsp + 8]
ret
Function at 0x1400202c0
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x48
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rax, qword [0x140379138]
test rax, rax
jne 0x140020377
movzx eax, word [0x14006be88]
lea r8, [rsp + 0x22]
mov word [rsp + 0x20], ax
mov edx, 0x1004
movzx eax, byte [0x14006be8a]
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 0x140020357
cmp rax, 6
jne 0x140020340
jmp 0x14002035c
sbb edx, edx
or edx, 1
test edx, edx
lea rcx, [0x1401c1e10]
lea rax, [0x1401c1bf0]
cmove rax, rcx
mov qword [0x140379138], rax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14005bc60
add rsp, 0x48
ret

Function at 0x140021dc0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
cmp byte [0x14037d144], 0
jne 0x140021ef3
inc dword [0x14037d140]
lea rcx, str.UMASK
mov byte [0x14037d144], 1
mov dword [0x1401c0dd4], 0x1b0
mov dword [0x1401c0de0], 0x1c0
mov dword [0x14037d7d4], 0
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140021e21
mov rcx, rax
call fcn.140021c00
or eax, 0x180
mov dword [0x1401c0dd4], eax
lea rcx, str.UMASK_DIR
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140021e46
mov rcx, rax
call fcn.140021c00
or eax, 0x1c0
mov dword [0x1401c0de0], eax
call fcn.1400064c0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, qword [0x14037d5b0]
mov qword [0x14037d150], rax
lea rax, [0x14037d150]
mov qword [0x14037d148], rax
lea rax, str.unknown
mov qword [0x14037d5b8], rax
mov qword [0x14037d158], 0
test rcx, rcx
je 0x140021ea0
call fcn.140026cb0
add rax, qword [0x14037d5b0]
mov qword [0x14037d5b8], rax
call fcn.1400064c0
call fcn.1400281c0
test al, al
je 0x140021eb5
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 [0x14037d5a8], rax
test rax, rax
je 0x140021ee4
mov rdx, rax
lea rcx, [0x14037d7e0]
call fcn.140028dc0
mov qword [0x14037d5a8], rax
call fcn.140029430
call fcn.140021f10
call fcn.140021ff0
xor al, al
add rsp, 0x28
ret
Function at 0x140021f10
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x28
lea rcx, [0x140021f00]
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 0x1400220a0
push rbp
lea rbp, [rsp - 0x980]
sub rsp, 0xa80
mov rax, qword [0x140374a58]
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 0x14002221e
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 0x140022203
nop dword [rax]
inc ebx
cmp eax, 0xea
je 0x1400221af
test eax, eax
jne 0x140022203
cmp dword [rsp + 0x48], 1
jne 0x1400221af
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], rdi
lea r8, [0x14006d200]
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x460]
call fcn.1400330b0
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 0x140022160
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.14005bc60
add rsp, 0xa80
pop rbp
ret
Function at 0x140021f30
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 0x140021fd7
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 0x140021fd7
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 0x140021fd7
lea rcx, str.HAVE_TCPIP
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140021fd0
cmp byte [0x14037d145], 0
je 0x140021fd7
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 0x140021ff0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
call fcn.140021f30
test al, al
je 0x140022077
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 0x140022037
cmp word [rsp + 0x20], bx
je 0x14002204e
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 0x140022055
mov byte [0x14037d145], 1
mov rbx, qword [rsp + 0x1d0]
xor al, al
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 0x1400220a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x28
lea rcx, [0x140021f00]
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 0x1400220a0
push rbp
lea rbp, [rsp - 0x980]
sub rsp, 0xa80
mov rax, qword [0x140374a58]
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 0x14002221e
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 0x140022203
nop dword [rax]
inc ebx
cmp eax, 0xea
je 0x1400221af
test eax, eax
jne 0x140022203
cmp dword [rsp + 0x48], 1
jne 0x1400221af
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], rdi
lea r8, [0x14006d200]
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x460]
call fcn.1400330b0
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 0x140022160
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.14005bc60
add rsp, 0xa80
pop rbp
ret
Function at 0x1400228f0
Capabilities:
Get common file path
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x230
mov rax, qword [0x140374a58]
xor rax, rsp
mov qword [rsp + 0x220], rax
xor ebp, ebp
mov rsi, rcx
mov edi, ebp
lea edx, [rbp + 0x40]
call fcn.140028610
mov rbx, rax
test rax, rax
je 0x140022a34
xorps xmm0, xmm0
lea rcx, [rsp + 0x20]
movups xmmword [rax], xmm0
mov edx, 0x200
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
test eax, eax
je 0x14002296c
mov r8, rbx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140022540
mov edi, eax
mov edx, 0x200
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x140022992
mov r8, rbx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140022540
add edi, eax
mov r8, rbx
lea rdx, [0x14006d8c8]
mov rcx, rsi
call fcn.140022540
mov edx, 0x200
lea rcx, [rsp + 0x20]
add edi, eax
call fcn.140022b40
test rax, rax
je 0x1400229f5
mov r8, rbx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140022540
lea r8, str._data
mov edx, 0x200
lea rcx, [rsp + 0x20]
add edi, eax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov r8, rbx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140022540
add edi, eax
lea rcx, str.MYSQL_HOME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140022a17
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.140022540
add edi, eax
mov r8, rbx
lea rdx, [0x14005eb97]
mov rcx, rsi
call fcn.140022540
add eax, edi
test eax, eax
cmovg rbx, rbp
mov rax, rbx
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.14005bc60
lea r11, [rsp + 0x230]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret