joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400051ec
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 [0x140408838]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x14000526d
mov r8, qword [0x140408830]
lea edx, [rax + 8]
mov rcx, qword [0x1404081f8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140408838]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140408828]
jmp 0x140005259
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140005256
mov rcx, qword [rbx + 0x10]
add rcx, rdi
call rdx
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140005244
mov rdx, rdi
lea rcx, [0x140005388]
call fcn.140014148
mov rbx, qword [rsp + 0x30]
lea rax, [rdi + rsi]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140005284
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 0x1400052ae
mov eax, 8
sub eax, ecx
add edi, eax
mov rbx, qword [0x140408830]
test rbx, rbx
jne 0x1400052f4
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x1404081f8]
lea edx, [rbx + 8]
movsxd rdi, edi
mov r8, rdi
mov dword [0x140408838], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140408838]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140408830]
jmp 0x1400052f7
movsxd rdi, edi
mov ecx, dword [0x140408838]
lea rax, [rdi + rbx]
mov qword [0x140408830], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140408830]
mov edx, 8
mov rcx, qword [0x1404081f8]
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140408838]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rsi, rsi
jne 0x140005346
test rbp, rbp
je 0x14000536d
mov edx, 0x28
lea rcx, [0x140408828]
call fcn.1400076cc
mov qword [rax], rbx
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rbp
test rsi, rsi
je 0x14000536d
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 0x1400059e0
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 [0x140406114]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [0x140408850]
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 0x140005a34
mov r8, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x140005a3d
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.140006f80
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 0x140005ab0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140406114]
cmp ecx, 0xffffffff
jne 0x140005ac6
call fcn.140005cb0
jmp 0x140005ad6
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140005af5
call fcn.140014a30
mov ecx, dword [0x140406114]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140005a70]
add rsp, 0x28
jmp fcn.140014148
add rsp, 0x28
ret

Function at 0x140005cb0
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 [0x140408850], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140406114], eax
add rsp, 0x28
jmp fcn.140014a30

Function at 0x140005d10
Capabilities:
Get thread local storage value

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

Function at 0x140005d50
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 [0x140406114]
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 0x140005d90
Capabilities:
Get thread local storage value

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

Function at 0x140005db0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140406114]
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 0x1400062f0
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 [0x140406114]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
cmp esi, 0xffffffff
jne 0x140006320
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 0x140006341
lea eax, [rdx + 0x4000]
movsxd r9, eax
jmp 0x140006353
mov eax, 0x100000
cmp r8, rax
jle 0x140006370
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 [0x140408850]
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 0x1400063a0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
mov ecx, dword [0x140406114]
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 0x1400063d0
Capabilities:
Get thread local storage value

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

Function at 0x140006410
Capabilities:
Get thread local storage value

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

Function at 0x140006440
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140406114]
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 0x1400068a0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140406114]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rbx, qword [rax]
mov rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x140012c0c
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 0x140012dc1
test rdx, rdx
je 0x140012dc1
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 0x140012dc1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x1404081f8]
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 0x140012db8
call fcn.14001ec00
mov rsi, rax
test rax, rax
je 0x140012da6
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.14002df58
mov edx, 0x1a4
mov rcx, rsi
call fcn.14001f140
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.14002f470
mov rax, qword [r15 + 0x48]
mov ecx, dword [rax + 0x10]
dec ecx
test ecx, 0xfffffffd
je 0x140012d04
mov rdx, r13
mov rcx, rsi
call fcn.14001f130
jmp 0x140012d22
mov rcx, r13
call fcn.1400133e0
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call fcn.14001f120
mov rcx, rbx
call fcn.1400134c0
mov rbx, qword [rsp + 0xc8]
mov rcx, rsi
mov rdx, rbx
call fcn.14001f180
mov edx, 0x8000
mov rcx, rsi
call fcn.14001f040
mov rcx, qword [r15]
mov rdx, rsi
call fcn.14002f030
jmp 0x140012d6d
mov rcx, qword [r15]
mov rdx, r14
movsxd r8, eax
call fcn.14002f040
movsxd rcx, dword [rsp + 0xb0]
cmp rax, rcx
jne 0x140012d97
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 0x140012d4f
mov rcx, rsi
call fcn.14001eb30
cmp r12, rbx
sete dil
mov rcx, qword [0x1404081f8]
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 0x140013670
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 0x1400136a7
call fcn.140004560
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 0x140013720
mov rax, rdi
sub rax, 1
je 0x140013711
sub rax, 1
je 0x1400136fe
cmp rax, 2
je 0x1400136ed
mov r8, rdi
mov rcx, r15
call fcn.140006900
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14001379a
mov eax, dword [rdx]
mov dword [r15], eax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14001379a
movzx eax, word [rdx]
mov word [r15], ax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14001379a
movzx eax, byte [rdx]
mov byte [r15], al
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14001379a
mov r8, rbx
mov rcx, r15
call fcn.140006900
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 0x140013760
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 0x140013798
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.140006900
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 0x140013950
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 [0x1404081f8]
mov r8d, r15d
xor edx, edx
mov r13, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140013b2b
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rdi
cmp rsi, 0xffffffffffffffff
je 0x1400139b7
test rsi, rsi
je 0x140013a80
dec rsi
cmp qword [r14 + 8], 0
lea rdi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x1400139db
mov r8d, 1
mov rcx, r14
call fcn.140013670
mov dword [rsp + 0x34], eax
jmp 0x1400139fc
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 0x140013a84
test r8b, r8b
je 0x140013a18
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 0x140013a5a
mov rcx, qword [0x1404081f8]
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 0x140013a84
test r12d, r12d
jne 0x1400139a5
cmp r8b, 0xd
je 0x140013a8d
cmp r8b, 0xa
jne 0x1400139a5
dec rbx
jmp 0x140013b11
lea rdi, [r14 + 8]
test r12d, r12d
jne 0x140013b11
cmp r8b, 0xa
jne 0x140013a98
dec rbx
jmp 0x140013b11
cmp r8b, 0xd
jne 0x140013b11
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi], 0
je 0x140013ac0
mov r8d, 1
mov rcx, r14
call fcn.140013670
mov dword [rsp + 0x34], eax
jmp 0x140013add
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 0x140013b11
cmp qword [rdi], 0
je 0x140013af0
inc dword [r14 + 0x14]
jmp 0x140013b11
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 0x140013b50
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 [0x1404081f8]
mov r8d, 0x1000
xor edi, edi
mov r13d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x140013d48
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 0x140013bc2
test rbp, rbp
je 0x140013c88
dec rbp
cmp qword [r14 + 8], 0
lea rsi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x140013be6
mov r8d, 2
mov rcx, r14
call fcn.140013670
mov dword [rsp + 0x34], eax
jmp 0x140013c03
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 0x140013c8c
test dx, dx
je 0x140013c1e
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 0x140013c64
mov rcx, qword [0x1404081f8]
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 0x140013c8c
mov edi, 0
test r12d, r12d
jne 0x140013bb0
cmp dx, 0xd
je 0x140013c91
cmp dx, 0xa
je 0x140013c97
jmp 0x140013bb0
lea rsi, [r14 + 8]
test r12d, r12d
jne 0x140013c9b
cmp dx, 0xa
jne 0x140013cc6
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 0x140013d4b
cmp dx, 0xd
jne 0x140013c9b
sub rbx, 2
lea rdx, [rsp + 0x30]
cmp qword [rsi], 0
je 0x140013cf1
mov r8d, 2
mov rcx, r14
call fcn.140013670
mov dword [rsp + 0x34], eax
xor edi, edi
jmp 0x140013d0a
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 0x140013c9d
cmp qword [rsi], 0
je 0x140013d22
add dword [r14 + 0x14], 2
jmp 0x140013c9d
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 0x140013c9d
mov rax, rdi
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140013d70
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 [0x1404081f8]
mov r8d, r14d
xor edx, edx
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140013f0a
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x140013dd9
test rdi, rdi
je 0x140013e67
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.140033b70
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140013df1
xor r8b, r8b
jmp 0x140013df5
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 0x140013e41
mov rcx, qword [0x1404081f8]
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 0x140013e67
test r15d, r15d
jne 0x140013dc7
cmp r8b, 0xd
je 0x140013e70
cmp r8b, 0xa
jne 0x140013dc7
dec rbx
jmp 0x140013ef5
test r15d, r15d
jne 0x140013ef5
cmp r8b, 0xa
jne 0x140013e7b
dec rbx
jmp 0x140013ef5
cmp r8b, 0xd
jne 0x140013ef5
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rsi + 8], 0
je 0x140013ea4
mov r8d, 1
mov rcx, rsi
call fcn.140013670
mov dword [rsp + 0x34], eax
jmp 0x140013ec1
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 0x140013ef5
cmp qword [rsi + 8], 0
je 0x140013ed4
inc dword [rsi + 0x14]
jmp 0x140013ef5
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 0x140013f30
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 0x14001402a
cmp dword [rcx + 0x1c], 1
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], r15
jne 0x140013f8b
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 0x140013fec
mov eax, dword [rsi + 0x10]
mov edx, ebx
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rsi + 8]
sub edx, 1
je 0x140013fe4
sub edx, 1
je 0x140013fdb
cmp edx, 2
je 0x140013fd4
mov r8, rbx
mov rdx, r14
call fcn.140006900
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 0x140013fba
movzx eax, word [r14]
mov word [rcx], ax
jmp 0x140013fba
movzx eax, byte [r14]
mov byte [rcx], al
jmp 0x140013fba
mov rcx, rsi
call fcn.140004560
mov eax, dword [rsi + 0x10]
mov rdx, r14
cmp ebx, eax
jl 0x14001401b
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 0x140013fc0
sub eax, dword [rsi + 0x14]
mov r8, rbx
movsxd rcx, eax
add rcx, qword [rsi + 8]
jmp 0x140013fb5
movsxd rax, ebp
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret

Function at 0x140014040
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 0x140014137
cmp word [rdx], si
je 0x140014137
test r8d, r8d
jne 0x14001406e
mov r8d, dword [rcx + 0x20]
cmp r8d, 0x19
jne 0x1400140ce
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rdx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140014080
lea r8d, [rax + rax]
cmp qword [rcx + 8], rsi
je 0x1400140ab
call fcn.140013f30
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.140033ca0
mov rdi, rax
test rax, rax
je 0x140014132
mov rdx, rax
mov r8d, dword [rsp + 0x58]
cmp qword [rbx + 8], rsi
je 0x14001410d
mov rcx, rbx
call fcn.140013f30
mov dword [rsp + 0x48], eax
jmp 0x140014120
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x1404081f8]
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