joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004f40
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r13
push r14
push r15
mov r14d, dword [rsp + 0x48]
lea rax, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
test r14b, 0x10
lea rbx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov esi, r9d
mov r11d, edx
cmove rbx, rax
mov r10, rcx
mov r12, r8
mov r15, r8
test edx, edx
jle 0x140005031
lea eax, [r9 - 4]
mov r13d, 0x3d3d
movsxd rdi, eax
nop dword [rax + rax]
mov rdx, r8
sub rdx, r15
cmp r11d, 3
jae 0x1400050a8
mov r9d, r14d
and r9d, 0x20
cmp r11d, 2
jne 0x140005058
test r9d, r9d
je 0x140004fd1
lea eax, [rsi - 3]
movsxd rcx, eax
cmp rdx, rcx
jmp 0x140004fd4
cmp rdx, rdi
jge 0x140005124
movzx eax, byte [r10 + 1]
movzx ecx, byte [r10]
add r10, 2
shl rcx, 8
or rcx, rax
shl rcx, 2
mov rax, rcx
shr rax, 0xc
movzx eax, byte [rax + rbx]
mov byte [r8], al
mov rax, rcx
shr rax, 6
and ecx, 0x3f
and eax, 0x3f
movzx eax, byte [rax + rbx]
mov byte [r8 + 1], al
movzx eax, byte [rcx + rbx]
mov byte [r8 + 2], al
add r8, 3
test r9d, r9d
jne 0x140005112
mov byte [r8], 0x3d
inc r8
mov byte [r8], 0
sub r8, r12
mov rax, r8
mov rbx, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
pop r15
pop r14
pop r13
pop r12
ret
test r9d, r9d
je 0x140005068
lea eax, [rsi - 2]
movsxd rcx, eax
cmp rdx, rcx
jmp 0x14000506b
cmp rdx, rdi
jge 0x140005124
movzx ecx, byte [r10]
inc r10
shl rcx, 4
mov rax, rcx
and ecx, 0x3f
shr rax, 6
movzx eax, byte [rax + rbx]
mov byte [r8], al
movzx eax, byte [rcx + rbx]
mov byte [r8 + 1], al
add r8, 2
test r9d, r9d
jne 0x140005112
mov word [r8], r13w
add r8, 2
jmp 0x140005112
cmp rdx, rdi
jge 0x140005124
movzx eax, byte [r10 + 1]
movzx ecx, byte [r10 + 2]
movzx r9d, byte [r10]
add r10, 3
shl r9, 8
or r9, rax
shl r9, 8
or r9, rcx
mov rax, r9
shr rax, 6
and eax, 0x3f
movsx edx, byte [rax + rbx]
mov rax, r9
and eax, 0x3f
movsx ecx, byte [rax + rbx]
mov rax, r9
shr rax, 0xc
and eax, 0x3f
shl ecx, 8
or edx, ecx
shr r9, 0x12
shl edx, 8
movsx eax, byte [rax + rbx]
or edx, eax
movsx eax, byte [r9 + rbx]
shl edx, 8
or edx, eax
mov dword [r8], edx
add r8, 4
sub r11d, 3
test r11d, r11d
jg 0x140004fa0
jmp 0x140005031
xor eax, eax
jmp 0x14000503b
Function at 0x14000512c
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
mov ecx, dword [0x140257778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x1400051ad
mov r8, qword [0x140257770]
lea edx, [rax + 8]
mov rcx, qword [0x140257138]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140257778]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140257768]
jmp 0x140005199
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140005196
mov rcx, qword [rbx + 0x10]
add rcx, rdi
call rdx
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140005184
mov rdx, rdi
lea rcx, [0x1400052c8]
call fcn.140014088
mov rbx, qword [rsp + 0x30]
lea rax, [rdi + rsi]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x1400051c4
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbp, r8
mov rsi, rdx
and ecx, 7
je 0x1400051ee
mov eax, 8
sub eax, ecx
add edi, eax
mov rbx, qword [0x140257770]
test rbx, rbx
jne 0x140005234
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x140257138]
lea edx, [rbx + 8]
movsxd rdi, edi
mov r8, rdi
mov dword [0x140257778], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140257778]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140257770]
jmp 0x140005237
movsxd rdi, edi
mov ecx, dword [0x140257778]
lea rax, [rdi + rbx]
mov qword [0x140257770], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140257770]
mov edx, 8
mov rcx, qword [0x140257138]
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140257778]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rsi, rsi
jne 0x140005286
test rbp, rbp
je 0x1400052ad
mov edx, 0x28
lea rcx, [0x140257768]
call fcn.14000760c
mov qword [rax], rbx
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rbp
test rsi, rsi
je 0x1400052ad
lea rcx, [rdi + rbx]
call rsi
mov rbp, qword [rsp + 0x38]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140005920
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov r14, rcx
movsxd rbx, edx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [0x140257790]
xor edx, edx
mov rsi, rax
mov rax, qword [r14]
mov r8d, dword [rsi + 0x10]
sub r8d, ebx
movsxd rdi, r8d
lea r9, [rdi + 0xa]
test rax, rax
jne 0x140005974
mov r8, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x14000597d
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [r14], rax
mov rcx, rax
mov rdx, qword [rsi]
shr rdi, 1
add rdx, rbx
mov r8d, edi
call fcn.140006ec0
mov rdi, qword [rsp + 0x40]
mov qword [rsi + 0x10], rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret

Function at 0x1400059f0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140255054]
cmp ecx, 0xffffffff
jne 0x140005a06
call fcn.140005bf0
jmp 0x140005a16
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140005a35
call fcn.140014970
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x1400059b0]
add rsp, 0x28
jmp fcn.140014088
add rsp, 0x28
ret

Function at 0x140005bf0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
sub rsp, 0x28
xor r8d, r8d
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x140257790], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140255054], eax
add rsp, 0x28
jmp fcn.140014970

Function at 0x140005c50
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rax, qword [rax]
add rsp, 0x28
ret

Function at 0x140005c90
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140255054]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rbx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140005cd0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add qword [rax + 0x10], 2
add rsp, 0x28
ret

Function at 0x140005cf0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rax + 0x10], rbx
mov rax, qword [rax]
add rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x1400065c0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
movsxd rbp, ecx
mov esi, edx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
cmp esi, 0xffffffff
jne 0x1400065f0
mov esi, dword [rax + 0x10]
mov eax, dword [rax + 0x10]
mov r8, qword [rbx + 8]
lea edx, [rax + rbp*2]
movsxd rax, edx
lea rcx, [r8 - 4]
cmp rax, rcx
jl 0x140006611
lea eax, [rdx + 0x4000]
movsxd r9, eax
jmp 0x140006623
mov eax, 0x100000
cmp r8, rax
jle 0x140006640
cmp edx, eax
cmovl edx, eax
mov r9d, edx
mov r8, qword [rbx]
xor edx, edx
mov qword [rbx + 8], r9
add r9, 0xa
mov rcx, qword [0x140257790]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rbx], rax
mov rax, qword [rbx]
movsxd rdx, esi
mov rsi, qword [rsp + 0x40]
add rax, rdx
lea rcx, [rdx + rbp*2]
mov rbp, qword [rsp + 0x38]
mov qword [rbx + 0x10], rcx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140006670
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [rax]
cmp rbx, rcx
jb 0x1400066a4
mov rdx, qword [rax + 0x10]
add rdx, rcx
cmp rbx, rdx
ja 0x1400066a4
sub ebx, ecx
lea eax, [rbx + 1]
add rsp, 0x20
pop rbx
ret
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x1400066b0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [rbx + rbx]
movsxd rdx, ecx
sub qword [rax + 0x10], rdx
add rsp, 0x20
pop rbx
ret

Function at 0x140006780
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rbx, qword [rax]
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x1400067b0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
mov qword [rax + 0x10], rbx
mov rax, qword [rax]
mov word [rbx + rax], dx
add rsp, 0x20
pop rbx
ret

Function at 0x140006e90
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140255054]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
dec rbx
mov rax, qword [rax]
add rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x140012b4c
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
xor edi, edi
mov r13, r8
cmp dword [rcx + 0x20], 1
mov rbx, rdx
mov r15, rcx
mov r12d, edi
jne 0x140012d01
test rdx, rdx
je 0x140012d01
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 7]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140012d01
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x140257138]
xor edx, edx
mov eax, eax
mov r8d, 0x200000
mov qword [rsp + 0xc8], rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x140012cf8
call fcn.14001eb40
mov rsi, rax
test rax, rax
je 0x140012ce6
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.14002de98
mov edx, 0x1a4
mov rcx, rsi
call fcn.14001f080
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.14002f3b0
mov rax, qword [r15 + 0x48]
mov ecx, dword [rax + 0x10]
dec ecx
test ecx, 0xfffffffd
je 0x140012c44
mov rdx, r13
mov rcx, rsi
call fcn.14001f070
jmp 0x140012c62
mov rcx, r13
call fcn.140013320
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call fcn.14001f060
mov rcx, rbx
call fcn.140013400
mov rbx, qword [rsp + 0xc8]
mov rcx, rsi
mov rdx, rbx
call fcn.14001f0c0
mov edx, 0x8000
mov rcx, rsi
call fcn.14001ef80
mov rcx, qword [r15]
mov rdx, rsi
call fcn.14002ef70
jmp 0x140012cad
mov rcx, qword [r15]
mov rdx, r14
movsxd r8, eax
call fcn.14002ef80
movsxd rcx, dword [rsp + 0xb0]
cmp rax, rcx
jne 0x140012cd7
add r12, rcx
lea r9, [rsp + 0xb0]
mov qword [rsp + 0x20], rdi
mov r8d, 0x200000
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0xb0]
test eax, eax
jg 0x140012c8f
mov rcx, rsi
call fcn.14001ea70
cmp r12, rbx
sete dil
mov rcx, qword [0x140257138]
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0xb8]
mov rax, rdi
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400135b0
Capabilities:
Read 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, 0x30
xor ebp, ebp
mov rdi, r8
mov r15, rdx
mov r14, rcx
cmp dword [rcx + 0x1c], ebp
jne 0x1400135e7
call fcn.1400044a0
mov dword [r14 + 0x1c], 1
mov dword [r14 + 0x14], ebp
movsxd r12, dword [r14 + 0x14]
mov eax, dword [r14 + 0x18]
mov rbx, r12
sub eax, r12d
movsxd rdx, eax
add rdx, qword [r14 + 8]
cmp r12, rdi
jl 0x140013660
mov rax, rdi
sub rax, 1
je 0x140013651
sub rax, 1
je 0x14001363e
cmp rax, 2
je 0x14001362d
mov r8, rdi
mov rcx, r15
call fcn.140006810
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x1400136da
mov eax, dword [rdx]
mov dword [r15], eax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x1400136da
movzx eax, word [rdx]
mov word [r15], ax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x1400136da
movzx eax, byte [rdx]
mov byte [r15], al
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x1400136da
mov r8, rbx
mov rcx, r15
call fcn.140006810
movsxd r8, dword [r14 + 0x10]
lea r9, [rsp + 0x60]
mov rcx, qword [r14]
add r15, rbx
sub rdi, rbx
mov qword [rsp + 0x20], rbp
cmp rdi, r8
jl 0x1400136a0
mov r8d, edi
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x60]
add eax, r12d
mov dword [r14 + 0x14], ebp
jmp 0x1400136d8
mov rdx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x60]
mov rcx, r15
mov rdx, qword [r14 + 8]
cmp rdi, rax
mov rbx, rax
mov dword [r14 + 0x14], eax
cmovle rbx, rdi
mov dword [r14 + 0x18], eax
mov r8, rbx
call fcn.140006810
sub dword [r14 + 0x14], ebx
lea eax, [rbx + r12]
cdqe
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x140013890
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, r8
mov r12d, edx
mov r14, rcx
mov r15d, 0x1000
mov rcx, qword [0x140257138]
mov r8d, r15d
xor edx, edx
mov r13, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140013a6b
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rdi
cmp rsi, 0xffffffffffffffff
je 0x1400138f7
test rsi, rsi
je 0x1400139c0
dec rsi
cmp qword [r14 + 8], 0
lea rdi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x14001391b
mov r8d, 1
mov rcx, r14
call fcn.1400135b0
mov dword [rsp + 0x34], eax
jmp 0x14001393c
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx r8d, byte [rsp + 0x30]
cmp eax, 1
jne 0x1400139c4
test r8b, r8b
je 0x140013958
mov byte [rbx], r8b
inc rbx
movzx r8d, byte [rsp + 0x30]
mov rdx, rbx
lea eax, [r15 - 1]
sub rdx, rbp
movsxd rcx, eax
cmp rdx, rcx
jle 0x14001399a
mov rcx, qword [0x140257138]
add r15d, 0x1000
movsxd r9, r15d
mov r8, rbp
mov edx, 8
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
mov rbp, rax
movsxd rbx, ebx
add rbx, rax
test r8b, r8b
je 0x1400139c4
test r12d, r12d
jne 0x1400138e5
cmp r8b, 0xd
je 0x1400139cd
cmp r8b, 0xa
jne 0x1400138e5
dec rbx
jmp 0x140013a51
lea rdi, [r14 + 8]
test r12d, r12d
jne 0x140013a51
cmp r8b, 0xa
jne 0x1400139d8
dec rbx
jmp 0x140013a51
cmp r8b, 0xd
jne 0x140013a51
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi], 0
je 0x140013a00
mov r8d, 1
mov rcx, r14
call fcn.1400135b0
mov dword [rsp + 0x34], eax
jmp 0x140013a1d
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x140013a51
cmp qword [rdi], 0
je 0x140013a30
inc dword [r14 + 0x14]
jmp 0x140013a51
mov rcx, qword [r14]
lea r8, [rsp + 0x3c]
mov r9d, 1
mov qword [rsp + 0x38], 0xffffffffffffffff
lea edx, [r9 - 2]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdi, qword [rsp + 0x78]
mov rax, rbx
sub rax, rbp
mov qword [r13], rax
mov rax, rbp
mov byte [rbx], 0
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rsi
ret
Function at 0x140013a90
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rbp, r8
mov r12d, edx
mov r14, rcx
xor edx, edx
mov rcx, qword [0x140257138]
mov r8d, 0x1000
xor edi, edi
mov r13d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x140013c88
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rsi
nop dword [rax + rax]
cmp rbp, 0xffffffffffffffff
je 0x140013b02
test rbp, rbp
je 0x140013bc8
dec rbp
cmp qword [r14 + 8], 0
lea rsi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x140013b26
mov r8d, 2
mov rcx, r14
call fcn.1400135b0
mov dword [rsp + 0x34], eax
jmp 0x140013b43
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
mov r8d, 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx edx, word [rsp + 0x30]
cmp eax, 2
jne 0x140013bcc
test dx, dx
je 0x140013b5e
mov word [rbx], dx
add rbx, 2
movzx edx, word [rsp + 0x30]
mov rdi, rbx
lea eax, [r13 - 1]
sub rdi, r15
movsxd rcx, eax
sar rdi, 1
cmp rdi, rcx
jle 0x140013ba4
mov rcx, qword [0x140257138]
add r13d, 0x800
movsxd r9, r13d
mov r8, r15
add r9, r9
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx edx, word [rsp + 0x30]
mov r15, rax
movsxd rax, edi
lea rbx, [r15 + rax*2]
test dx, dx
je 0x140013bcc
mov edi, 0
test r12d, r12d
jne 0x140013af0
cmp dx, 0xd
je 0x140013bd1
cmp dx, 0xa
je 0x140013bd7
jmp 0x140013af0
lea rsi, [r14 + 8]
test r12d, r12d
jne 0x140013bdb
cmp dx, 0xa
jne 0x140013c06
sub rbx, 2
xor edi, edi
mov rcx, qword [rsp + 0x88]
mov rax, rbx
mov rsi, qword [rsp + 0x78]
sub rax, r15
sar rax, 1
mov qword [rcx], rax
mov rax, r15
mov word [rbx], di
mov rbx, qword [rsp + 0x70]
jmp 0x140013c8b
cmp dx, 0xd
jne 0x140013bdb
sub rbx, 2
lea rdx, [rsp + 0x30]
cmp qword [rsi], 0
je 0x140013c31
mov r8d, 2
mov rcx, r14
call fcn.1400135b0
mov dword [rsp + 0x34], eax
xor edi, edi
jmp 0x140013c4a
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r8d, [rdi + 2]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x30], 0xa
je 0x140013bdd
cmp qword [rsi], 0
je 0x140013c62
add dword [r14 + 0x14], 2
jmp 0x140013bdd
mov rcx, qword [r14]
lea r8, [rsp + 0x3c]
mov r9d, 1
mov qword [rsp + 0x38], 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140013bdd
mov rax, rdi
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140013cb0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x40
mov rdi, r8
mov r15d, edx
mov rsi, rcx
mov r14d, 0x1000
mov rcx, qword [0x140257138]
mov r8d, r14d
xor edx, edx
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140013e4a
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x140013d19
test rdi, rdi
je 0x140013da7
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.140033ab0
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140013d31
xor r8b, r8b
jmp 0x140013d35
movzx r8d, byte [rbx]
cdqe
add rbx, rax
mov byte [rsp + 0x30], r8b
mov rdx, rbx
lea eax, [r14 - 5]
sub rdx, rbp
movsxd rcx, eax
cmp rdx, rcx
jle 0x140013d81
mov rcx, qword [0x140257138]
add r14d, 0x1000
movsxd r9, r14d
mov r8, rbp
mov edx, 8
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
mov rbp, rax
movsxd rbx, ebx
add rbx, rax
test r8b, r8b
je 0x140013da7
test r15d, r15d
jne 0x140013d07
cmp r8b, 0xd
je 0x140013db0
cmp r8b, 0xa
jne 0x140013d07
dec rbx
jmp 0x140013e35
test r15d, r15d
jne 0x140013e35
cmp r8b, 0xa
jne 0x140013dbb
dec rbx
jmp 0x140013e35
cmp r8b, 0xd
jne 0x140013e35
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rsi + 8], 0
je 0x140013de4
mov r8d, 1
mov rcx, rsi
call fcn.1400135b0
mov dword [rsp + 0x34], eax
jmp 0x140013e01
mov rcx, qword [rsi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x140013e35
cmp qword [rsi + 8], 0
je 0x140013e14
inc dword [rsi + 0x14]
jmp 0x140013e35
mov rcx, qword [rsi]
lea r8, [rsp + 0x3c]
mov r9d, 1
mov qword [rsp + 0x38], 0xffffffffffffffff
lea edx, [r9 - 2]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r12], rax
mov rax, rbp
mov byte [rbx], 0
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r12
ret
Function at 0x140013e70
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push r14
sub rsp, 0x38
xor ebp, ebp
movsxd rbx, r8d
mov r14, rdx
mov rsi, rcx
mov dword [rsp + 0x60], ebp
cmp dword [rcx + 0x24], ebp
jne 0x140013f6a
cmp dword [rcx + 0x1c], 1
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], r15
jne 0x140013ecb
mov eax, dword [rcx + 0x14]
lea r9d, [rbp + 1]
mov rcx, qword [rcx]
lea r8, [rsp + 0x7c]
neg eax
cdqe
mov edx, eax
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x14], eax
mov dword [rsi + 0x1c], ebp
mov ecx, dword [rsi + 0x14]
cmp ecx, ebx
jle 0x140013f2c
mov eax, dword [rsi + 0x10]
mov edx, ebx
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rsi + 8]
sub edx, 1
je 0x140013f24
sub edx, 1
je 0x140013f1b
cmp edx, 2
je 0x140013f14
mov r8, rbx
mov rdx, r14
call fcn.140006810
sub dword [rsi + 0x14], ebx
mov rax, rbx
mov rdi, qword [rsp + 0x68]
mov r15, qword [rsp + 0x30]
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [r14]
mov dword [rcx], eax
jmp 0x140013efa
movzx eax, word [r14]
mov word [rcx], ax
jmp 0x140013efa
movzx eax, byte [r14]
mov byte [rcx], al
jmp 0x140013efa
mov rcx, rsi
call fcn.1400044a0
mov eax, dword [rsi + 0x10]
mov rdx, r14
cmp ebx, eax
jl 0x140013f5b
mov rcx, qword [rsi]
lea r9, [rsp + 0x60]
mov r8d, ebx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x60]
jmp 0x140013f00
sub eax, dword [rsi + 0x14]
mov r8, rbx
movsxd rcx, eax
add rcx, qword [rsi + 8]
jmp 0x140013ef5
movsxd rax, ebp
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret

Function at 0x140013f80
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x30
xor esi, esi
mov rbx, rcx
mov dword [rsp + 0x48], esi
test rdx, rdx
je 0x140014077
cmp word [rdx], si
je 0x140014077
test r8d, r8d
jne 0x140013fae
mov r8d, dword [rcx + 0x20]
cmp r8d, 0x19
jne 0x14001400e
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rdx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140013fc0
lea r8d, [rax + rax]
cmp qword [rcx + 8], rsi
je 0x140013feb
call fcn.140013e70
mov dword [rsp + 0x48], eax
cdqe
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
mov rcx, qword [rcx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
cmp r8d, 2
mov qword [rsp + 0x40], rdi
mov ecx, 0xfde9
lea r8, [rsp + 0x58]
cmovne ecx, esi
call fcn.140033be0
mov rdi, rax
test rax, rax
je 0x140014072
mov rdx, rax
mov r8d, dword [rsp + 0x58]
cmp qword [rbx + 8], rsi
je 0x14001404d
mov rcx, rbx
call fcn.140013e70
mov dword [rsp + 0x48], eax
jmp 0x140014060
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x140257138]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [rsp + 0x40]
movsxd rax, dword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret