joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140026070
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
cmp qword [rcx + 0x5ca8], 0
lea rbx, [rcx + 0x5cb0]
mov rsi, r8
mov rbp, rdx
mov rdi, rcx
je 0x140026117
mov r9d, dword [rbx + 4]
mov qword [rsp + 0x30], r14
xor r14d, r14d
test r9d, r9d
jns 0x1400260ca
mov eax, r9d
mov rcx, rbx
cdq
sub eax, edx
mov edx, r14d
sar eax, 1
add eax, r9d
test eax, eax
cmovg edx, eax
call fcn.1400285b0
mov r8, rsi
mov dword [rbx], r14d
mov rdx, rbp
mov rcx, rbx
call fcn.14000fb00
mov eax, dword [rbx]
mov edx, 1
mov r9, qword [rdi + 0x5ca8]
test eax, eax
lea ecx, [rax - 1]
mov rax, qword [rdi + 0x5cb8]
cmove ecx, r14d
test rax, rax
movsxd r8, ecx
lea rcx, [0x140087468]
cmovne rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r14, qword [rsp + 0x30]
jmp 0x14002611f
mov rcx, rbx
call fcn.14000fb00
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x140026590
Capabilities:
Hash data with crc32

Disassembly:
sub rsp, 8
movzx r9d, byte [rcx]
lea r8, [rcx + 1]
mov r10, qword [0x140087470]
mov r11d, 0xffffffff
mov eax, r11d
test r9b, r9b
je 0x1400265f3
mov qword [rsp], rbx
lea rbx, [0x140071b20]
nop dword [rax]
cmp r9b, 0x23
jne 0x1400265d3
cmp byte [r8], r9b
jne 0x1400265d3
cmp byte [r8 + 1], r9b
cmove eax, r11d
movzx edx, al
movzx ecx, r9b
movzx r9d, byte [r8]
xor rdx, rcx
shr eax, 8
inc r8
xor eax, dword [rbx + rdx*4]
test r9b, r9b
jne 0x1400265c0
mov rbx, qword [rsp]
movsxd rcx, dword [r10 + 0x5c20]
xor r8d, r8d
not eax
test ecx, ecx
jle 0x140026627
mov r10, qword [r10 + 0x5c28]
mov r9, rcx
mov edx, r8d
lea rcx, [r10 + 8]
cmp dword [rcx], eax
je 0x14002662e
inc r8d
inc rdx
add rcx, 0x48
cmp rdx, r9
jl 0x140026614
xor eax, eax
add rsp, 8
ret
movsxd rax, r8d
lea rcx, [rax + rax*8]
lea rax, [r10 + rcx*8]
add rsp, 8
ret
Function at 0x140053a60
Capabilities:
Hash data with crc32

Disassembly:
push rdi
sub rsp, 0x20
test dword [rcx + 0x10], 0x100000
mov rdi, rdx
je 0x140053aec
movzx r9d, byte [rdx]
lea r8, [rdx + 1]
mov r10d, 0xffffffff
mov eax, r10d
test r9b, r9b
je 0x140053ac0
lea r11, [0x140071b20]
nop
cmp r9b, 0x23
jne 0x140053aa3
cmp byte [r8], r9b
jne 0x140053aa3
cmp byte [r8 + 1], r9b
cmove eax, r10d
movzx edx, al
movzx ecx, r9b
movzx r9d, byte [r8]
xor rdx, rcx
shr eax, 8
inc r8
xor eax, dword [r11 + rdx*4]
test r9b, r9b
jne 0x140053a90
mov rcx, qword [0x140087470]
not eax
cmp dword [rcx + 0x3f58], eax
jne 0x140053ad7
mov dword [rcx + 0x3f5c], eax
cmp dword [rcx + 0x3f88], eax
jne 0x140053b49
mov byte [rcx + 0x3f8c], 1
add rsp, 0x20
pop rdi
ret
mov rax, qword [0x140087470]
xor edx, edx
mov qword [rsp + 0x30], rbx
mov rcx, rdi
mov qword [rsp + 0x38], rsi
mov rbx, qword [rax + 0x3ef8]
movsxd rax, dword [rbx + 0xf0]
mov r8, qword [rbx + 0xf8]
mov r8d, dword [r8 + rax*4 - 4]
call fcn.14000f080
mov rcx, qword [rbx]
mov esi, eax
mov rbx, qword [rsp + 0x30]
cmp dword [rcx + 0x3f40], eax
jne 0x140053b42
mov r8, rdi
mov edx, 0xb
mov ecx, eax
call fcn.140027850
mov eax, esi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140065250
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140065278
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14006529e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400652a0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400652f9
test ecx, ecx
jle 0x1400652d9
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x1400652f9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400652f9
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140065320
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140065342
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140065358
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140065374
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140065376
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400653b2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14006544e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400653ed
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14006542e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14006544e
cmp rbx, rax
ja 0x140065400
test rbx, rbx
je 0x14006544e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x1400658b0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140086040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x1400658dd
xor eax, eax
jmp 0x140065a49
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140065917
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140065917
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140065a49
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140065a3c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14006595a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140065985
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140065a41
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400659f4
sub eax, 1
je 0x1400659f4
cmp eax, 2
jne 0x140065a3c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140065a41
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140065a22
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140065a3c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140065a41
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140067e10
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140065d80
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140086040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140065e53
cmp byte [rcx + 0x71], 0
je 0x140065e53
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140065e4f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140065e14
sub eax, 1
je 0x140065e18
cmp eax, 2
jne 0x140065e4f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140067e10
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140065e46
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140065e4f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140065dfc
xor al, al
jmp 0x140065dfc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140067e10
add rsp, 0x60
pop rbx
ret

Function at 0x14006741c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x140067456
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14006745b
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400674a4
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140070c60]
cmp byte [rcx + rax], 0
je 0x1400674a4
dec r8
sub rdx, 1
jne 0x14006748a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140068b0c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140068b56
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140068b56
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140068b56
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140068b56
cmp dword [rcx + 0x84], 0xe
jbe 0x140068b56
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140068b58
xor al, al
add rsp, 0x28
ret
Function at 0x140b50058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140b501df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140b50089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b5006f
add dl, dl
jne 0x140b50096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b500f6
xor eax, eax
add dl, dl
jne 0x140b500a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b501ad
add dl, dl
jne 0x140b500b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b500c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b500d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b500dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140b500ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140b5007e
mov eax, 1
add dl, dl
jne 0x140b50106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b50113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b500fb
sub eax, ebx
mov ebx, 1
jne 0x140b5014c
mov ecx, 1
add dl, dl
jne 0x140b5012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b5013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b50123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b5007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140b50168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b50175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b5015d
cmp eax, 0x7d00
jae 0x140b5019b
cmp eax, 0x500
jb 0x140b50196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b5007e
cmp eax, 0x7f
ja 0x140b5019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b5007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140b501d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140b5007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001dd8
Capabilities:
Get common file path

Disassembly:
sub rsp, 0x2b8
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
lea rdx, [rsp + 0x90]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140001e78
lea rcx, [rsp + 0x30]
call qword [sym.imp.ole32.dll_CoCreateGuid]
test eax, eax
jne 0x140001e78
lea r8d, [rax + 0x28]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x140001e78
lea rax, [rsp + 0x40]
mov edx, 0x104
lea r9, [rsp + 0x90]
mov qword [rsp + 0x20], rax
lea r8, [0x14002fae0]
lea rcx, [0x1400602a0]
call fcn.14000350c
cmp eax, 0xffffffff
je 0x140001e78
mov al, 1
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.140011610
add rsp, 0x2b8
ret
xor al, al
jmp 0x140001e60
Function at 0x140002e84
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x58
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp qword [0x14005f430], 0
je 0x140002ef3
mov r8d, 0x14
lea rdx, [rsp + 0x20]
lea rcx, str.MPCL_MUTEX_HANDLE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, eax
call fcn.14000305c
cmp dword [0x14005c278], 0
je 0x140002ef3
xor r9d, r9d
lea r8, str.1P3QWXAT2
lea rdx, [rsp + 0x20]
lea rcx, str.MPdiagMutex
call fcn.140006590
mov rcx, qword [0x14005c218]
mov rdx, rax
call fcn.140006680
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140011610
add rsp, 0x58
ret

Function at 0x140002f08
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rcx, rax
mov rbp, rax
call fcn.140003030
mov rcx, rbx
mov rdi, rax
call fcn.140003030
add rdi, rax
lea rcx, [rdi*2 + 2]
call fcn.140007930
lea rdx, [rdi - 1]
mov r8, rbx
mov rcx, rax
mov rsi, rax
call fcn.140002fa0
mov rcx, rax
mov r8, rbp
sub rcx, rsi
sar rcx, 1
sub rdi, rcx
mov rcx, rax
lea rdx, [rdi - 1]
call fcn.140002fa0
mov rbx, qword [rsp + 0x30]
xor ecx, ecx
mov rbp, qword [rsp + 0x38]
mov word [rax], cx
mov rax, rsi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140003590
Capabilities:
Create pipe

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rdi, r8
mov rsi, rdx
mov rbp, rcx
mov ebx, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x14001f56a
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x14001f589
inc ebx
cmp ebx, 5
jg 0x14001f5a8
lea ecx, [rax + 0x13]
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001f59a
xor edx, edx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov r8, rdi
mov rdx, rsi
mov rcx, rbp
jmp 0x1400035b2
xor edx, edx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_RaiseException]

Function at 0x140003cf8
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x28
lea rax, fcn.14000392c
xorps xmm0, xmm0
mov qword [0x14005fc70], rax
xor eax, eax
cmp dword [0x14005f3fc], eax
mov qword [0x14005fc78], rax
movdqa xmmword [0x14005fc80], xmm0
mov dword [0x14005fc90], eax
mov dword [0x14005fc98], eax
jne 0x140003d3f
lea rcx, [0x14005f3f8]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea rax, [0x14005fc70]
add rsp, 0x28
ret

Function at 0x140003d4c
Capabilities:
Get file version info

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x20
and dword [rdx], 0
mov rsi, rdx
and dword [rax + 0x18], 0
lea rdx, [rax + 0x10]
and dword [rax + 0x10], 0
mov rdi, r8
and qword [rax + 0x20], 0
mov r14, rcx
and dword [r8], 0
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebp, eax
test eax, eax
je 0x140003de0
mov ecx, ebp
call fcn.140007930
mov r9, rax
mov r8d, ebp
xor edx, edx
mov rcx, r14
mov rbx, rax
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x140003dd2
lea r9, [rsp + 0x60]
mov rcx, rbx
lea r8, [rsp + 0x68]
lea rdx, [0x14002fdf8]
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x140003dd2
mov rcx, qword [rsp + 0x68]
mov eax, dword [rcx + 0xc]
mov dword [rsi], eax
mov eax, dword [rcx + 8]
mov dword [rdi], eax
test rbx, rbx
je 0x140003de0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rsp, 0x20
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140006a6c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
lea eax, [rcx - 1]
xor r12d, r12d
mov rsi, rdx
mov r14d, ecx
cmp eax, 1
ja 0x140020496
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rcx, rax
call fcn.140008590
test eax, eax
jne 0x1400204a2
lea rcx, [rsp + 0x88]
call fcn.14000853c
test eax, eax
jne 0x1400204b1
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov qword [rsp + 0x38], r12
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x30], r12
mov r9d, edi
mov dword [rsp + 0x28], r12d
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], r12
mov ecx, eax
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
mov rcx, rbx
call fcn.140007930
mov qword [rsp + 0x38], r12
mov r9d, edi
mov qword [rsp + 0x30], r12
mov r8, rsi
mov dword [rsp + 0x28], ebx
xor edx, edx
mov ecx, r15d
mov qword [rsp + 0x20], rax
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 1
jl 0x140006b61
lea r8d, [rax - 1]
mov rdx, rbp
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
test rbp, rbp
je 0x140006b48
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
xor ecx, ecx
call fcn.14000cfa4
int3
call qword [sym.imp.KERNEL32.dll_GetACP]
nop
jmp 0x140006ac8
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__cputws]
nop
jmp 0x140006b48
or rdi, 0xffffffffffffffff
inc rdi
cmp word [rsi + rdi*2], r12w
jne 0x1400204b5
mov rcx, qword [rsp + 0x88]
lea r8d, [rdi + rdi]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], r12
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
jmp 0x140006b48

Function at 0x14000853c
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0xb0
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rbx, rcx
xor r8d, r8d
lea rcx, str.VS_UNICODE_OUTPUT
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x140020dc6
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.140011610
add rsp, 0xb0
pop rbx
ret
mov r8d, 0x40
lea rdx, [rsp + 0x20]
lea rcx, str.VS_UNICODE_OUTPUT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi64]
mov qword [rbx], rax
mov eax, 1
jmp 0x140008574
Function at 0x140008a10
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
cmp word [rcx], 0
mov rdi, rcx
mov rbx, rcx
je 0x140008a3e
add rbx, 2
cmp word [rbx], 0
jne 0x140008a34
sub rbx, 4
lea r15, str.0123456789abcdef
xor r14d, r14d
mov ebp, r14d
mov rcx, qword [0x14005db08]
lea r8, [rsp + 0x40]
mov edx, 4
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x140020ee0
movzx ecx, byte [rsp + 0x40]
lea r8, [0x14002ff58]
mov eax, ecx
mov rdx, rbx
and eax, 0xf
shr rcx, 4
movzx eax, word [r15 + rax*2]
mov word [rbx - 2], ax
movzx eax, word [r15 + rcx*2]
movzx ecx, byte [rsp + 0x41]
mov word [rbx - 4], ax
mov eax, ecx
and eax, 0xf
shr rcx, 4
movzx eax, word [r15 + rax*2]
mov word [rbx - 6], ax
movzx eax, word [r15 + rcx*2]
movzx ecx, byte [rsp + 0x42]
mov word [rbx - 8], ax
mov eax, ecx
and eax, 0xf
shr rcx, 4
movzx eax, word [r15 + rax*2]
mov word [rbx - 0xa], ax
movzx eax, word [r15 + rcx*2]
movzx ecx, byte [rsp + 0x43]
mov word [rbx - 0xc], ax
mov eax, ecx
and eax, 0xf
shr rcx, 4
movzx eax, word [r15 + rax*2]
mov word [rbx - 0xe], ax
movzx eax, word [r15 + rcx*2]
mov rcx, rdi
mov word [rbx - 0x10], ax
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff50]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff48]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff40]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff38]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff30]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
lea r8, [0x14002ff28]
mov rdx, rbx
mov rcx, rdi
call fcn.140008bc4
test eax, eax
jne 0x140020ef0
mov word [rbx], r14w
mov rax, rdi
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
mov ecx, 0x1f65
call fcn.14000cfa4
nop
jmp 0x140008a6e
inc ebp
cmp ebp, 0x64
jl 0x140008a4f
mov ecx, 0x1f65
call fcn.14000cfa4
xor eax, eax
jmp 0x140008bab

Function at 0x140008ca4
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov r8d, 0xa
lea rdx, [rsp + 0x20]
lea rcx, str.MPCL_SERVER_373011
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor ebx, ebx
test eax, eax
je 0x140008d08
lea rdx, str.bananana
lea rcx, [rsp + 0x20]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
sete bl
mov dword [0x14005fc5c], ebx
mov eax, ebx
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140011610
add rsp, 0x40
pop rbx
ret
xor eax, eax
jmp 0x140008cf5