joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140104a1c
Capabilities:
Create process on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x1fa0]
mov eax, 0x20a0
call fcn.140117f40
sub rsp, rax
mov rax, qword [0x140181c48]
xor rax, rsp
mov qword [rbp + 0x1f90], rax
mov rsi, qword [rbp + 0x2008]
lea rcx, [rsp + 0x20]
mov rbx, qword [rbp + 0x2010]
mov rdi, rdx
xor edx, edx
mov r15, r8
mov r12, r9
lea r8d, [rdx + 0x70]
call fcn.14011ac30
mov eax, 0x500
mov dword [rsp + 0x20], 0x70
xor r13d, r13d
mov qword [rsp + 0x38], rdi
cmp byte [rbp + 0x2000], r13b
mov qword [rsp + 0x30], rbx
lea ecx, [rax + 0x40]
cmove eax, ecx
mov rcx, rdi
mov dword [rsp + 0x24], eax
call fcn.140094328
test rax, rax
je 0x140104ab9
cmp word [rax], 0x2e
jne 0x140104aca
cmp word [rax + 2], r13w
jne 0x140104aca
or dword [rsp + 0x24], 1
lea rax, [0x14013ffc8]
mov qword [rsp + 0x68], rax
mov rcx, rdi
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r12
call fcn.140095154
cmp rax, rdi
jne 0x140104b15
lea rdx, [0x14013f148]
mov rcx, rdi
call fcn.140093574
test al, al
jne 0x140104b15
mov r9, rdi
lea r8, str.._s
mov edx, 0x1000
lea rcx, [rbp - 0x70]
call fcn.140004dcc
lea rax, [rbp - 0x70]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x50], 1
mov byte [0x140189805], 1
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ebx, eax
test eax, eax
jne 0x140104b6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x4c7
jne 0x140104b51
test rsi, rsi
je 0x140104b4a
mov qword [rsi], r13
mov al, 1
jmp 0x140104c33
cmp qword [rsp + 0x30], r13
je 0x140104b6a
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x30], r13
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ebx, eax
mov byte [0x140189805], r13b
test ebx, ebx
je 0x140104c31
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x483
je 0x140104c31
cmp byte [rbp + 0x2000], r13b
jne 0x140104b4a
mov r8, qword [rbp - 0x78]
lea rdi, [0x140000000]
test r8, r8
je 0x140104bd8
movsxd rdx, dword [0x1401faf90]
mov rax, qword [rsp + 0x58]
mov qword [rdi + rdx*8 + 0x1fae90], r8
mov qword [rdi + rdx*8 + 0x1faf10], rax
inc edx
and edx, 0x8000000f
jge 0x140104bd0
dec edx
or edx, 0xfffffff0
inc edx
mov dword [0x1401faf90], edx
jmp 0x140104c20
mov rbx, r13
mov rax, qword [rsp + 0x58]
cmp qword [rbx + rdi + 0x1faf10], rax
jne 0x140104c13
mov rcx, qword [rbx + rdi + 0x1fae90]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140104c0f
mov r8, qword [rbx + rdi + 0x1fae90]
mov qword [rbp - 0x78], r8
jmp 0x140104c13
mov r8, qword [rbp - 0x78]
add rbx, 8
cmp rbx, 0x80
jl 0x140104bdb
test rsi, rsi
je 0x140104b4a
mov qword [rsi], r8
jmp 0x140104b4a
xor al, al
mov rcx, qword [rbp + 0x1f90]
xor rcx, rsp
call fcn.140117fa0
add rsp, 0x20a0
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x14010512c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
lea rcx, [0x140189830]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14010517b
mov ecx, 0x2bc
call fcn.1400a493c
mov ecx, 0x2bd
mov rbx, rax
call fcn.1400a493c
mov rcx, qword [0x1401897d0]
mov r9d, 0x40
mov r8, rbx
mov rdx, rax
add rsp, 0x20
pop rbx
jmp fcn.1400e7c84
xor r8d, r8d
lea rdx, [0x140189830]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140103a4c
Function at 0x1401087c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
movsxd r13, dword [rdx + 0x1c]
lea r11, [0x140000000]
mov r14, qword [rdx]
xor r9d, r9d
mov rbx, qword [rdx + 8]
or esi, 0xffffffff
mov dword [0x14020a08c], r9d
mov r12d, 0x23d
mov dword [0x14020a9a4], r12d
mov r15, rdx
mov rbp, rcx
mov edi, r9d
lea r10d, [rsi + 2]
mov edx, r9d
test r13d, r13d
jle 0x140108867
mov ecx, r9d
cmp word [r14 + rcx*4], r9w
je 0x14010884d
add edi, r10d
mov esi, edx
movsxd rax, edi
mov dword [0x14020a08c], edi
mov dword [r11 + rax*4 + 0x20a0b0], edx
cmp rcx, r12
jae 0x140108a61
mov byte [rcx + r11 + 0x20a9b0], r9b
jmp 0x140108853
mov word [r14 + rcx*4 + 2], r9w
add edx, r10d
add rcx, r10
cmp rcx, r13
jl 0x14010881d
cmp edi, 2
jge 0x140108915
mov r9d, dword [0x14020af68]
mov r8d, dword [0x14020afe8]
movsxd r11, esi
cmp esi, 2
lea rdx, [r11 + 1]
lea ecx, [rsi + 1]
mov rax, rdx
cmovge rax, r11
lea r15, [0x140000000]
mov r10d, ecx
mov r11, rax
cmovge r10d, esi
mov eax, 0
inc edi
cmp esi, 2
mov dword [0x14020a08c], edi
cmovge ecx, eax
movsxd rax, edi
mov dword [r15 + rax*4 + 0x20a0b0], ecx
mov eax, 0
mov r15, qword [rsp + 0x68]
cmovge rdx, rax
lea ecx, [rax + 1]
mov word [r14 + rdx*4], cx
cmp rdx, r12
jae 0x140108a61
dec r9d
lea rcx, [0x140000000]
mov byte [rdx + rcx + 0x20a9b0], al
mov dword [0x14020af68], r9d
test rbx, rbx
je 0x140108903
movzx eax, word [rbx + rdx*4 + 2]
sub r8d, eax
mov dword [0x14020afe8], r8d
mov esi, r10d
cmp edi, 2
jl 0x140108878
mov r10d, 1
mov eax, edi
mov dword [r15 + 0x24], esi
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
cmp eax, r10d
jl 0x140108943
mov r8d, ebx
mov rdx, r14
mov rcx, rbp
call fcn.140109c4c
mov r10d, 1
sub ebx, r10d
cmp ebx, r10d
jge 0x140108927
lea r15, [0x140000000]
movsxd rbx, dword [0x14020a0b4]
mov r8d, r10d
movsxd rax, edi
mov rdx, r14
sub edi, r10d
mov dword [0x14020a08c], edi
mov ecx, dword [r15 + rax*4 + 0x20a0b0]
mov dword [0x14020a0b4], ecx
mov rcx, rbp
call fcn.140109c4c
movsxd rcx, dword [0x14020a0b4]
lea eax, [r12 - 1]
movsxd rdx, eax
mov r9, rcx
dec eax
mov qword [rsp + 0x78], rdx
mov r12d, eax
mov r10d, 1
movzx eax, word [r14 + rcx*4]
mov r8d, r10d
add ax, word [r14 + rbx*4]
mov dword [r15 + rdx*4 + 0x20a0b0], ebx
mov dword [r15 + rdx*4 + 0x20a0ac], ecx
movzx ecx, byte [rbx + r15 + 0x20a9b0]
movsxd rdx, r13d
mov word [r14 + rdx*4], ax
movzx eax, byte [r9 + r15 + 0x20a9b0]
cmp cl, al
mov word [r14 + r9*4 + 2], r13w
mov word [r14 + rbx*4 + 2], r13w
cmovbe ecx, eax
mov eax, r13d
add cl, r10b
mov dword [0x14020a0b4], eax
mov byte [rdx + r15 + 0x20a9b0], cl
add r13d, r10d
mov rdx, r14
mov rcx, rbp
call fcn.140109c4c
mov r10d, 1
cmp edi, 2
jge 0x14010894a
mov rcx, qword [rsp + 0x78]
mov eax, r12d
mov rdx, qword [rsp + 0x68]
dec eax
mov dword [0x14020a9a4], eax
mov eax, dword [0x14020a0b4]
mov dword [r15 + rcx*4 + 0x20a0a8], eax
mov rcx, rbp
call fcn.1401098e8
mov r8d, esi
mov rdx, r14
mov rcx, rbp
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
jmp fcn.140109b28
call fcn.140117c94
int3
Function at 0x14010be94
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2fd0]
mov eax, 0x30d0
call fcn.140117f40
sub rsp, rax
mov rax, qword [0x140181c48]
xor rax, rsp
mov qword [rbp + 0x2fc0], rax
mov rsi, r8
mov rdi, rdx
mov r12, rcx
mov rax, rdx
mov r9, r8
sub r9, rdx
movzx edx, word [rax]
movzx r8d, word [rax + r9]
sub edx, r8d
jne 0x14010bef2
add rax, 2
test r8d, r8d
jne 0x14010bedc
test edx, edx
je 0x14010c0f7
xor r14b, r14b
lea rdx, [rbp + 0x1fc0]
mov ecx, 0x800
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
movzx ecx, word [rbp + 0x1fc0]
call fcn.1401251e8
mov r15d, eax
mov r13d, 1
cmp word [rbp + 0x1fc0], 0x5c
je 0x14010bf68
cmp word [rsi], 0x5c
je 0x14010bf68
cmp word [rdi], 0x5c
je 0x14010bf68
movzx ecx, word [rsi]
call fcn.1401251e8
mov ebx, eax
movzx ecx, word [rdi]
call fcn.1401251e8
cmp word [rsi + 2], 0x3a
cmovne ebx, r15d
cmp word [rdi + 2], 0x3a
cmovne eax, r15d
movzx r14d, r14b
cmp ebx, eax
cmovne r14d, r13d
mov rcx, rdi
call fcn.140083dd0
test al, al
je 0x14010bfbe
lea rcx, [rsp + 0x20]
call fcn.1400824e4
nop
mov r8d, 9
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.140082b10
test al, al
je 0x14010c01b
lea rcx, [rsp + 0x20]
call fcn.1400825f0
test al, al
je 0x14010c01b
mov rcx, rdi
call fcn.140083adc
test al, al
je 0x14010c01b
lea rcx, [rsp + 0x20]
call fcn.14008252c
test r14b, r14b
jne 0x14010bfd6
mov rdx, rdi
mov rcx, rsi
call fcn.14008449c
test al, al
jne 0x14010c0f7
lea rcx, [rsp + 0x20]
call fcn.1400824e4
nop
lea rcx, [rbp + 0xf70]
call fcn.1400824e4
nop
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x20]
call fcn.140082b10
test al, al
jne 0x14010c02f
mov rdx, rsi
lea rcx, [0x1401c97d8]
call fcn.14007ca64
mov ebx, 0xa
jmp 0x14010c0bc
lea rcx, [rsp + 0x20]
call fcn.14008252c
mov eax, 0xf
jmp 0x14010c0f9
mov r8d, 0x12
mov rdx, rdi
lea rcx, [rbp + 0xf70]
call fcn.1400827a0
test al, al
jne 0x14010c04f
mov ebx, 0xf
jmp 0x14010c0bc
xor edx, edx
lea rcx, [0x1401c97d8]
call fcn.14007cb8c
or r9, 0xffffffffffffffff
lea r8, [rbp + 0xf70]
lea rdx, [rsp + 0x20]
mov rcx, r12
call fcn.14010b948
mov r14d, eax
lea rcx, [rsp + 0x20]
call fcn.1400825f0
lea rcx, [rbp + 0xf70]
call fcn.1400825f0
mov dl, r13b
lea rcx, [0x1401c97d8]
call fcn.14007cb8c
test r14d, r14d
je 0x14010c0d7
mov rcx, rdi
call fcn.140083adc
mov eax, 0xe
lea ebx, [rax - 4]
cmp r14d, ebx
cmove r14d, eax
mov ebx, r14d
lea rcx, [rbp + 0xf70]
call fcn.14008252c
nop
lea rcx, [rsp + 0x20]
call fcn.14008252c
mov eax, ebx
jmp 0x14010c0f9
mov rcx, rsi
call fcn.140083adc
nop
lea rcx, [rbp + 0xf70]
call fcn.14008252c
nop
lea rcx, [rsp + 0x20]
call fcn.14008252c
xor eax, eax
mov rcx, qword [rbp + 0x2fc0]
xor rcx, rsp
call fcn.140117fa0
mov rbx, qword [rsp + 0x3110]
add rsp, 0x30d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x14010c778
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
lea rsi, [0x14022b020]
mov rcx, rsi
mov rdi, rdx
call fcn.1400787b4
mov r8d, 0x12345678
mov r9d, 0x23456789
mov dword [rbx + 0x1e8], r8d
mov edx, 0x34567890
mov dword [rbx + 0x1ec], r9d
jmp 0x14010c809
movsx rcx, al
mov eax, r8d
xor rcx, rax
shr r8d, 8
movzx eax, cl
xor r8d, dword [rsi + rax*4]
movzx eax, r8b
add eax, r9d
mov dword [rbx + 0x1e8], r8d
imul r9d, eax, 0x8088405
mov eax, edx
shr edx, 8
inc r9d
mov ecx, r9d
mov dword [rbx + 0x1ec], r9d
shr rcx, 0x18
xor rcx, rax
movzx eax, cl
xor edx, dword [rsi + rax*4]
inc rdi
mov dword [rbx + 0x1f0], edx
mov al, byte [rdi]
test al, al
jne 0x14010c7bd
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x14010c828
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

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 r15
sub rsp, 0x30
cmp byte [0x1401a9d48], 0
mov rdi, r9
mov rsi, r8
mov rbp, rdx
mov rbx, rcx
je 0x14010c90a
cmp byte [rcx + 4], 0
je 0x14010c875
mov r8d, edi
add rcx, 8
imul r8d, esi
call fcn.1400d3974
jmp 0x14010c90a
mov r10, rsi
mov r11, rbp
imul r10, rdi
test r10, r10
je 0x14010c90a
lea r15, [0x14022b020]
movsx rax, byte [r11]
mov r8d, dword [rbx + 0x1f0]
mov r9d, r8d
mov edx, dword [rbx + 0x1e8]
and r9d, 0xfffd
xor rax, rdx
or r9d, 2
movzx ecx, al
shr edx, 8
xor edx, dword [r15 + rcx*4]
movzx eax, dl
add eax, dword [rbx + 0x1ec]
imul eax, eax, 0x8088405
mov dword [rbx + 0x1e8], edx
inc eax
mov dword [rbx + 0x1ec], eax
shr rax, 0x18
xor rax, r8
shr r8d, 8
movzx eax, al
xor r8d, dword [r15 + rax*4]
mov eax, r9d
xor eax, 1
mov dword [rbx + 0x1f0], r8d
imul eax, r9d
shr eax, 8
xor byte [r11], al
inc r11
sub r10, 1
jne 0x14010c88f
and dword [rsp + 0x20], 0
mov r9, rdi
mov r8, rsi
mov rdx, rbp
mov rcx, rbx
call fcn.14010b4bc
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r15
ret

Function at 0x140114cb0
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rbx, rdx
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140114ced
test al, 0x10
jne 0x140114ce9
and eax, 0xffffffdf
mov rcx, rbx
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x140114ced
mov al, 1
jmp 0x140114d05
lea rdx, [rdi + 0x64bb20]
mov ecx, 0x11
lea r8, [rsp + 0x38]
call fcn.140018c90
xor al, al
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140116164
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x1401161dc
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x1401161dc
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x1401161dc
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x1401161d0
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x1401161ee
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x1401161be
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x1401161de

Function at 0x140118cb4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140118cfe
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140118cfe
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140118cfe
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140118cfe
cmp dword [rcx + 0x84], 0xe
jbe 0x140118cfe
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140118d00
xor al, al
add rsp, 0x28
ret
Function at 0x140126afc
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x14022c380]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x140126b5a
cmp word [rdx], r12w
jne 0x140126b5a
or byte [rax + r8*8 + 0x38], cl
jmp 0x140126b60
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140126cbb
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x140126c96
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140126b99
mov rcx, r9
jmp 0x140126bbc
cmp r9, rdx
jae 0x140126bd3
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140126b7d
jmp 0x140126cbb
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140126c90
cmp dword [rsp + 0x80], edi
je 0x140126c90
mov rdx, r14
lea r11, [0x14022c380]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x140126c69
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140126c3c
mov word [rbx], r12w
jmp 0x140126cb7
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x140126c45
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x140126cb7
cmp word [rsp + 0x70], r12w
jne 0x140126c76
cmp rbx, rsi
je 0x140126c36
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.140126a58
cmp word [rsp + 0x70], r12w
je 0x140126cbb
mov word [rbx], r13w
jmp 0x140126cb7
lea r11, [0x14022c380]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140126cb3
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140126cbb
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14012fa2c
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.140126a58
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140126a58
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14012fb7c
cmp rax, 0xffffffffffffffff
je 0x14012fb7c
xor edi, edi
test rbp, rbp
jle 0x14012fb27
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14012ec90
mov rbx, rax
test rax, rax
jne 0x14012fab4
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14012fb1d
mov edx, 0x8000
mov ecx, r14d
call fcn.1401292e4
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.140127eec
cmp eax, 0xffffffff
je 0x14012fafd
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14012fac4
mov edx, r15d
mov ecx, r14d
call fcn.1401292e4
jmp 0x14012fb1d
cmp byte [rsi + 0x38], dil
je 0x14012fb14
cmp dword [rsi + 0x34], 5
jne 0x14012fb14
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14012fb1d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14012cae4
jmp 0x14012fb90
jns 0x14012fb90
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140126a58
cmp rax, 0xffffffffffffffff
jne 0x14012fb48
cmp byte [rsi + 0x30], dil
je 0x14012fb90
mov edi, dword [rsi + 0x2c]
jmp 0x14012fb90
mov ecx, r14d
call fcn.14012f91c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14012fb90
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 0x14012fb90
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14012fb89
mov eax, dword [rsi + 0x2c]
jmp 0x14012fb8e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140126a58
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 0x14012fef4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x14012ff26
call fcn.1401286fc
mov dword [rax], 0x16
call fcn.14011f068
jmp 0x140130045
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140130045
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x140130045
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x14012ff55
lock or dword [rcx + 0x14], 0x10
jmp 0x140130045
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14012ff69
call fcn.140134f74
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14012924c
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.140126fa8
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x140130033
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x14012fffe
mov rcx, rsi
call fcn.14012924c
cmp eax, edi
je 0x14012ffe9
mov rcx, rsi
call fcn.14012924c
cmp eax, 0xfffffffe
je 0x14012ffe9
mov rcx, rsi
call fcn.14012924c
movsxd rbx, eax
lea r14, [0x14022c380]
mov rcx, rsi
sar rbx, 6
call fcn.14012924c
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x14012fff0
lea rdx, [0x140182040]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x14012fffe
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x140130022
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x140130022
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x140130022
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140130048
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x140130304
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140117f40
sub rsp, rax
mov rax, qword [0x140181c48]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14012924c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140130353
mov rax, rbp
jmp 0x14013045b
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x22c380]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140126a50
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x22c380]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140130457
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140130457
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140126a50
test rax, rax
js 0x140130457
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140130457
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140130449
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140130449
cmp byte [rcx], 0xd
jne 0x14013042f
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14013043e
cmp byte [rcx + 1], 0xa
jne 0x14013043e
inc rcx
jmp 0x14013043e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x181cb0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140130411
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14013045b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140117fa0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140132678
Capabilities:
Query environment variable

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, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1401326a8
xor eax, eax
jmp 0x14013276b
mov rbp, rbx
cmp word [rax], si
je 0x1401326cd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1401326b4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1401326b0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14012fc20
movsxd r14, eax
test eax, eax
jne 0x14013270b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1401326a1
mov rcx, r14
call fcn.14012cb20
mov rdi, rax
test rax, rax
jne 0x140132724
xor ecx, ecx
call fcn.14012cae4
jmp 0x140132700
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14012fc20
test eax, eax
jne 0x140132755
mov rcx, rdi
call fcn.14012cae4
jmp 0x14013275f
xor ecx, ecx
call fcn.14012cae4
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret