joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140044234
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, edx
xor r8d, r8d
xor edx, edx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor ebp, ebp
mov edi, eax
test eax, eax
je 0x140044262
dec edi
mov edx, ebx
mov ecx, edi
call fcn.140067450
lea r8d, [rdi + 1]
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov rsi, qword [rsp + 0x40]
movsxd rcx, edi
mov word [rbx + rcx*2], bp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x1400442b4
Capabilities:
Set environment variable

Disassembly:
sub rsp, 0x28
mov rax, rdx
test rcx, rcx
je 0x1400442d4
test rax, rax
lea rdx, [0x14010eeb0]
cmovne rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x28
ret

Function at 0x140044314
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 [0x140175300]
call fcn.140066214
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 0x14004444b
mov rcx, qword [rsp + 0x30]
jmp 0x140044365
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x20
je 0x14004435d
mov r11d, 1
cmp r8w, 0x22
jne 0x1400443b4
add rdx, 2
mov r9, rdx
movzx r8d, word [rdx]
test r8w, r8w
je 0x140044413
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x1400443ae
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x140044392
test r8w, r8w
jmp 0x140044413
test r8w, r8w
je 0x140044423
mov r9, rdx
movzx r10d, r8w
cmp r8w, 0x20
je 0x14004440f
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x22
jne 0x140044405
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
je 0x140044405
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x140044405
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x1400443e9
movzx r10d, r8w
test r8w, r8w
jne 0x1400443bd
test r10w, r10w
lea rax, [rdx + 2]
mov rcx, rdx
cmove rax, rdx
mov rdx, rax
jmp 0x140044429
mov r11d, ebp
mov r9, rbp
cmp dword [rsi], edi
jne 0x140044432
test rbx, rbx
jne 0x140044455
movzx r8d, word [rdx]
lea eax, [rdi + 1]
test r11d, r11d
cmove eax, edi
mov edi, eax
test r8w, r8w
jne 0x140044365
test rbx, rbx
jne 0x140044469
movsxd rax, edi
jmp 0x14004446e
test r9, r9
je 0x140044469
sub rcx, r9
mov rax, r9
sar rcx, 1
mov dword [rbx], ecx
inc dword [rsi]
jmp 0x14004446e
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 0x140044518
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 [0x140175300]
mov esi, edx
mov dword [rax + 8], ebp
call fcn.140066214
test ebx, ebx
js 0x140044547
mov dword [rax], ebx
lea rcx, [rsp + 0x30]
call fcn.140044314
mov edi, dword [rsp + 0x30]
mov edx, esi
mov ecx, edi
mov rbx, rax
call fcn.140067450
mov ecx, ebp
jmp 0x140044583
test edi, edi
je 0x140044588
movzx edx, word [rbx]
cmp dx, 0x22
jne 0x140044576
inc ecx
jmp 0x14004457d
mov word [rax], dx
add rax, 2
add rbx, 2
dec edi
cmp word [rbx], bp
jne 0x140044565
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.140067500
Function at 0x140044bc4
Capabilities:
Read file on windows

Disassembly:
test byte [rcx + 0x28], 0x80
mov r9d, edx
mov edx, 2
je 0x140044bd9
mov edx, 0x18
jmp 0x140044bf1
test dword [rcx + 0x28], 0x100
jne 0x140044bf1
test dword [rcx + 0x28], 0x200
mov eax, 0x19
cmovne edx, eax
mov rcx, qword [rcx + 0x18]
or r8d, 0xffffffff
jmp 0x140044d58
mov rax, rsp
mov dword [rax + 0x20], r9d
mov dword [rax + 0x18], r8d
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
xor eax, eax
mov r12, rcx
mov ecx, 0x1000
mov r15d, r9d
mov edi, ecx
mov r13d, r8d
mov ebp, eax
mov r14d, eax
cmp edx, 0x18
je 0x140044e94
cmp edx, 2
je 0x140044e94
mov rcx, qword [0x14017044c]
xor edx, edx
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ecx, ecx
lea r9, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x34]
mov rbx, rax
lea r8d, [rcx + 2]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
test eax, eax
je 0x140044e7d
mov r15, qword [rsp + 0x90]
mov esi, ecx
mov r12d, edi
cmp dword [rsp + 0x38], 2
jne 0x140044e75
cmp r13d, 0xffffffff
je 0x140044e02
cmp r14d, r13d
jae 0x140044e75
add r14d, 2
test edi, edi
jne 0x140044e2d
mov rcx, qword [0x14017044c]
lea edx, [rdi + 8]
movsxd r9, r12d
mov r8, rbx
add r9, r9
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edi, 0x1000
xor ecx, ecx
mov rbx, rax
movzx eax, word [rsp + 0x34]
cmp ax, 0xa
je 0x140044e75
cmp ax, 0xd
je 0x140044e4d
mov word [rsi + rbx], ax
inc ebp
add rsi, 2
inc r12d
dec edi
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x38]
mov rcx, r15
lea rdx, [rsp + 0x34]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
test eax, eax
jne 0x140044df0
mov r15d, dword [rsp + 0xa8]
movsxd rax, ebp
mov edx, r15d
mov word [rbx + rax*2], cx
mov rcx, rbx
call fcn.1400a9720
jmp 0x140044f66
mov r8, rcx
xor edx, edx
mov rcx, qword [0x14017044c]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15d, dword [rsp + 0xa0]
mov r13d, edi
mov rsi, qword [rsp + 0x90]
mov rbx, rax
xor eax, eax
mov r12d, eax
jmp 0x140044ec5
xor eax, eax
cmp r15d, 0xffffffff
je 0x140044ed0
cmp r14d, r15d
jae 0x140044f3a
lea r9, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140044f3a
cmp dword [rsp + 0x38], 1
jne 0x140044f3a
inc r14d
test edi, edi
jne 0x140044f1e
mov rcx, qword [0x14017044c]
lea edx, [rdi + 8]
movsxd r9, r13d
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rbx, rax
mov edi, 0x1000
mov al, byte [rsp + 0x30]
cmp al, 0xa
je 0x140044f3a
cmp al, 0xd
je 0x140044ec3
mov byte [r12 + rbx], al
inc ebp
inc r12
inc r13d
dec edi
jmp 0x140044ec3
mov r15d, dword [rsp + 0xa8]
xor ecx, ecx
cmp dword [rsp + 0x98], 0x18
mov edx, r15d
movsxd rax, ebp
mov byte [rax + rbx], cl
mov rcx, rbx
jne 0x140044f61
call fcn.1400a9780
jmp 0x140044f66
call fcn.1400a9ac0
mov rcx, qword [0x14017044c]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1400497c0
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x30
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
mov rcx, qword [0x1401753e0]
jne 0x1400497e0
add rsp, 0x30
pop rdi
jmp fcn.140066658
mov rdx, rdi
mov qword [rsp + 0x48], rbx
call fcn.14006641c
mov rbx, rax
test rax, rax
je 0x140049855
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x14004983d
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rbx + 0x1c], eax
jne 0x14004982a
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 [0x14017044c]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1401753e0]
mov rdx, rdi
call fcn.1400663b0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x140049860
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 0x1400498a4
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 0x140049fb0
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 [0x1401753e0]
mov dword [rsp + 0x50], edi
call fcn.14006641c
mov rbx, rax
test rax, rax
je 0x14004a055
cmp qword [rax + 8], rdi
je 0x14004a017
lea r8d, [rdi + 1]
mov rcx, rax
lea rdx, [rsp + 0x50]
call fcn.14004a5d0
test rax, rax
je 0x14004a004
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 0x14004a065
cmp dword [rsp + 0x58], edi
je 0x14004a065
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 0x14004a360
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 0x14004a457
cmp word [rdx], si
je 0x14004a457
test r8d, r8d
jne 0x14004a38e
mov r8d, dword [rcx + 0x20]
cmp r8d, 0x19
jne 0x14004a3ee
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rdx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x14004a3a0
lea r8d, [rax + rax]
cmp qword [rcx + 8], rsi
je 0x14004a3cb
call fcn.14004ad00
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.14004ae10
mov rdi, rax
test rax, rax
je 0x14004a452
mov rdx, rax
mov r8d, dword [rsp + 0x58]
cmp qword [rbx + 8], rsi
je 0x14004a42d
mov rcx, rbx
call fcn.14004ad00
mov dword [rsp + 0x48], eax
jmp 0x14004a440
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x14017044c]
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

Function at 0x14004a470
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rdx
mov rdx, rcx
mov rcx, qword [0x1401753e0]
call fcn.14006641c
test rax, rax
je 0x14004a4a0
xor r8d, r8d
mov rdx, rbx
mov rcx, rax
add rsp, 0x20
pop rbx
jmp fcn.14004a360
add rsp, 0x20
pop rbx
ret

Function at 0x14004a500
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 [0x1401753e0]
call fcn.14006641c
mov rbx, rax
test rax, rax
je 0x14004a550
mov r8d, dword [rax + 0x20]
mov rdx, rdi
mov rcx, rax
call fcn.14004a360
mov r8d, dword [rbx + 0x20]
lea rdx, [0x1401129dc]
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.14004a360
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14004a5d0
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 0x14004a607
call fcn.140049860
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 0x14004a680
mov rax, rdi
sub rax, 1
je 0x14004a671
sub rax, 1
je 0x14004a65e
cmp rax, 2
je 0x14004a64d
mov r8, rdi
mov rcx, r15
call fcn.1400358d0
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14004a6fa
mov eax, dword [rdx]
mov dword [r15], eax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14004a6fa
movzx eax, word [rdx]
mov word [r15], ax
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14004a6fa
movzx eax, byte [rdx]
mov byte [r15], al
sub dword [r14 + 0x14], edi
movsxd rax, edi
jmp 0x14004a6fa
mov r8, rbx
mov rcx, r15
call fcn.1400358d0
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 0x14004a6c0
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 0x14004a6f8
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.1400358d0
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 0x14004a720
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 [0x14017044c]
mov r8d, r15d
xor edx, edx
mov r13, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14004a8fb
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rdi
cmp rsi, 0xffffffffffffffff
je 0x14004a787
test rsi, rsi
je 0x14004a850
dec rsi
cmp qword [r14 + 8], 0
lea rdi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x14004a7ab
mov r8d, 1
mov rcx, r14
call fcn.14004a5d0
mov dword [rsp + 0x34], eax
jmp 0x14004a7cc
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 0x14004a854
test r8b, r8b
je 0x14004a7e8
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 0x14004a82a
mov rcx, qword [0x14017044c]
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 0x14004a854
test r12d, r12d
jne 0x14004a775
cmp r8b, 0xd
je 0x14004a85d
cmp r8b, 0xa
jne 0x14004a775
dec rbx
jmp 0x14004a8e1
lea rdi, [r14 + 8]
test r12d, r12d
jne 0x14004a8e1
cmp r8b, 0xa
jne 0x14004a868
dec rbx
jmp 0x14004a8e1
cmp r8b, 0xd
jne 0x14004a8e1
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi], 0
je 0x14004a890
mov r8d, 1
mov rcx, r14
call fcn.14004a5d0
mov dword [rsp + 0x34], eax
jmp 0x14004a8ad
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 0x14004a8e1
cmp qword [rdi], 0
je 0x14004a8c0
inc dword [r14 + 0x14]
jmp 0x14004a8e1
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 0x14004a920
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 [0x14017044c]
mov r8d, 0x1000
xor edi, edi
mov r13d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x14004ab18
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 0x14004a992
test rbp, rbp
je 0x14004aa58
dec rbp
cmp qword [r14 + 8], 0
lea rsi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x14004a9b6
mov r8d, 2
mov rcx, r14
call fcn.14004a5d0
mov dword [rsp + 0x34], eax
jmp 0x14004a9d3
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 0x14004aa5c
test dx, dx
je 0x14004a9ee
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 0x14004aa34
mov rcx, qword [0x14017044c]
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 0x14004aa5c
mov edi, 0
test r12d, r12d
jne 0x14004a980
cmp dx, 0xd
je 0x14004aa61
cmp dx, 0xa
je 0x14004aa67
jmp 0x14004a980
lea rsi, [r14 + 8]
test r12d, r12d
jne 0x14004aa6b
cmp dx, 0xa
jne 0x14004aa96
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 0x14004ab1b
cmp dx, 0xd
jne 0x14004aa6b
sub rbx, 2
lea rdx, [rsp + 0x30]
cmp qword [rsi], 0
je 0x14004aac1
mov r8d, 2
mov rcx, r14
call fcn.14004a5d0
mov dword [rsp + 0x34], eax
xor edi, edi
jmp 0x14004aada
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 0x14004aa6d
cmp qword [rsi], 0
je 0x14004aaf2
add dword [r14 + 0x14], 2
jmp 0x14004aa6d
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 0x14004aa6d
mov rax, rdi
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x14004ab40
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 [0x14017044c]
mov r8d, r14d
xor edx, edx
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14004acda
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x14004aba9
test rdi, rdi
je 0x14004ac37
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.14004aed0
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x14004abc1
xor r8b, r8b
jmp 0x14004abc5
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 0x14004ac11
mov rcx, qword [0x14017044c]
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 0x14004ac37
test r15d, r15d
jne 0x14004ab97
cmp r8b, 0xd
je 0x14004ac40
cmp r8b, 0xa
jne 0x14004ab97
dec rbx
jmp 0x14004acc5
test r15d, r15d
jne 0x14004acc5
cmp r8b, 0xa
jne 0x14004ac4b
dec rbx
jmp 0x14004acc5
cmp r8b, 0xd
jne 0x14004acc5
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rsi + 8], 0
je 0x14004ac74
mov r8d, 1
mov rcx, rsi
call fcn.14004a5d0
mov dword [rsp + 0x34], eax
jmp 0x14004ac91
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 0x14004acc5
cmp qword [rsi + 8], 0
je 0x14004aca4
inc dword [rsi + 0x14]
jmp 0x14004acc5
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 0x14004ad00
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 0x14004adfa
cmp dword [rcx + 0x1c], 1
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], r15
jne 0x14004ad5b
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 0x14004adbc
mov eax, dword [rsi + 0x10]
mov edx, ebx
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rsi + 8]
sub edx, 1
je 0x14004adb4
sub edx, 1
je 0x14004adab
cmp edx, 2
je 0x14004ada4
mov r8, rbx
mov rdx, r14
call fcn.1400358d0
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 0x14004ad8a
movzx eax, word [r14]
mov word [rcx], ax
jmp 0x14004ad8a
movzx eax, byte [r14]
mov byte [rcx], al
jmp 0x14004ad8a
mov rcx, rsi
call fcn.140049860
mov eax, dword [rsi + 0x10]
mov rdx, r14
cmp ebx, eax
jl 0x14004adeb
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 0x14004ad90
sub eax, dword [rsi + 0x14]
mov r8, rbx
movsxd rcx, eax
add rcx, qword [rsi + 8]
jmp 0x14004ad85
movsxd rax, ebp
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret