joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140065960
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
mov r9, rdx
mov r8, rcx
mov edx, 8
lea ecx, [rdx + 6]
jmp 0x140065c60
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
xor r11d, r11d
mov r10d, edx
lea esi, [rcx*4 + 4]
mov rdi, r8
lea rbp, [0x14009d5c0]
test edx, edx
je 0x140065cd1
mov rbx, r8
lea eax, [r11*4]
inc r11d
movzx edx, byte [rax + r9 + 3]
lea rbx, [rbx + 4]
shl edx, 8
mov ecx, eax
movzx eax, byte [rax + r9 + 2]
or edx, eax
shl edx, 8
movzx eax, byte [rcx + r9 + 1]
or edx, eax
movzx eax, byte [rcx + r9]
shl edx, 8
or edx, eax
mov dword [rbx - 4], edx
cmp r11d, r10d
jb 0x140065c92
mov r9d, r10d
cmp r10d, esi
jae 0x140065db4
lea r11, [r8 + r10*4]
lea rbx, [0x14009d5d0]
nop dword [rax + rax]
lea eax, [r9 - 1]
xor edx, edx
mov ecx, dword [rdi + rax*4]
mov eax, r9d
div r10d
test edx, edx
jne 0x140065d4c
mov r8d, ecx
movzx eax, cl
movzx ecx, byte [rax + rbx]
mov eax, r8d
shr rax, 0x18
shl ecx, 8
movzx eax, byte [rax + rbx]
or ecx, eax
mov eax, r8d
shr rax, 0x10
shl ecx, 8
movzx edx, al
shr r8, 8
movzx eax, byte [rdx + rbx]
or ecx, eax
movzx eax, r8b
shl ecx, 8
movzx edx, byte [rax + rbx]
movzx eax, byte [rbp]
or ecx, edx
xor ecx, eax
inc rbp
jmp 0x140065d98
cmp r10d, 6
jbe 0x140065d98
cmp edx, 4
jne 0x140065d98
mov r8, rcx
mov rax, rcx
shr rax, 0x10
movzx ecx, al
mov rax, r8
shr rax, 0x18
movzx ecx, byte [rcx + rbx]
movzx eax, byte [rax + rbx]
shl eax, 8
or ecx, eax
mov rax, r8
shr rax, 8
movzx edx, al
shl ecx, 8
movzx eax, byte [rdx + rbx]
or ecx, eax
movzx eax, r8b
shl ecx, 8
movzx edx, byte [rax + rbx]
or ecx, edx
mov eax, r9d
inc r9d
sub eax, r10d
xor ecx, dword [rdi + rax*4]
mov dword [r11], ecx
add r11, 4
cmp r9d, esi
jb 0x140065cf0
mov rbx, qword [rsp + 8]
mov rbp, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
ret

Function at 0x140065980
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub rsp, 0x38
mov qword [rsp + 0x28], r9
mov r9, rdx
mov rdx, rcx
mov qword [rsp + 0x20], r8
mov ecx, 0xe
lea r8, [0x14009d5d0]
call fcn.140065dd0
add rsp, 0x38
ret

Function at 0x1400659b0
Capabilities:
Hash data using sha256

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call fcn.140065ae0
movups xmm0, xmmword [0x14009d580]
xor eax, eax
movups xmmword [rbx], xmm0
movups xmm1, xmmword [0x14009d590]
mov qword [rbx + 0x20], rax
mov dword [rbx + 0x28], eax
movups xmmword [rbx + 0x10], xmm1
add rsp, 0x20
pop rbx
ret
Function at 0x140065c60
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
mov r9, rdx
mov r8, rcx
mov edx, 8
lea ecx, [rdx + 6]
jmp 0x140065c60
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
xor r11d, r11d
mov r10d, edx
lea esi, [rcx*4 + 4]
mov rdi, r8
lea rbp, [0x14009d5c0]
test edx, edx
je 0x140065cd1
mov rbx, r8
lea eax, [r11*4]
inc r11d
movzx edx, byte [rax + r9 + 3]
lea rbx, [rbx + 4]
shl edx, 8
mov ecx, eax
movzx eax, byte [rax + r9 + 2]
or edx, eax
shl edx, 8
movzx eax, byte [rcx + r9 + 1]
or edx, eax
movzx eax, byte [rcx + r9]
shl edx, 8
or edx, eax
mov dword [rbx - 4], edx
cmp r11d, r10d
jb 0x140065c92
mov r9d, r10d
cmp r10d, esi
jae 0x140065db4
lea r11, [r8 + r10*4]
lea rbx, [0x14009d5d0]
nop dword [rax + rax]
lea eax, [r9 - 1]
xor edx, edx
mov ecx, dword [rdi + rax*4]
mov eax, r9d
div r10d
test edx, edx
jne 0x140065d4c
mov r8d, ecx
movzx eax, cl
movzx ecx, byte [rax + rbx]
mov eax, r8d
shr rax, 0x18
shl ecx, 8
movzx eax, byte [rax + rbx]
or ecx, eax
mov eax, r8d
shr rax, 0x10
shl ecx, 8
movzx edx, al
shr r8, 8
movzx eax, byte [rdx + rbx]
or ecx, eax
movzx eax, r8b
shl ecx, 8
movzx edx, byte [rax + rbx]
movzx eax, byte [rbp]
or ecx, edx
xor ecx, eax
inc rbp
jmp 0x140065d98
cmp r10d, 6
jbe 0x140065d98
cmp edx, 4
jne 0x140065d98
mov r8, rcx
mov rax, rcx
shr rax, 0x10
movzx ecx, al
mov rax, r8
shr rax, 0x18
movzx ecx, byte [rcx + rbx]
movzx eax, byte [rax + rbx]
shl eax, 8
or ecx, eax
mov rax, r8
shr rax, 8
movzx edx, al
shl ecx, 8
movzx eax, byte [rdx + rbx]
or ecx, eax
movzx eax, r8b
shl ecx, 8
movzx edx, byte [rax + rbx]
or ecx, edx
mov eax, r9d
inc r9d
sub eax, r10d
xor ecx, dword [rdi + rax*4]
mov dword [r11], ecx
add r11, 4
cmp r9d, esi
jb 0x140065cf0
mov rbx, qword [rsp + 8]
mov rbp, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
ret
Function at 0x1400682a0
Capabilities:
Parse pe header

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

Function at 0x1400785d0
Capabilities:
Parse pe header

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

Function at 0x14007fa54
Capabilities:
Read file on windows

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, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x14007f77a
call fcn.140075a04
mov dword [rax], 0x16
call fcn.14006e230
jmp 0x14007f8c5
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14007f8c5
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14007f8c5
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14007f7a9
lock or dword [rcx + 0x14], 0x10
jmp 0x14007f8c5
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14007f7bd
call fcn.14008005c
mov esi, dword [rbx + 0x10]
cmp esi, 1
jne 0x14007f7cd
mov rax, qword [rbx]
mov bpl, byte [rax]
jmp 0x14007f7d0
xor bpl, bpl
mov rdi, qword [rbx + 8]
mov rcx, rbx
mov qword [rbx], rdi
call fcn.14007d438
mov r8d, dword [rbx + 0x20]
mov ecx, eax
mov rdx, rdi
call fcn.140080630
mov dword [rbx + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 2
jbe 0x14007f8b3
mov eax, dword [rbx + 0x14]
test al, 6
jne 0x14007f861
mov rcx, rbx
call fcn.14007d438
cmp eax, 0xffffffff
je 0x14007f84c
mov rcx, rbx
call fcn.14007d438
cmp eax, 0xfffffffe
je 0x14007f84c
mov rcx, rbx
call fcn.14007d438
movsxd rdi, eax
lea r14, [0x1400bec60]
mov rcx, rbx
sar rdi, 6
call fcn.14007d438
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rdi*8]
lea rdx, [rax + rcx*8]
jmp 0x14007f853
lea rdx, [0x1400b96e0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x14007f861
lock or dword [rbx + 0x14], 0x20
cmp dword [rbx + 0x20], 0x200
jne 0x14007f885
mov eax, dword [rbx + 0x14]
shr eax, 6
test al, 1
je 0x14007f885
mov eax, dword [rbx + 0x14]
shr eax, 8
test al, 1
jne 0x14007f885
mov dword [rbx + 0x20], 0x1000
mov rax, qword [rbx]
cmp esi, 1
jne 0x14007f8a3
movzx ecx, byte [rax]
dec dword [rbx + 0x10]
shl cx, 8
movzx eax, bpl
or cx, ax
inc qword [rbx]
jmp 0x14007f8ae
movzx ecx, word [rax]
add dword [rbx + 0x10], 0xfffffffe
add qword [rbx], 2
movzx eax, cx
jmp 0x14007f8ca
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rbx + 0x14], eax
and dword [rbx + 0x10], 0
mov eax, 0xffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
jmp 0x14007f744
Function at 0x14008c2a0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14008c2c8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14008c2c8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001000
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push rbx
sub rsp, 0x30
lea rcx, str.C:Program_Files__x86_XM2we_Configuration_Software_
call fcn.140005d78
lea rcx, str.C:Program_Files__x86_XM2we_Configuration_Software_version
call fcn.140005d78
lea rdx, [0x1400198f4]
lea rcx, [0x140019900]
call fcn.14000551c
mov rbx, rax
test rax, rax
je 0x14000105b
mov r9, rax
lea rcx, [0x14001ca80]
mov edx, 1
mov r8d, 0x1e27e3
call fcn.140005abc
mov rcx, rbx
call fcn.1400056b4
mov dword [rsp + 0x28], 0xa
lea r8, str.C:Program_Files__x86_XM2we_Configuration_Software_versionXM2we_Configuration_Software_Setup.exe
xor r9d, r9d
mov qword [rsp + 0x20], 0
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [0x140019a50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140001085
test al, 0x10
jne 0x140001085
lea rdx, [0x1400198f4]
lea rcx, str.C:Program_Files__x86_XM2we_Configuration_SoftwareOemDrv.exe
call fcn.14000551c
mov rbx, rax
test rax, rax
je 0x1400010e3
mov r9, rax
lea rcx, [0x1401ff270]
mov edx, 1
mov r8d, 0xab0000
call fcn.140005abc
mov rcx, rbx
call fcn.1400056b4
xor eax, eax
add rsp, 0x30
pop rbx
ret

Function at 0x1400019fc
Capabilities:
Parse pe header

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

Function at 0x140005d78
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
mov rbp, rsp
sub rsp, 0x70
mov rbx, rcx
test rcx, rcx
jne 0x140005d97
call fcn.14000a430
jmp 0x140005e4c
and qword [rbp - 0x30], 0
lea rcx, [rbp - 0x50]
and qword [rbp - 0x28], 0
xor edx, edx
and qword [rbp - 0x20], 0
and qword [rbp - 0x18], 0
and qword [rbp - 0x10], 0
mov byte [rbp - 8], 0
call fcn.140005cdc
mov rax, qword [rbp - 0x48]
mov r9d, 0xfde9
cmp dword [rax + 0xc], r9d
jne 0x140005de2
cmp byte [rbp - 0x38], 0
je 0x140005e17
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140005e17
call fcn.14000a0d0
test eax, eax
jne 0x140005e03
cmp byte [rbp - 0x38], al
je 0x140005dfb
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140005e17
cmp byte [rbp - 0x38], 0
je 0x140005e14
mov rax, qword [rbp - 0x50]
and dword [rax + 0x3a8], 0xfffffffd
xor r9d, r9d
lea r8, [rbp + 0x10]
mov rcx, rbx
lea rdx, [rbp - 0x30]
call fcn.140005b60
test eax, eax
je 0x140005e30
or ebx, 0xffffffff
jmp 0x140005e3b
mov rcx, qword [rbp - 0x20]
call fcn.14000a430
mov ebx, eax
cmp byte [rbp - 8], 0
je 0x140005e4a
mov rcx, qword [rbp - 0x20]
call fcn.140008004
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rbp
ret

Function at 0x140006a40
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000683c
Function at 0x140009b30
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140009b46
mov al, 1
jmp 0x140009ba6
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140009b57
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140009ba4
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000be6c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140009ba4
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140009ba4
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140009ba4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140009ba6
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14000b808
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
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14000b88f
mov rsi, rbx
cmp word [rax], bp
je 0x14000b84e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14000b838
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14000b834
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140009dcc
mov rdi, rax
test rax, rax
je 0x14000b87c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400111b0
mov rbp, rdi
xor ecx, ecx
call fcn.140008004
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14000e4ec
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x140cb0140]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14000e543
cmp word [rdx], r13w
jne 0x14000e543
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14000e548
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14000e66d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14000e68e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14000e581
mov rdx, r9
mov word [rbx], cx
jmp 0x14000e5a8
cmp r9, r8
jae 0x14000e5b8
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14000e562
jmp 0x14000e66d
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000e662
cmp dword [rsp + 0x80], esi
je 0x14000e662
lea r8, [0x140cb0140]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14000e63a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14000e60a
mov word [rbx], r13w
jmp 0x14000e66a
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14000e617
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14000e66a
cmp word [rsp + 0x70], r13w
jne 0x14000e647
cmp rbx, r14
je 0x14000e604
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14000e224
cmp word [rsp + 0x70], r13w
je 0x14000e66d
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x140cb0140]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14000e667
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14000e66d
Function at 0x14000f824
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14000e224
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14000e224
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14000f974
cmp rax, 0xffffffffffffffff
je 0x14000f974
xor edi, edi
test rbp, rbp
jle 0x14000f91f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14000a5c0
mov rbx, rax
test rax, rax
jne 0x14000f8ac
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14000f915
mov edx, 0x8000
mov ecx, r14d
call fcn.140006abc
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140009730
cmp eax, 0xffffffff
je 0x14000f8f5
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14000f8bc
mov edx, r15d
mov ecx, r14d
call fcn.140006abc
jmp 0x14000f915
cmp byte [rsi + 0x38], dil
je 0x14000f90c
cmp dword [rsi + 0x34], 5
jne 0x14000f90c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14000f915
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140008004
jmp 0x14000f988
jns 0x14000f988
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14000e224
cmp rax, 0xffffffffffffffff
jne 0x14000f940
cmp byte [rsi + 0x30], dil
je 0x14000f988
mov edi, dword [rsi + 0x2c]
jmp 0x14000f988
mov ecx, r14d
call fcn.14000be6c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14000f988
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x14000f988
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14000f981
mov eax, dword [rsi + 0x2c]
jmp 0x14000f986
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14000e224
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140010b60
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140010b88
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140010b88
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001774
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x450
mov rax, qword [0x140007008]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov rbx, rdx
mov r8, rcx
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.140001008
mov edx, eax
test eax, eax
js 0x14000180f
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_core_shlwapi_legacy_l1_1_0.dll_PathUnquoteSpacesW]
nop dword [rax + rax]
lea rdx, [rsp + 0x230]
mov ecx, 0x104
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCurrentDirectoryW]
nop dword [rax + rax]
mov edx, eax
neg edx
sbb edx, edx
not edx
and edx, 0x80004005
test eax, eax
je 0x14000180f
lea r8, [rsp + 0x20]
mov rcx, rbx
lea rdx, [rsp + 0x230]
call qword [sym.imp.api_ms_win_core_shlwapi_legacy_l1_1_0.dll_PathCombineW]
nop dword [rax + rax]
neg rax
sbb edx, edx
not edx
and edx, 0x80004005
mov eax, edx
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140002e20
add rsp, 0x450
pop rbx
ret

Function at 0x140001834
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
mov eax, 0x1060
call fcn.140003570
sub rsp, rax
mov rax, qword [0x140007008]
xor rax, rsp
mov qword [rsp + 0x1050], rax
xor ebp, ebp
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
test rcx, rcx
je 0x140001937
mov ecx, 0xfffffff5
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetStdHandle]
nop dword [rax + rax]
mov rcx, qword [0x140007020]
cmp rcx, rax
jne 0x1400018e3
mov qword [rsp + 0x38], rbp
lea eax, [rbp + 0x3f]
mov word [rsp + 0x40], ax
mov r9d, edi
lea rax, [rsp + 0x40]
mov r8, rbx
mov qword [rsp + 0x30], rax
mov edx, 0x640
lea rax, [rsp + 0x50]
mov dword [rsp + 0x28], 0x1000
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
nop dword [rax + rax]
test eax, eax
je 0x140001937
mov rcx, qword [0x140007020]
lea rdx, [rsp + 0x50]
mov r8d, eax
jmp 0x1400018ea
lea r8d, [rdi + rdi]
mov rdx, rbx
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], rbp
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x140001937
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edx, ax
or edx, 0x80070000
test eax, eax
cmovle edx, eax
test edx, edx
jns 0x140001937
lea rcx, str.TRACE_code_failed__hr__0x_x_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
jmp 0x140001957
test esi, esi
je 0x140001957
lea rcx, [0x1400075e4]
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rcx + rdx*2], bp
jne 0x140001946
xor r8d, r8d
call fcn.140001834
mov rcx, qword [rsp + 0x1050]
xor rcx, rsp
call fcn.140002e20
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1060
pop rdi
pop rsi
pop rbp
ret
Function at 0x140002c10
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x140007600], rbx
je 0x140002c5c
cmp rax, rbx
jne 0x140002c4f
mov ebx, 1
mov esi, ebx
jmp 0x140002c61
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x140002c34
mov ebx, 1
mov eax, dword [0x140007608]
cmp eax, ebx
jne 0x140002c77
mov ecx, 0x1f
call sub.msvcrt.dll__amsg_exit
jmp 0x140002cdc
mov eax, dword [0x140007608]
test eax, eax
jne 0x140002cd6
mov dword [0x140007608], ebx
lea r15, [0x1400043a0]
lea rdi, [0x140004388]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x140002cc8
test eax, eax
jne 0x140002ccc
cmp qword [rdi], 0
je 0x140002cbd
mov rax, qword [rdi]
mov rcx, qword [vtable.H_MA8HI.0]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x140002c9e
test eax, eax
je 0x140002cdc
mov eax, 0xff
jmp 0x140002db8
mov dword [0x140007034], ebx
mov eax, dword [0x140007608]
cmp eax, ebx
jne 0x140002d03
lea rdx, [0x140004380]
lea rcx, [0x140004370]
call sub.msvcrt.dll__initterm
mov dword [0x140007608], 2
test esi, esi
jne 0x140002d10
xor eax, eax
xchg qword [0x140007600], rax
cmp qword [0x140007610], 0
je 0x140002d44
lea rcx, [0x140007610]
call fcn.140003280
test eax, eax
je 0x140002d44
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140007610]
mov r9, qword [vtable.H_MA8HI.0]
call r9
mov r8, qword [0x140007048]
mov rdx, qword [0x140007040]
mov ecx, dword [0x140007038]
call fcn.140002724
mov dword [0x140007030], eax
cmp dword [0x140007050], 0
jne 0x140002d74
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140007034], 0
jne 0x140002d89
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140007030]
jmp 0x140002db8
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
sub rsp, 0x28
call fcn.140097000
add rsp, 0x28
jmp 0x140002c10

Function at 0x14000316c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400031b8
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400031b0
cmp dword [rcx + 0x3c], edx
jl 0x1400031b0
cmp dword [rcx + 0x3c], 0x10000000
jae 0x1400031b0
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x1400031b8
mov rax, rdx
add rsp, 0x18
ret