joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140048994
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov esi, 0x104
mov ecx, esi
call fcn.1400568f0
mov ecx, esi
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor ebp, ebp
movsxd rbx, eax
test eax, eax
je 0x1400489dd
lea ecx, [rbp + 0x5c]
cmp word [rdi + rbx*2 - 2], cx
je 0x1400489dd
mov word [rdi + rbx*2], cx
inc ebx
sub esi, ebx
mov ecx, esi
call fcn.140056a10
mov rsi, qword [rsp + 0x40]
movsxd rax, ebx
mov rbx, qword [rsp + 0x30]
mov word [rdi + rax*2], bp
mov rbp, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140048b10
Capabilities:
Set current directory

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x140048b23
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cdqe
jmp 0x140048b25
xor eax, eax
add rsp, 0x28
ret

Function at 0x140048b2c
Capabilities:
Copy file

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x140048b47
test rdx, rdx
je 0x140048b47
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cdqe
jmp 0x140048b49
xor eax, eax
add rsp, 0x28
ret

Function at 0x140048b6c
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x380]
sub rsp, 0x480
or rbx, 0xffffffffffffffff
xor edi, edi
test rcx, rcx
je 0x140048cc3
cmp word [rcx], di
je 0x140048cc3
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.msvcrt.dll_wcsncpy
lea rcx, [rsp + 0x20]
mov word [rbp + 0x128], di
call sub.msvcrt.dll_wcslen
mov rdx, rax
cdqe
lea rcx, [rsp + rax*2 + 0x1e]
lea eax, [rdx - 2]
cmp eax, 1
ja 0x140048c0b
cmp word [rsp + 0x22], 0x3a
jne 0x140048c0b
cmp edx, 2
jne 0x140048bf2
lea rdx, [0x1400f56dc]
lea rcx, [rsp + 0x20]
call sub.msvcrt.dll_wcscat
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x140048cc3
jmp 0x140048c9b
cmp word [rcx], 0x5c
je 0x140048c17
cmp word [rcx], 0x2f
jne 0x140048c20
mov word [rcx], di
sub rcx, 2
jmp 0x140048c0b
lea rdx, [rbp + 0x130]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rcx, rax
cmp rax, rbx
je 0x140048c67
test byte [rbp + 0x130], 0x10
je 0x140048c4c
mov rbx, 0xfffffffffffffffe
jmp 0x140048c5f
mov ebx, dword [rbp + 0x14c]
mov eax, dword [rbp + 0x150]
shl rbx, 0x20
or rbx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140048cc3
cmp word [rsp + 0x20], 0x5c
jne 0x140048c77
cmp word [rsp + 0x22], 0x5c
je 0x140048c87
cmp word [rsp + 0x20], 0x2e
jne 0x140048cc3
cmp word [rsp + 0x22], 0x2e
jne 0x140048cc3
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140048ca4
test al, 0x10
je 0x140048cc3
mov rbx, 0xfffffffffffffffe
jmp 0x140048cc3
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov rcx, rbx
mov rbx, 0xfffffffffffffffe
cmp eax, 1
cmova rcx, rbx
mov rbx, rcx
lea r11, [rsp + 0x480]
mov rax, rbx
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret
Function at 0x140048cdc
Capabilities:
Get common file path

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rsi
push rdi
sub rsp, 0x30
lea rax, [r11 + 0x10]
mov rdi, rdx
mov edx, ecx
xor esi, esi
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [r11 - 0x18], rax
mov ebx, esi
call qword [sym.imp.SHELL32.DLL_SHGetFolderLocation]
test eax, eax
jne 0x140048d4d
mov rcx, qword [rsp + 0x48]
mov rdx, rdi
call qword [sym.imp.SHELL32.DLL_SHGetPathFromIDListW]
test eax, eax
je 0x140048d42
mov rcx, rdi
call sub.msvcrt.dll_wcslen
mov rbx, rax
test eax, eax
je 0x140048d42
lea ecx, [rsi + 0x5c]
cdqe
cmp word [rdi + rax*2 - 2], cx
je 0x140048d42
mov word [rdi + rax*2], cx
inc ebx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.OLE32.DLL_CoTaskMemFree]
movsxd rax, ebx
mov word [rdi + rax*2], si
mov rsi, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140048e00
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x140048e44
mov r8d, dword [rcx + 0x10]
mov rdx, qword [rcx + 8]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
movsxd rax, dword [rsp + 0x40]
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x140049440
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
mov edi, r8d
mov rsi, rdx
mov dword [rsp + 0x48], ebx
test rdx, rdx
je 0x1400494b8
test r8d, r8d
je 0x1400494b8
mov rdx, rcx
mov rcx, qword [0x14016f8e0]
call fcn.1400556b0
test rax, rax
je 0x1400494b4
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x1400494a1
mov rcx, rax
call fcn.140049870
mov ebx, eax
cdqe
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x1400495f0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rdx, rcx
mov rcx, qword [0x14016f8e0]
call fcn.1400556b0
mov rbx, rax
test rax, rax
je 0x140049640
mov r8d, dword [rax + 0x20]
mov rdx, rdi
mov rcx, rax
call fcn.140049f70
mov r8d, dword [rbx + 0x20]
lea rdx, [0x1400f5710]
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.140049f70
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1400496c0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdx, rcx
mov rcx, qword [0x14016f8e0]
xor ebx, ebx
mov dword [rsp + 0x50], ebx
call fcn.1400556b0
mov rdi, rax
test rax, rax
je 0x140049764
cmp qword [rax + 8], rbx
je 0x140049727
lea r8d, [rbx + 1]
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.14004a110
test rax, rax
je 0x140049714
inc dword [rdi + 0x14]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov ebx, 1
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
lea rdx, [rsp + 0x48]
mov r8d, 1
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140049776
cmp dword [rsp + 0x58], ebx
je 0x140049776
mov rcx, qword [rdi]
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
or ebx, 0xffffffff
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140049790
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x38
mov rdx, rcx
mov rcx, qword [0x14016f8e0]
mov dword [rsp + 0x50], 0
call fcn.1400556b0
test rax, rax
je 0x1400497ec
cmp qword [rax + 8], 0
mov r8d, 4
lea rdx, [rsp + 0x48]
je 0x1400497d5
mov rcx, rax
call fcn.140049870
cdqe
add rsp, 0x38
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
add rsp, 0x38
ret

Function at 0x140049800
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x38
mov rdx, rcx
mov rcx, qword [0x14016f8e0]
mov dword [rsp + 0x48], 0
call fcn.1400556b0
test rax, rax
je 0x140049861
cmp qword [rax + 8], 0
lea rdx, [rsp + 0x48]
je 0x140049844
mov r8d, 4
mov rcx, rax
call fcn.14004a110
movsxd rax, dword [rsp + 0x48]
add rsp, 0x38
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x50]
mov r8d, 4
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x48]
add rsp, 0x38
ret
Function at 0x140049870
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
xor ebp, ebp
movsxd rdi, r8d
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x50], ebp
cmp dword [rcx + 0x24], ebp
jne 0x1400499ae
cmp dword [rcx + 0x1c], 1
jne 0x1400498c3
mov eax, dword [rcx + 0x14]
mov rcx, qword [rcx]
lea r9d, [rbp + 1]
neg eax
lea r8, [rsp + 0x6c]
cdqe
mov edx, eax
mov qword [rsp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x1c], ebp
mov dword [rbx + 0x14], eax
mov ecx, dword [rbx + 0x14]
cmp ecx, edi
jle 0x14004994f
mov eax, dword [rbx + 0x10]
mov edx, edi
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rbx + 8]
dec edx
je 0x140049937
dec edx
je 0x14004991e
cmp edx, 2
je 0x140049907
mov r8, rdi
mov rdx, rsi
call sub.msvcrt.dll_memcpy
sub dword [rbx + 0x14], edi
mov rax, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [rsi]
mov dword [rcx], eax
sub dword [rbx + 0x14], edi
mov rax, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
movzx eax, word [rsi]
mov word [rcx], ax
sub dword [rbx + 0x14], edi
mov rax, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
movzx eax, byte [rsi]
mov byte [rcx], al
sub dword [rbx + 0x14], edi
mov rax, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbx
call fcn.140048e00
mov eax, dword [rbx + 0x10]
mov rdx, rsi
cmp edi, eax
jl 0x140049989
mov rcx, qword [rbx]
lea r9, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
sub eax, dword [rbx + 0x14]
mov r8, rdi
movsxd rcx, eax
add rcx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
sub dword [rbx + 0x14], edi
mov rax, rdi
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
movsxd rax, ebp
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400499c0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
mov rcx, qword [0x14016bf3c]
mov rsi, r8
mov r15d, edx
mov r14d, 0x1000
xor edx, edx
mov r8d, r14d
mov r12, r9
xor r13d, r13d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140049b84
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
cmp rsi, 0xffffffffffffffff
je 0x140049a2a
test rsi, rsi
je 0x140049aea
dec rsi
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r13
je 0x140049a49
mov r8d, 1
mov rcx, rdi
call fcn.14004a110
mov dword [rsp + 0x34], eax
jmp 0x140049a66
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx r8d, byte [rsp + 0x30]
cmp eax, 1
jne 0x140049aea
test r8b, r8b
je 0x140049a82
mov byte [rbx], r8b
movzx r8d, byte [rsp + 0x30]
inc rbx
lea eax, [r14 - 1]
mov rdx, rbx
movsxd rcx, eax
sub rdx, rbp
cmp rdx, rcx
jle 0x140049ac4
mov rcx, qword [0x14016bf3c]
add r14d, 0x1000
mov r8, rbp
mov edx, 8
movsxd r9, r14d
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
movsxd rbx, ebx
mov rbp, rax
add rbx, rax
test r8b, r8b
je 0x140049aea
test r15d, r15d
jne 0x140049a18
cmp r8b, 0xd
je 0x140049aef
cmp r8b, 0xa
jne 0x140049a18
dec rbx
jmp 0x140049b6d
test r15d, r15d
jne 0x140049b6d
cmp r8b, 0xa
jne 0x140049afa
dec rbx
jmp 0x140049b6d
cmp r8b, 0xd
jne 0x140049b6d
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r13
je 0x140049b22
mov r8d, 1
mov rcx, rdi
call fcn.14004a110
mov dword [rsp + 0x34], eax
jmp 0x140049b3b
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x140049b6d
cmp qword [rdi + 8], r13
je 0x140049b4d
inc dword [rdi + 0x14]
jmp 0x140049b6d
mov rcx, qword [rdi]
lea r8, [rsp + 0x3c]
mov r9d, 1
or edx, 0xffffffff
mov qword [rsp + 0x38], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r12], rax
mov byte [rbx], r13b
mov rbx, qword [rsp + 0x70]
mov rax, rbp
jmp 0x140049b87
mov rax, r13
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140049bb0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, rcx
mov rcx, qword [0x14016bf3c]
mov rbp, r8
mov r12d, edx
mov r8d, 0x1000
xor edx, edx
mov r13, r9
xor edi, edi
mov r15d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x140049d92
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
nop dword [rax]
cmp rbp, 0xffffffffffffffff
je 0x140049c22
test rbp, rbp
je 0x140049ce4
dec rbp
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x140049c42
mov r8d, 2
mov rcx, rsi
call fcn.14004a110
mov dword [rsp + 0x34], eax
jmp 0x140049c5f
mov rcx, qword [rsi]
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 0x140049ce4
test dx, dx
je 0x140049c7a
mov word [rbx], dx
movzx edx, word [rsp + 0x30]
add rbx, 2
mov rdi, rbx
lea eax, [r15 - 1]
sub rdi, r14
movsxd rcx, eax
sar rdi, 1
cmp rdi, rcx
jle 0x140049cc0
mov rcx, qword [0x14016bf3c]
add r15d, 0x800
mov r8, r14
movsxd r9, r15d
mov edx, 8
add r9, r9
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx edx, word [rsp + 0x30]
mov r14, rax
movsxd rax, edi
lea rbx, [r14 + rax*2]
test dx, dx
je 0x140049ce4
mov edi, 0
test r12d, r12d
jne 0x140049c10
cmp dx, 0xd
je 0x140049ce9
cmp dx, 0xa
je 0x140049cef
jmp 0x140049c10
test r12d, r12d
jne 0x140049cf3
cmp dx, 0xa
jne 0x140049d12
sub rbx, 2
xor edi, edi
mov rax, rbx
sub rax, r14
sar rax, 1
mov qword [r13], rax
mov word [rbx], di
mov rbx, qword [rsp + 0x70]
mov rax, r14
jmp 0x140049d95
cmp dx, 0xd
jne 0x140049cf3
sub rbx, 2
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x140049d3e
mov r8d, 2
mov rcx, rsi
call fcn.14004a110
xor edi, edi
mov dword [rsp + 0x34], eax
jmp 0x140049d57
mov rcx, qword [rsi]
xor edi, edi
lea r9, [rsp + 0x34]
lea r8d, [rdi + 2]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x30], 0xa
je 0x140049cf5
cmp qword [rsi + 8], 0
je 0x140049d6c
add dword [rsi + 0x14], 2
jmp 0x140049cf5
mov rcx, qword [rsi]
mov r9d, 1
lea r8, [rsp + 0x3c]
lea edx, [r9 - 3]
mov qword [rsp + 0x38], 0xfffffffffffffffe
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140049cf5
mov rax, rdi
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140049db0
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 rsi, rcx
mov rcx, qword [0x14016bf3c]
mov rdi, r8
mov r15d, edx
mov r14d, 0x1000
xor edx, edx
mov r8d, r14d
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140049f49
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x140049e19
test rdi, rdi
je 0x140049ea7
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.14004a240
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140049e31
xor r8b, r8b
jmp 0x140049e35
movzx r8d, byte [rbx]
cdqe
mov byte [rsp + 0x30], r8b
add rbx, rax
lea eax, [r14 - 5]
mov rdx, rbx
movsxd rcx, eax
sub rdx, rbp
cmp rdx, rcx
jle 0x140049e81
mov rcx, qword [0x14016bf3c]
add r14d, 0x1000
mov r8, rbp
mov edx, 8
movsxd r9, r14d
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
movsxd rbx, ebx
mov rbp, rax
add rbx, rax
test r8b, r8b
je 0x140049ea7
test r15d, r15d
jne 0x140049e07
cmp r8b, 0xd
je 0x140049eb0
cmp r8b, 0xa
jne 0x140049e07
dec rbx
jmp 0x140049f34
test r15d, r15d
jne 0x140049f34
cmp r8b, 0xa
jne 0x140049ebb
dec rbx
jmp 0x140049f34
cmp r8b, 0xd
jne 0x140049f34
dec rbx
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x140049ee4
mov r8d, 1
mov rcx, rsi
call fcn.14004a110
mov dword [rsp + 0x34], eax
jmp 0x140049f01
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 0x140049f34
cmp qword [rsi + 8], 0
je 0x140049f14
inc dword [rsi + 0x14]
jmp 0x140049f34
mov rcx, qword [rsi]
lea r8, [rsp + 0x3c]
mov r9d, 1
or edx, 0xffffffff
mov qword [rsp + 0x38], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r12], rax
mov byte [rbx], 0
mov rbx, qword [rsp + 0x60]
mov rax, rbp
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 0x140049f70
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
mov dword [rsp + 0x48], 0
test rdx, rdx
je 0x14004a073
cmp word [rdx], 0
je 0x14004a073
cmp r8d, 0x19
jne 0x14004a003
or rax, 0xffffffffffffffff
cmp qword [rcx + 8], 0
je 0x140049fd1
nop word [rax + rax]
cmp word [rdx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140049fb0
lea r8d, [rax + rax]
call fcn.140049870
mov dword [rsp + 0x48], eax
cdqe
add rsp, 0x30
pop rbx
ret
cmp word [rdx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140049fd1
mov rcx, qword [rcx]
lea r8d, [rax + rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x48]
add rsp, 0x30
pop rbx
ret
xor ecx, ecx
cmp r8d, 2
mov eax, 0xfde9
lea r8, [rsp + 0x58]
cmove ecx, eax
mov qword [rsp + 0x40], rdi
call fcn.14004a380
mov rdi, rax
test rax, rax
je 0x14004a06e
cmp qword [rbx + 8], 0
mov r8d, dword [rsp + 0x58]
mov rdx, rax
je 0x14004a045
mov rcx, rbx
call fcn.140049870
mov dword [rsp + 0x48], eax
jmp 0x14004a05c
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x14016bf3c]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [rsp + 0x40]
movsxd rax, dword [rsp + 0x48]
add rsp, 0x30
pop rbx
ret

Function at 0x14004a110
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
xor r14d, r14d
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x1c], r14d
jne 0x14004a144
call fcn.140048e00
mov dword [rbx + 0x1c], 1
mov dword [rbx + 0x14], r14d
movsxd rcx, dword [rbx + 0x14]
mov eax, dword [rbx + 0x18]
sub eax, ecx
mov rbp, rcx
cmp rcx, rdi
jl 0x14004a1a9
movsxd rcx, eax
mov rax, rdi
add rcx, qword [rbx + 8]
dec rax
je 0x14004a19f
dec rax
je 0x14004a191
cmp rax, 2
je 0x14004a185
mov rdx, rcx
mov r8, rdi
mov rcx, rsi
call sub.msvcrt.dll_memcpy
movsxd rax, edi
jmp 0x14004a221
mov eax, dword [rcx]
mov dword [rsi], eax
movsxd rax, edi
jmp 0x14004a221
movzx eax, word [rcx]
mov word [rsi], ax
movsxd rax, edi
jmp 0x14004a221
movzx eax, byte [rcx]
mov byte [rsi], al
movsxd rax, edi
jmp 0x14004a221
movsxd rdx, eax
mov r8, rcx
mov rcx, rsi
add rdx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
movsxd r8, dword [rbx + 0x10]
mov rcx, qword [rbx]
sub rdi, rbp
add rsi, rbp
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
cmp rdi, r8
jl 0x14004a1f1
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
mov dword [rbx + 0x14], r14d
add eax, ebp
cdqe
jmp 0x14004a224
mov rdx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x50]
mov rdx, qword [rbx + 8]
cmp rdi, rax
mov rcx, rsi
mov dword [rbx + 0x14], eax
cmovg rdi, rax
mov dword [rbx + 0x18], eax
mov r8, rdi
call sub.msvcrt.dll_memcpy
lea eax, [rdi + rbp]
cdqe
sub dword [rbx + 0x14], edi
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x14004a240
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x30
cmp qword [rcx + 8], 0
mov rbx, rdx
mov rsi, rcx
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x50], 0
je 0x14004a275
mov r8d, 1
call fcn.14004a110
mov dword [rsp + 0x50], eax
jmp 0x14004a296
mov rcx, qword [rcx]
lea r9, [rsp + 0x50]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
cmp eax, 1
je 0x14004a2a8
xor eax, eax
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movzx ecx, byte [rsp + 0x40]
test cl, cl
js 0x14004a2c7
mov byte [rbx], cl
mov byte [rbx + 1], 0
mov eax, 1
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movzx eax, cl
mov qword [rsp + 0x48], rdi
and al, 0xe0
cmp al, 0xc0
jne 0x14004a2dc
mov edi, 2
jmp 0x14004a2fa
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x14004a2ec
mov edi, 3
jmp 0x14004a2fa
movzx eax, cl
and al, 0xf8
cmp al, 0xf0
jne 0x14004a365
mov edi, 4
mov byte [rbx], cl
cmp qword [rsi + 8], 0
lea rdx, [rbx + 1]
je 0x14004a31a
lea eax, [rdi - 1]
mov rcx, rsi
movsxd r8, eax
call fcn.14004a110
mov rcx, rax
jmp 0x14004a339
mov rcx, qword [rsi]
lea r8d, [rdi - 1]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x50]
lea eax, [rdi - 1]
cmp ecx, eax
je 0x14004a352
xor eax, eax
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movsxd rax, edi
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
mov rdi, qword [rsp + 0x48]
mov word [rbx], 0x3f
mov rbx, qword [rsp + 0x58]
mov eax, 1
add rsp, 0x30
pop rsi
ret
Function at 0x14004c3d0
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
push rbp
push r14
sub rsp, 0x68
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rsi, rcx
mov qword [rax - 0x20], r13
mov ecx, edx
xor edi, edi
mov ebx, 0x100000
xor ebp, ebp
mov r13d, r8d
call fcn.14004c580
mov r14, rax
test rax, rax
je 0x14004c53a
test rsi, rsi
je 0x14004c53a
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rsi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x60], r12
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14004c535
mov rcx, qword [0x14016bf3c]
xor edx, edx
mov r8d, ebx
mov qword [rsp + 0x50], r15
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x14004c527
xor edx, edx
mov ecx, r13d
call qword [r14 + 8]
mov rbp, rax
test rax, rax
je 0x14004c515
mov rax, qword [rsp + 0x98]
test rax, rax
jle 0x14004c4b0
lea r8, [rsp + 0x9c]
xor r9d, r9d
mov edx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rsi, qword [rsp + 0xa0]
xor r13d, r13d
nop dword [rax + rax]
add rdi, 0x100000
cmp rsi, 0xffffffffffffffff
je 0x14004c4dc
cmp rdi, rsi
jle 0x14004c4dc
mov ebx, esi
sub ebx, edi
add ebx, 0x100000
lea r9, [rsp + 0x40]
mov r8d, ebx
mov rdx, r15
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, dword [rsp + 0x40]
mov rdx, r15
mov rcx, rbp
call qword [r14 + 0x10]
cmp dword [rsp + 0x40], 0x100000
je 0x14004c4c0
mov rcx, rbp
call qword [r14 + 0x18]
mov rcx, qword [0x14016bf3c]
mov r8, r15
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x60]
mov edx, dword [rsp + 0xa8]
mov rcx, rbp
call fcn.14004c640
mov r13, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
test rbp, rbp
je 0x14004c572
mov rcx, rbp
call qword [r14 + 0x20]
add rsp, 0x68
pop r14
pop rbp
ret

Function at 0x14004cb74
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x14016f970], eax
add rsp, 0x28
ret