joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14004cfc4
Capabilities:
Get memory capacity
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xf0
mov rax, qword [0x1400c0de0]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor edx, edx
mov ebx, ecx
lea rcx, [rbp - 0x49]
lea r8d, [rdx + 0x40]
call fcn.14003dd20
cmp ebx, 6
jne 0x14004d009
lea rcx, [rbp - 0x79]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rbp - 0x75]
jmp 0x14004d088
lea rcx, [rbp - 0x49]
mov dword [rbp - 0x49], 0x40
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x14004d061
mov ecx, ebx
test ebx, ebx
je 0x14004d05b
sub ecx, 1
je 0x14004d055
sub ecx, 1
je 0x14004d04f
sub ecx, 1
je 0x14004d049
sub ecx, 1
je 0x14004d043
cmp ecx, 1
jne 0x14004d061
mov rax, qword [rbp - 0x29]
jmp 0x14004d088
mov rax, qword [rbp - 0x31]
jmp 0x14004d088
mov rax, qword [rbp - 0x19]
jmp 0x14004d088
mov rax, qword [rbp - 0x21]
jmp 0x14004d088
mov rax, qword [rbp - 0x39]
jmp 0x14004d088
mov rax, qword [rbp - 0x41]
jmp 0x14004d088
cmp ebx, 7
jne 0x14004d086
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8d, [rbx + 0x49]
lea rdx, [rbp - 9]
call sub.KERNEL32.dll_K32GetProcessMemoryInfo
test eax, eax
je 0x14004d086
mov rax, qword [rbp + 0x3f]
jmp 0x14004d088
xor eax, eax
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.140055f10
mov rbx, qword [rsp + 0x100]
add rsp, 0xf0
pop rbp
ret

Function at 0x14004d0b0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x30
mov ebp, r9d
mov rbx, rcx
test r8, r8
je 0x14004d1a9
movzx r12d, word [r8]
test r12w, r12w
je 0x14004d1a9
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], r13
xor r13d, r13d
test edx, edx
mov qword [rsp + 0x28], r14
mov eax, r13d
mov qword [rsp + 0x20], r15
cmovns eax, edx
test rcx, rcx
je 0x14004d129
cmp word [rcx], r13w
je 0x14004d129
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [rcx + rdi*2], r13w
jne 0x14004d110
cmp edi, eax
mov esi, r13d
cmovg edi, eax
sub eax, edi
cmovns esi, eax
jmp 0x14004d12e
mov edi, r13d
mov esi, eax
call fcn.140054d20
lea ecx, [rdi + rsi]
mov edx, ebp
mov r15d, eax
call fcn.140054d60
mov r14, rax
test r15d, r15d
je 0x14004d153
mov ecx, r15d
call fcn.140054e10
mov rbx, rax
movsxd r15, edi
test edi, edi
je 0x14004d16d
movsxd rcx, esi
lea r8, [r15 + r15]
mov rdx, rbx
lea rcx, [r14 + rcx*2]
call fcn.14003f750
test esi, esi
je 0x14004d182
mov rdi, r14
mov edx, esi
mov rax, r12
mov ecx, esi
rep stosw word [rdi], ax
lea r14, [r14 + rdx*2]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov word [r14 + r15*2], r13w
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov r13, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rbp
pop rbx
ret
mov ecx, ebp
add rsp, 0x30
pop r12
pop rbp
pop rbx
jmp 0x140054e40
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x1400c181c]
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 0x14004d1c0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov esi, 0x40
mov ecx, esi
call fcn.140054d60
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call fcn.1400550a8
mov rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], 0
jne 0x14004d1f3
sub esi, edx
mov ecx, esi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140054e70

Function at 0x14004ddf0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
xor ebp, ebp
mov r13d, r9d
mov r15d, edx
mov r12d, ebp
cmp edx, 1
jl 0x14004df5b
test rcx, rcx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov edi, ebp
mov qword [rsp + 0x20], r14
lea r14, [0x14008d0b0]
mov rsi, r14
cmovne rsi, rcx
test r8, r8
cmovne r14, r8
movzx ecx, word [r14]
test cx, cx
je 0x14004deea
cmp word [r14 + 2], di
je 0x14004deea
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [r14 + rax*2], di
jne 0x14004de60
mov rbx, rsi
movsxd rbp, eax
mov r8, rbp
mov rdx, r14
mov rcx, rbx
call fcn.140030edc
test eax, eax
je 0x14004de8e
cmp word [rbx], r12w
je 0x14004de8e
add rbx, 2
jmp 0x14004de70
inc edi
cmp edi, r15d
je 0x14004dea4
cmp word [rbx], r12w
je 0x14004dead
lea rbx, [rbx + rbp*2]
mov rsi, rbx
jmp 0x14004de70
mov r12, rbx
sub r12, rsi
sar r12, 1
xor ebp, ebp
mov rcx, rbx
call fcn.140054d20
mov r14, qword [rsp + 0x20]
movsxd rbx, r12d
test eax, eax
je 0x14004df20
mov ecx, r13d
call fcn.140054ea0
lea r8, [rbx + rbx]
mov rdx, rsi
mov rcx, rax
call fcn.14003f750
mov edx, r13d
mov ecx, r12d
call fcn.140054d60
mov rdi, rax
jmp 0x14004df3c
mov rbx, rsi
nop dword [rax]
movzx eax, word [rbx]
cmp ax, cx
je 0x14004df03
test ax, ax
je 0x14004df03
add rbx, 2
jmp 0x14004def0
inc edi
cmp edi, r15d
je 0x14004df15
test ax, ax
je 0x14004deaf
lea rsi, [rbx + 2]
jmp 0x14004deea
mov r12, rbx
sub r12, rsi
sar r12, 1
jmp 0x14004deaf
mov edx, r13d
mov ecx, r12d
call fcn.140054d60
mov r8, rbx
mov rdx, rsi
mov rcx, rax
mov rdi, rax
call fcn.140076168
mov rsi, qword [rsp + 0x58]
mov word [rdi + rbx*2], bp
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
mov ecx, r13d
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
jmp 0x140054e40

Function at 0x14004eac8
Capabilities:
Set environment variable

Disassembly:
sub rsp, 0x28
mov rax, rdx
test rcx, rcx
je 0x14004eae8
test rax, rax
lea rdx, [0x14008d0b0]
cmovne rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x28
ret
Function at 0x14004eb28
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [0x1400c5140]
call fcn.140053110
mov rsi, rax
or edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor ebp, ebp
mov rdx, rax
movzx r8d, word [rax]
test r8w, r8w
je 0x14004ec5f
mov rcx, qword [rsp + 0x30]
jmp 0x14004eb79
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x20
je 0x14004eb71
mov r11d, 1
cmp r8w, 0x22
jne 0x14004ebc8
add rdx, 2
mov r9, rdx
movzx r8d, word [rdx]
test r8w, r8w
je 0x14004ec27
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x14004ebc2
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x14004eba6
test r8w, r8w
jmp 0x14004ec27
test r8w, r8w
je 0x14004ec37
mov r9, rdx
movzx r10d, r8w
cmp r8w, 0x20
je 0x14004ec23
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x22
jne 0x14004ec19
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
je 0x14004ec19
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x14004ec19
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x14004ebfd
movzx r10d, r8w
test r8w, r8w
jne 0x14004ebd1
test r10w, r10w
lea rax, [rdx + 2]
mov rcx, rdx
cmove rax, rdx
mov rdx, rax
jmp 0x14004ec3d
mov r11d, ebp
mov r9, rbp
cmp dword [rsi], edi
jne 0x14004ec46
test rbx, rbx
jne 0x14004ec69
movzx r8d, word [rdx]
lea eax, [rdi + 1]
test r11d, r11d
cmove eax, edi
mov edi, eax
test r8w, r8w
jne 0x14004eb79
test rbx, rbx
jne 0x14004ec7d
movsxd rax, edi
jmp 0x14004ec82
test r9, r9
je 0x14004ec7d
sub rcx, r9
mov rax, r9
sar rcx, 1
mov dword [rbx], ecx
inc dword [rsi]
jmp 0x14004ec82
mov dword [rbx], ebp
mov rax, rdx
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x14004ec98
Capabilities:
Accept command line arguments

Disassembly:
sub rsp, 0x28
mov rcx, qword [0x1400c5140]
call fcn.140053110
xor ecx, ecx
add rsp, 0x28
jmp fcn.14004eb28

Function at 0x14004ed2c
Capabilities:
Get thread local storage value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
xor ebp, ebp
mov rcx, qword [0x1400c5140]
mov esi, edx
mov dword [rax + 8], ebp
call fcn.140053110
test ebx, ebx
js 0x14004ed5b
mov dword [rax], ebx
lea rcx, [rsp + 0x30]
call fcn.14004eb28
mov edi, dword [rsp + 0x30]
mov edx, esi
mov ecx, edi
mov rbx, rax
call fcn.140054d60
mov ecx, ebp
jmp 0x14004ed97
test edi, edi
je 0x14004ed9c
movzx edx, word [rbx]
cmp dx, 0x22
jne 0x14004ed8a
inc ecx
jmp 0x14004ed91
mov word [rax], dx
add rax, 2
add rbx, 2
dec edi
cmp word [rbx], bp
jne 0x14004ed79
mov word [rax], bp
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
jmp fcn.140054e70
Function at 0x14004f630
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp rdx, rcx
mov rdi, rcx
mov rbx, rcx
cmovbe rdi, rdx
sub rbx, rdi
cmp dword [0x1400c48b4], 0
jne 0x14004f658
call fcn.14004f5c0
mov ecx, dword [0x1400c48b0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
test rax, rax
jne 0x14004f680
call fcn.14004f5c0
mov ecx, dword [0x1400c48b0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
movsxd r9, dword [r11 + 4]
mov eax, 0x10
movsxd r10, dword [r11]
mov r8d, dword [r11 + r10*4 + 0x4c]
mov edx, dword [r11 + r10*4 + 8]
ror r8d, 0xd
add r8d, dword [r11 + r9*4 + 0x4c]
ror edx, 5
add edx, dword [r11 + r9*4 + 8]
mov dword [r11 + r10*4 + 8], r8d
mov dword [r11 + r10*4 + 0x4c], edx
sub r10d, 1
cmovs r10d, eax
sub r9d, 1
mov dword [r11], r10d
cmovs r9d, eax
mov dword [r11 + 4], r9d
mov r9d, r8d
mov r8d, edx
add rbx, 1
je 0x14004f708
mov rdx, rbx
mov ecx, ebx
shr rdx, 0x20
mov rax, rdx
imul rax, r8
imul rcx, r9
imul rdx, r9
shr rax, 0x20
shr rcx, 0x20
add rax, rcx
add rax, rdx
add rax, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
shl r9, 0x20
and r9, r8
lea rax, [rdi + r9]
add rsp, 0x20
pop rdi
ret
Function at 0x1400507e4
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1400c0de0]
xor rax, rsp
mov qword [rbp + 0x380], rax
or rbx, 0xffffffffffffffff
xor edi, edi
test rcx, rcx
je 0x140050975
cmp word [rcx], di
je 0x140050975
mov rdx, rcx
mov r8d, 0x104
lea rcx, [rbp + 0x170]
call fcn.140076168
lea rcx, [rbp + 0x170]
mov word [rbp + 0x378], di
call fcn.14002f464
mov rdx, rax
cdqe
lea rcx, [rbp + rax*2 + 0x16e]
lea eax, [rdx - 2]
cmp eax, 1
ja 0x1400508a8
cmp word [rbp + 0x172], 0x3a
jne 0x1400508a8
cmp edx, 2
jne 0x140050886
lea rdx, [0x1400895d8]
lea rcx, [rbp + 0x170]
call fcn.140078378
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x140050975
mov rbx, 0xfffffffffffffffe
jmp 0x140050975
cmp word [rcx], 0x5c
je 0x1400508b4
cmp word [rcx], 0x2f
jne 0x1400508bd
mov word [rcx], di
sub rcx, 2
jmp 0x1400508a8
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rcx, rax
cmp rax, rbx
je 0x1400508fe
test byte [rsp + 0x20], 0x10
je 0x1400508e7
mov rbx, 0xfffffffffffffffe
jmp 0x1400508f6
mov ebx, dword [rsp + 0x3c]
mov eax, dword [rsp + 0x40]
shl rbx, 0x20
or rbx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140050975
movzx ecx, word [rbp + 0x170]
movzx eax, word [rbp + 0x172]
cmp cx, 0x5c
jne 0x140050917
cmp ax, cx
je 0x14005092d
cmp cx, 0x2f
jne 0x140050922
cmp ax, cx
je 0x14005092d
cmp cx, 0x2e
jne 0x140050975
cmp ax, cx
jne 0x140050975
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140050954
not eax
mov rbx, 0xfffffffffffffffe
shr rax, 4
and eax, 1
or rbx, rax
jmp 0x140050975
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov rcx, rbx
mov rbx, 0xfffffffffffffffe
cmp eax, 1
cmova rcx, rbx
mov rbx, rcx
mov rax, rbx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140055f10
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret

Function at 0x1400509c0
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x30
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
mov rcx, qword [0x1400c5340]
jne 0x1400509e0
add rsp, 0x30
pop rdi
jmp fcn.140053b3c
mov rdx, rdi
mov qword [rsp + 0x48], rbx
call fcn.140053318
mov rbx, rax
test rax, rax
je 0x140050a55
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x140050a3d
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rbx + 0x1c], eax
jne 0x140050a2a
mov r8d, dword [rbx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rbx + 0x14]
mov rcx, qword [rbx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
mov r8, qword [rbx + 8]
xor edx, edx
mov rcx, qword [0x1400c2f08]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400c5340]
mov rdx, rdi
call fcn.1400532ac
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140050a60
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 0x140050aa4
mov r8d, dword [rcx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rdx, qword [rcx + 8]
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 0x1400514a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdx, rcx
xor edi, edi
mov rcx, qword [0x1400c5340]
mov dword [rsp + 0x50], edi
call fcn.140053318
mov rbx, rax
test rax, rax
je 0x140051545
cmp qword [rax + 8], rdi
je 0x140051507
lea r8d, [rdi + 1]
mov rcx, rax
lea rdx, [rsp + 0x50]
call fcn.140051d70
test rax, rax
je 0x1400514f4
inc dword [rbx + 0x14]
movsxd rax, edi
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov edi, 1
movsxd rax, edi
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
mov r8d, 1
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140051555
cmp dword [rsp + 0x58], edi
je 0x140051555
mov rcx, qword [rbx]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 - 2]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
movsxd rax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rbx, qword [rsp + 0x40]
mov eax, 0xffffffff
cdqe
add rsp, 0x30
pop rdi
ret

Function at 0x140051570
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 [0x1400c5340]
call fcn.140053318
mov rbx, rax
test rax, rax
je 0x1400515c0
mov r8d, dword [rax + 0x20]
mov rdx, rdi
mov rcx, rax
call fcn.140051ec0
mov r8d, dword [rbx + 0x20]
lea rdx, [0x140091238]
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.140051ec0
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1400515d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rdx
mov edi, r8d
mov rdx, rcx
mov rcx, qword [0x1400c5340]
call fcn.140053318
mov rbx, rax
test rax, rax
je 0x14005162b
mov r8d, edi
mov rdx, rsi
mov rcx, rax
call fcn.140051ec0
mov r8d, edi
lea rdx, [0x140091238]
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140051ec0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140051680
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rdx
mov dword [rsp + 0x58], 0
mov rdx, rcx
mov rbx, r8
mov rcx, qword [0x1400c5340]
call fcn.140053318
test rax, rax
je 0x1400516e8
cmp qword [rax + 8], 0
mov rdx, rdi
je 0x1400516ce
mov r8, rbx
mov rcx, rax
call fcn.140051d70
cdqe
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
mov r8d, ebx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x58]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140051700
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 dword [rsp + 0x48], ebx
mov rsi, rdx
test rdx, rdx
je 0x140051778
test r8d, r8d
je 0x140051778
mov rdx, rcx
mov rcx, qword [0x1400c5340]
call fcn.140053318
test rax, rax
je 0x140051774
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x140051761
mov rcx, rax
call fcn.140052060
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 0x140051790
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 [0x1400c2f08]
mov r8d, r15d
xor edx, edx
mov r13, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14005196b
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rdi
cmp rsi, 0xffffffffffffffff
je 0x1400517f7
test rsi, rsi
je 0x1400518c0
dec rsi
cmp qword [r14 + 8], 0
lea rdi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x14005181b
mov r8d, 1
mov rcx, r14
call fcn.140051d70
mov dword [rsp + 0x34], eax
jmp 0x14005183c
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 0x1400518c4
test r8b, r8b
je 0x140051858
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 0x14005189a
mov rcx, qword [0x1400c2f08]
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 0x1400518c4
test r12d, r12d
jne 0x1400517e5
cmp r8b, 0xd
je 0x1400518cd
cmp r8b, 0xa
jne 0x1400517e5
dec rbx
jmp 0x140051951
lea rdi, [r14 + 8]
test r12d, r12d
jne 0x140051951
cmp r8b, 0xa
jne 0x1400518d8
dec rbx
jmp 0x140051951
cmp r8b, 0xd
jne 0x140051951
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi], 0
je 0x140051900
mov r8d, 1
mov rcx, r14
call fcn.140051d70
mov dword [rsp + 0x34], eax
jmp 0x14005191d
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 0x140051951
cmp qword [rdi], 0
je 0x140051930
inc dword [r14 + 0x14]
jmp 0x140051951
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 0x140051990
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 [0x1400c2f08]
mov r8d, 0x1000
xor edi, edi
mov r13d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x140051b88
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 0x140051a02
test rbp, rbp
je 0x140051ac8
dec rbp
cmp qword [r14 + 8], 0
lea rsi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x140051a26
mov r8d, 2
mov rcx, r14
call fcn.140051d70
mov dword [rsp + 0x34], eax
jmp 0x140051a43
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 0x140051acc
test dx, dx
je 0x140051a5e
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 0x140051aa4
mov rcx, qword [0x1400c2f08]
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 0x140051acc
mov edi, 0
test r12d, r12d
jne 0x1400519f0
cmp dx, 0xd
je 0x140051ad1
cmp dx, 0xa
je 0x140051ad7
jmp 0x1400519f0
lea rsi, [r14 + 8]
test r12d, r12d
jne 0x140051adb
cmp dx, 0xa
jne 0x140051b06
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 0x140051b8b
cmp dx, 0xd
jne 0x140051adb
sub rbx, 2
lea rdx, [rsp + 0x30]
cmp qword [rsi], 0
je 0x140051b31
mov r8d, 2
mov rcx, r14
call fcn.140051d70
mov dword [rsp + 0x34], eax
xor edi, edi
jmp 0x140051b4a
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 0x140051add
cmp qword [rsi], 0
je 0x140051b62
add dword [r14 + 0x14], 2
jmp 0x140051add
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 0x140051add
mov rax, rdi
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140051bb0
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 [0x1400c2f08]
mov r8d, r14d
xor edx, edx
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140051d4a
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x140051c19
test rdi, rdi
je 0x140051ca7
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.140052170
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140051c31
xor r8b, r8b
jmp 0x140051c35
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 0x140051c81
mov rcx, qword [0x1400c2f08]
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 0x140051ca7
test r15d, r15d
jne 0x140051c07
cmp r8b, 0xd
je 0x140051cb0
cmp r8b, 0xa
jne 0x140051c07
dec rbx
jmp 0x140051d35
test r15d, r15d
jne 0x140051d35
cmp r8b, 0xa
jne 0x140051cbb
dec rbx
jmp 0x140051d35
cmp r8b, 0xd
jne 0x140051d35
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rsi + 8], 0
je 0x140051ce4
mov r8d, 1
mov rcx, rsi
call fcn.140051d70
mov dword [rsp + 0x34], eax
jmp 0x140051d01
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 0x140051d35
cmp qword [rsi + 8], 0
je 0x140051d14
inc dword [rsi + 0x14]
jmp 0x140051d35
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