joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001360
Capabilities:
Create http request
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x58]
mov dword [rsp + 0x40], 4
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftNET_Framework_SetupNDP_v4Full_
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor r9d, r9d
mov dword [rsp + 0x20], 0
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.WININET.dll_InternetOpenA]
test ebx, ebx
jne 0x140001403
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x50]
lea rax, [rsp + 0x48]
xor r8d, r8d
lea rdx, str.Release
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140001403
cmp dword [rsp + 0x48], 0x5c615
jb 0x140001403
lea rcx, str.The_.NET_4.0_Framework_is_installed.
call fcn.140001020
mov al, 1
add rsp, 0x30
pop rbx
ret
lea rcx, str.The_.NET_4.0_Framework_is_not_installed.
call fcn.140001020
xor al, al
add rsp, 0x30
pop rbx
ret
Function at 0x140001420
Capabilities:
Load windows common language runtime

Disassembly:
push rbx
push rbp
push rsi
sub rsp, 0x40
mov rbp, rcx
mov rsi, rdx
lea rcx, str.mscoree.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x1400015b5
mov qword [rsp + 0x60], rdi
lea rdx, str.CLRCreateInstance
mov rcx, rax
mov qword [rsp + 0x78], 0
xor dil, dil
mov qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140001487
lea rcx, str.Could_not_find_.NET_4.0_API_CLRCreateInstance
call fcn.140001020
jmp 0x140001561
lea r8, [rsp + 0x78]
lea rdx, [0x14000c928]
lea rcx, [0x14000c968]
call rax
test eax, eax
jns 0x1400014b3
mov edx, eax
lea rcx, str.CLRCreateInstance_failed_w_hr_0x_08lx_n
call fcn.140001020
jmp 0x140001561
call fcn.140001360
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x30]
test al, al
lea r8, [0x14000c978]
lea rdx, str.v4.0.30319
mov rax, qword [rcx]
jne 0x1400014de
lea rdx, str.v2.0.50727
call qword [rax + SafeArrayCopy]
test eax, eax
jns 0x1400014f5
mov edx, eax
lea rcx, str.ICLRMetaHost::GetRuntime_failed_w_hr_0x_08lx_n
call fcn.140001020
jmp 0x140001561
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x70]
mov rax, qword [rcx]
call qword [rax + 0x50]
test eax, eax
jns 0x140001519
mov edx, eax
lea rcx, str.ICLRRuntimeInfo::IsLoadable_failed_w_hr_0x_08lx_n
call fcn.140001020
jmp 0x140001561
cmp dword [rsp + 0x70], 0
jne 0x14000152e
lea rcx, str..NET_runtime_v2.0.50727_cannot_be_loaded_n
call fcn.140001020
jmp 0x140001561
mov rcx, qword [rsp + 0x30]
lea r8, [0x14000c938]
mov r9, rsi
lea rdx, [0x14000c958]
mov rax, qword [rcx]
call qword [rax + 0x48]
test eax, eax
jns 0x14000155e
mov edx, eax
lea rcx, str.ICLRRuntimeInfo::GetInterface_failed_w_hr_0x_08lx_n
call fcn.140001020
jmp 0x140001561
mov dil, 1
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14000157a
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov qword [rsp + 0x78], 0
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14000158a
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
test dil, dil
mov rdi, qword [rsp + 0x60]
jne 0x1400015fa
lea rdx, str.CorBindToRuntime
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x1400015bf
lea rcx, str.Could_not_find_API_CorBindToRuntime
call fcn.140001020
xor eax, eax
add rsp, 0x40
pop rsi
pop rbp
pop rbx
ret
lea r9, [0x14000c938]
mov qword [rsp + 0x20], rsi
lea r8, [0x14000c958]
mov rcx, rbp
lea rdx, [0x14000c578]
call rax
test eax, eax
jns 0x1400015fa
mov edx, eax
lea rcx, str.CorBindToRuntime_failed_w_hr_0x_08lx_n
call fcn.140001020
xor eax, eax
add rsp, 0x40
pop rsi
pop rbp
pop rbx
ret
mov eax, 1
add rsp, 0x40
pop rsi
pop rbp
pop rbx
ret
Function at 0x140002cd0
Capabilities:
Parse pe header

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

Function at 0x140006520
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov ebx, ecx
mov dword [rsp + 0x60], 0
xor ecx, ecx
mov dword [rsp + 0x68], 2
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140006582
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140006582
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
jne 0x140006582
mov eax, 0x20b
cmp word [rdx + 0x18], ax
jne 0x140006582
cmp dword [rdx + 0x84], 0xe
jbe 0x140006582
cmp dword [rdx + 0xf8], 0
je 0x140006582
mov ecx, ebx
call fcn.1400063e0
lea rax, [rsp + 0x68]
mov byte [rsp + 0x58], 0
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rcx, [0x14000f800]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
call fcn.140006260
cmp dword [rsp + 0x60], 0
jne 0x1400065c5
mov ecx, ebx
call fcn.140006390
int3
add rsp, 0x40
pop rbx
ret

Function at 0x140006610
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
xor eax, eax
mov ebx, ecx
xor ecx, ecx
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x68], eax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000666c
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000666c
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000666c
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000666c
cmp dword [rcx + 0x84], 0xe
jbe 0x14000666c
cmp dword [rcx + 0xf8], 0
je 0x14000666c
mov ecx, ebx
call fcn.1400063e0
lea rax, [rsp + 0x68]
mov byte [rsp + 0x58], 0
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rcx, [0x14000f800]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
call fcn.140006260
cmp dword [rsp + 0x60], 0
jne 0x1400066af
mov ecx, ebx
call fcn.140006390
int3
add rsp, 0x40
pop rbx
ret
Function at 0x140006da0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x4f0]
sub rsp, 0x5f0
mov rax, qword [0x14000f038]
xor rax, rsp
mov qword [rbp + 0x4e0], rax
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x140006ddc
mov ecx, 5
int 0x29
mov ecx, 2
call fcn.140002b74
xorps xmm0, xmm0
lea rcx, [rbp + 0x10]
xor eax, eax
xor edx, edx
mov r8d, 0x4d0
mov qword [rbp], rax
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
call sub.msvcrt.dll_memset
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rcx, [rbp + 0x10]
lea rax, [rbp + 0x10]
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rbx, qword [rbp + 0x108]
lea rdx, [rsp + 0x40]
mov rcx, rbx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_RtlLookupFunctionEntry]
test rax, rax
je 0x140006e98
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x38], 0
mov r9, rax
mov qword [rsp + 0x30], rcx
mov r8, rbx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp + 0x10]
mov qword [rsp + 0x20], rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_RtlVirtualUnwind]
mov rax, qword [rbp + 0x4f8]
mov qword [rbp + 0x108], rax
lea rax, [rbp + 0x4f8]
add rax, 8
mov dword [rsp + 0x70], 0xc0000417
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x4f8]
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x74], 1
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x140006efe
test ebx, ebx
jne 0x140006efe
lea ecx, [rax + 2]
call fcn.140002b74
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000417
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rbp + 0x4e0]
xor rcx, rsp
call fcn.1400020d0
mov rbx, qword [rsp + 0x600]
add rsp, 0x5f0
pop rbp
ret
Function at 0x2fc4d4970
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d5a50
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d5372
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f7108]
test eax, eax
je 0x2fc4d540a
lea rax, [0x2fc4f70e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f7110]
mov qword [rbp - 8], rax
jmp 0x2fc4d53ee
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d53e2
cmp qword [rbp - 0x10], 0
je 0x2fc4d53e2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d53a8
lea rax, [0x2fc4f70e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d540b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d5510
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d5538
mov eax, 0
jmp 0x2fc4d5586
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d5561
mov eax, 0
jmp 0x2fc4d5586
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d5581
mov eax, 0
jmp 0x2fc4d5586
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d558c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4d560a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d5601
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4d5601
mov rax, qword [rbp - 8]
jmp 0x2fc4d561f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4d55d4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000ab30]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000ab40]
mov dword [rax], 1
mov rax, qword [0x14000ab50]
mov dword [rax], 1
mov rax, qword [0x14000aae0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000ab20]
mov dword [0x14000e00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14000ac00]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14000abe0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14000aa90]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x140001450
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov dword [rbp - 0x2c], 0
mov rax, qword [rbp + 0x18]
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x18]
add rax, rdx
mov qword [rbp - 0x18], rax
movabs rax, 0x506c617574726956
mov qword [rbp - 0x3b], rax
movabs rax, 0x746365746f7250
mov qword [rbp - 0x34], rax
lea rax, [0x140009010]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov rcx, rax
lea rax, [rbp - 0x3b]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 0x20], rax
mov dword [rbp - 4], 0
jmp 0x1400015ec
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
lea rcx, [rdx + rax]
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
add rax, rcx
add rax, 0x18
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
lea rdx, str..text
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x1400015e8
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x28]
mov edx, dword [rdx + 8]
mov r10d, edx
mov rdx, qword [rbp - 0x28]
mov edx, dword [rdx + 0xc]
mov ecx, edx
mov rdx, qword [rbp + 0x10]
add rdx, rcx
mov rcx, rdx
lea rdx, [rbp - 0x2c]
mov r9, rdx
mov r8d, 0x40
mov rdx, r10
call rax
mov eax, dword [rbp - 0x2c]
test eax, eax
jne 0x140001567
mov eax, 0xffffffff
jmp 0x140001605
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 8]
mov r8d, eax
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp + 0x18]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 0xc]
mov ecx, eax
mov rax, qword [rbp + 0x10]
add rax, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x20]
mov ecx, dword [rbp - 0x2c]
mov rdx, qword [rbp - 0x28]
mov edx, dword [rdx + 8]
mov r11d, edx
mov rdx, qword [rbp - 0x28]
mov edx, dword [rdx + 0xc]
mov r8d, edx
mov rdx, qword [rbp + 0x10]
add rdx, r8
mov r10, rdx
lea rdx, [rbp - 0x2c]
mov r9, rdx
mov r8d, ecx
mov rdx, r11
mov rcx, r10
call rax
mov eax, dword [rbp - 0x2c]
test eax, eax
jne 0x1400015e1
mov eax, 0xffffffff
jmp 0x140001605
mov eax, 0
jmp 0x140001605
add dword [rbp - 4], 1
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 4], eax
jl 0x1400014d6
mov eax, 0xffffffff
add rsp, 0x60
pop rbp
ret
Function at 0x14000172b
Capabilities:
Check mutex on windows
Create pipe

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov dword [rbp + 0x10], ecx
mov dword [rbp - 4], 0
cmp dword [rbp + 0x10], 1
jne 0x14000179c
lea r8, str.GlobalSyncUnit
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateMutexA]
call rax
mov qword [0x14000e030], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
sete al
test al, al
je 0x1400018e7
mov rax, qword [0x14000e030]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [rbp - 4], 1
jmp 0x1400018e7
cmp dword [rbp + 0x10], 2
jne 0x140001801
lea r9, str.GlobalSyncUnit
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateEventA]
call rax
mov qword [0x14000e030], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
sete al
test al, al
je 0x1400018e7
mov rax, qword [0x14000e030]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [rbp - 4], 1
jmp 0x1400018e7
cmp dword [rbp + 0x10], 3
jne 0x140001866
lea r9, str.GlobalSyncUnit
mov r8d, 0x64
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
call rax
mov qword [0x14000e030], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
sete al
test al, al
je 0x1400018e7
mov rax, qword [0x14000e030]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [rbp - 4], 1
jmp 0x1400018e7
cmp dword [rbp + 0x10], 4
jne 0x1400018e7
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x400
mov dword [rsp + 0x20], 0x400
mov r9d, 0xff
mov r8d, 4
mov edx, 3
lea rax, str..pipeSyncUnit
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
call rax
mov qword [0x14000e030], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
sete al
test al, al
je 0x1400018e7
mov rax, qword [0x14000e030]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [rbp - 4], 1
mov eax, dword [rbp - 4]
add rsp, 0x50
pop rbp
ret

Function at 0x140001948
Capabilities:
Create directory
Get common file path

Disassembly:
push rbp
sub rsp, 0x250
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1e0], rcx
mov byte [rbp + 0x1cf], 0
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 0
mov edx, 0x1c
mov ecx, 0
mov rax, qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
call rax
test eax, eax
setne al
test al, al
jne 0x140001a0c
mov rcx, qword [rbp + 0x1e0]
lea rdx, [rbp + 0xc0]
lea rax, [rbp - 0x50]
mov r9, rcx
mov r8, rdx
lea rdx, str._sMicrosoft_s
mov rcx, rax
call sym.sprintf_char__char_const__::_
lea rax, [rbp - 0x50]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call rax
test eax, eax
jne 0x1400019ea
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
jne 0x1400019f1
mov eax, 1
jmp 0x1400019f6
mov eax, 0
test al, al
je 0x140001a03
mov byte [rbp + 0x1cf], 1
jmp 0x140001a0d
mov byte [rbp + 0x1cf], 0
jmp 0x140001a0d
nop
add rsp, 0x250
pop rbp
ret
Function at 0x140002870
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x1400028e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000e0b4]
mov rbx, rcx
test esi, esi
jle 0x140002a10
mov rax, qword [0x14000e0b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000292b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400029b5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002910
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140002a32
mov rax, qword [0x14000e0b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000e0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002a17
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400029ae
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400029c0
add dword [0x14000e0b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14000e0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400029ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140002938
mov rax, qword [0x14000e0b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002fa0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000e120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000e100]
test rbx, rbx
je 0x140002ffc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002ff3
test rsi, rsi
je 0x140002ff3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002fd8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]