joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402770
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
mov ebx, dword [rsp + 0x1e0]
mov r14d, dword [rsp + 0x1e8]
lea rsi, [rsp + 0x60]
mov r12, rcx
mov rdi, r8
mov rcx, rsi
mov r13d, r9d
call sub.msvcrt.dll_strcpy
mov rdx, rsi
mov ecx, dword [rdx]
add rdx, 4
lea eax, [rcx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4027ab
lea r15, [rsp + 0x30]
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea rcx, [rdx + 2]
cmove rdx, rcx
mov ecx, eax
add cl, al
sbb rdx, 3
sub rdx, rsi
lea rcx, [rsi + rdx + 1]
mov byte [rsi + rdx], 0x2f
mov rdx, rdi
call sub.msvcrt.dll_strcpy
mov rdx, r15
mov rcx, rsi
call fcn.00404220
test eax, eax
je 0x4028b5
cmp ebx, 0xfa000
mov ebp, 0xfa000
cmovle ebp, ebx
mov ecx, ebp
call sub.msvcrt.dll_malloc
mov ecx, dword [r12]
xor r8d, r8d
mov edx, r13d
mov rdi, rax
call sub.msvcrt.dll__lseek
mov r8d, 0x1ff
mov edx, 0x8302
mov rcx, rsi
mov dword [rsp + 0x2c], eax
call sub.msvcrt.dll__open
cmp eax, 0xffffffff
mov r13d, eax
je 0x402900
test ebx, ebx
jne 0x402878
jmp 0x4028a6
mov r8d, r15d
mov rdx, rdi
mov ecx, r13d
call sub.msvcrt.dll__write
cmp eax, 0xffffffff
je 0x4028d0
sub ebx, r15d
je 0x4028df
mov ecx, dword [r12]
cmp ebp, ebx
mov r8d, ebx
mov rdx, rdi
cmovle r8d, ebp
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
mov r15d, eax
je 0x4028df
test r14d, r14d
je 0x402860
mov edx, eax
mov rcx, rdi
call fcn.00402680
jmp 0x402860
mov ecx, eax
call sub.msvcrt.dll__close
mov rcx, rdi
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.ERROR:_Cant_write_to__s_n
mov rdx, rsi
call fcn.00401cd0
mov ecx, r13d
call sub.msvcrt.dll__close
mov rcx, rdi
call sub.msvcrt.dll_free
test ebx, ebx
je 0x4028b5
mov eax, 0xfffffffe
jmp 0x4028b7
mov rdx, r15
mov rcx, rsi
call fcn.00404220
test eax, eax
jne 0x402923
mov edx, dword [rsp + 0x2c]
xor r8d, r8d
mov ecx, dword [r12]
add edx, ebx
call sub.msvcrt.dll__lseek
jmp 0x4028e7
lea rcx, str.ERROR:_Cant_create__s_n
mov rdx, rsi
call fcn.00401cd0
cmp dword [0x00405024], 0
jne 0x402945
mov ecx, 1
call sub.msvcrt.dll_exit
lea rcx, str.SERVER_SOFTWARE
call sub.msvcrt.dll_getenv
test rax, rax
je 0x40293b
lea rcx, str._br_Try_building_your_application_with_a__tiny_option_n
mov dword [0x00405024], 0
call fcn.00401cd0
jmp 0x40293b
Function at 0x402970
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rdi, rcx
mov ebp, edx
mov ebx, r8d
lea ecx, [r8 + 1]
mov r12d, r9d
movsxd rcx, ecx
call sub.msvcrt.dll_malloc
test rax, rax
mov rsi, rax
je 0x4029c2
mov ecx, dword [rdi]
xor r8d, r8d
movsxd rax, ebx
mov edx, ebp
mov byte [rsi + rax], 0
call sub.msvcrt.dll__lseek
mov ecx, dword [rdi]
mov r8d, ebx
mov rdx, rsi
call sub.msvcrt.dll__read
cmp ebx, eax
jne 0x4029d0
test r12d, r12d
jne 0x4029e9
mov rax, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov r9d, ebx
mov r8d, ebp
mov edx, ebp
lea rcx, str.P2X:_IO_error_1_pos_ld__08lx___size_ld_n
call sub.msvcrt.dll_printf
test r12d, r12d
je 0x4029c2
mov edx, ebx
mov rcx, rsi
call fcn.00402680
mov rax, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x403280
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00409784]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x403408
mov rax, qword [0x00409788]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4032cc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x403355
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4032b0
mov rcx, rbx
call fcn.00403f20
test rax, rax
mov r12, rax
je 0x40343d
mov rax, qword [0x00409788]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00404050
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00409788]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x403420
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40334e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4033b0
add dword [0x00409784], 1
cmp edi, 8
jae 0x403383
test dil, 4
jne 0x4033f4
test edi, edi
je 0x403378
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40340f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x403378
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40339c
jmp 0x403378
add rsi, qword [0x00409788]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40334e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00404740
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x403378
xor esi, esi
jmp 0x4032d7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x403378
mov rax, qword [0x00409788]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00404740
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00404740
nop
nop dword [rax]

Function at 0x403b90
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00409a60]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00409a40]
test rbx, rbx
je 0x403be4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x403bdb
test rsi, rsi
je 0x403bdb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x403bc0
lea rcx, [0x00409a60]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x403f20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00406760]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x403f8d
mov rcx, r8
call fcn.00403e00
test eax, eax
je 0x403f8d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x403f8d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x403f84
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403f8f
add rax, 0x28
cmp rax, r9
jne 0x403f70
xor eax, eax
add rsp, 0x28
ret

Function at 0x404740
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.004045a0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.004045a0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140001480
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140065e20]
mov dword [rax], 1
mov rax, qword [0x140065e30]
mov dword [rax], 1
mov rax, qword [0x140065e40]
mov dword [rax], 1
mov rax, qword [0x140065e10]
mov dword [rax], 1
mov rax, qword [0x140065ca0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014de
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14000150a
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x140001530
cmp eax, 0x20b
je 0x140001557
jmp 0x140001586
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001543
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001572
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400023a7
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x28
xor r8d, r8d
mov r13, rcx
mov r12, rdx
test rdx, rdx
je 0x1400023c8
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov r8, rax
mov rcx, r12
mov r9, r13
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, r13
add rsp, 0x28
pop r12
pop r13
jmp fcn.14000ef98
Function at 0x140004bb3
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov dword [rsp + 0x110], r8d
lea r8, [rsp + 0x30]
mov rbx, rcx
mov rbp, rdx
mov rcx, r8
mov edx, pe_nt_image_headers64
call fcn.1400024dd
test rbx, rbx
jne 0x140004bf3
xor r12d, r12d
jmp 0x140004d99
cmp word [rbx], 0x5a4d
jne 0x140004beb
movsxd rsi, dword [rbx + 0x3c]
add rsi, rbx
cmp dword [rsi], 0x4550
jne 0x140004beb
test byte [rsi + 0x17], 0x20
je 0x140004beb
add rsi, 0x88
mov ecx, 0x20
mov rdi, r8
rep movsd dword [rdi], dword [rsi]
cmp dword [rsp + 0x34], 0
je 0x140004beb
movsxd rsi, dword [rsp + 0x30]
test esi, esi
je 0x140004beb
mov edx, 0x17484818
lea rcx, [0x140011740]
add rsi, rbx
call fcn.140004b1e
mov edx, 0x662e1458
mov rcx, rax
call fcn.140004b6f
movsxd r12, dword [rsi + 0x1c]
movsxd rax, dword [rsi + 0x20]
xor ecx, ecx
mov edx, 0x3ec97dc8
mov r13d, dword [rsi + 0x18]
add r12, rbx
mov r15d, dword [rax + rbx]
movsxd rdi, dword [r12]
mov r14, r12
call fcn.140004b1e
mov rcx, rax
call fcn.1400017e0
mov rcx, rbp
mov rdx, rax
call fcn.14000341f
test al, al
je 0x140004c9c
movsxd rax, dword [r12 - 4]
lea r12, [rax + rbx]
jmp 0x140004d88
mov dword [rsp + 0x2c], 0
cmp r13d, dword [rsp + 0x2c]
jl 0x140004d85
movsxd r9, r15d
xor edx, edx
lea r8, [0x140011175]
lea r12, [r9 + rbx]
mov rcx, r12
call qword [0x14006ae40]
test rax, rax
jne 0x140004cd6
add r14, 4
movsxd rsi, dword [r14]
jmp 0x140004cdc
inc r13d
movsxd rsi, edi
mov eax, 1
test r12, r12
je 0x140004cf0
mov rcx, r12
call sub.msvcrt.dll_strlen
inc eax
mov rdx, r12
mov rcx, rbp
add r15d, eax
call fcn.14000341f
test al, al
jne 0x140004d0b
inc dword [rsp + 0x2c]
movsxd rdi, esi
jmp 0x140004ca4
mov edx, 0x328a0688
lea rcx, [0x140011720]
lea r12, [rdi + rbx]
call fcn.140004b6f
mov edx, 0x17484818
lea rcx, [0x1400116e0]
call fcn.140004b6f
mov edx, 0x3ec97dc8
lea rcx, [0x1400116c0]
call fcn.140004b6f
mov edx, 0x1f3101d8
lea rcx, [0x140011680]
call fcn.140004b6f
mov edx, 0x7225e708
lea rcx, [0x140011640]
call fcn.140004b6f
mov edx, 0x39aab198
lea rcx, [0x140011620]
call fcn.140004b6f
cmp dword [rsp + 0x110], 0
je 0x140004d88
lea r12, [rsi + rbx]
jmp 0x140004d88
xor r12d, r12d
mov edx, 0x5fb59248
lea rcx, [0x140011540]
call fcn.140004b6f
mov rax, r12
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140008560
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.14000f6b0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.14000f6b0
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x140009192
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14007bda8]
test eax, eax
je 0x14000922a
lea rax, [0x14007bd80]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14007bdb0]
mov qword [rbp - 8], rax
jmp 0x14000920e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140009202
cmp qword [rbp - 0x10], 0
je 0x140009202
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400091c8
lea rax, [0x14007bd80]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000922b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140009330
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140009358
mov eax, 0
jmp 0x1400093a6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140009381
mov eax, 0
jmp 0x1400093a6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400093a1
mov eax, 0
jmp 0x1400093a6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400093ac
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14000942a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140009421
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140009421
mov rax, qword [rbp - 8]
jmp 0x14000943f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x1400093f4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x180001070
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
test edx, edx
je 0x1800010a8
cmp edx, 1
jne 0x1800010a8
xor eax, eax
lea r8, [method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_40]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x1800338d0], rbx
mov eax, 1
add rsp, 0x30
pop rbx
ret
Function at 0x180002950
Capabilities:
Read file on windows

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x20
mov r15, r8
mov r14, rdx
mov rbx, rcx
test r8, r8
jg 0x180002974
xor eax, eax
add rsp, 0x20
pop r15
pop r14
pop rbx
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rdi
je 0x180002a02
mov rdi, r15
mov qword [rsp + 0x40], rbp
lea rsi, [rcx + 0x50]
mov rax, qword [rbx + 0x38]
mov rdx, qword [rax]
test rdx, rdx
je 0x1800029d0
mov rax, qword [rsi]
movsxd rcx, dword [rax]
test ecx, ecx
jle 0x1800029d0
cmp rdi, rcx
mov rbp, rdi
cmovge rbp, rcx
mov rcx, r14
mov r8, rbp
call fcn.18001fe30
mov rax, qword [rsi]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x1800029ed
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x1800029f5
mov byte [r14], al
lea rsi, [rbx + 0x50]
dec rdi
mov ebp, 1
add r14, rbp
test rdi, rdi
jg 0x180002991
mov rbp, qword [rsp + 0x40]
sub r15, rdi
jmp 0x180002ae0
mov rax, qword [rcx + 0x38]
mov rsi, r15
mov rdx, qword [rax]
test rdx, rdx
je 0x180002a19
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x180002a1b
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x180002a4d
cmp rax, r15
mov rdi, r15
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call fcn.18001fe30
mov rax, qword [rbx + 0x50]
add r14, rdi
sub rsi, rdi
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x180002add
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x180002a88
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp rsi, 0xfff
jbe 0x180002abe
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call fcn.18000ce28
add r14, rax
sub rsi, rax
cmp rax, 0xfff
jne 0x180002add
cmp rsi, rax
ja 0x180002a91
test rsi, rsi
je 0x180002add
mov r9, qword [rbx + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.18000ce28
sub rsi, rax
sub r15, rsi
mov rsi, qword [rsp + 0x48]
mov rax, r15
mov rdi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rbx
ret
Function at 0x18000ef10
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x18000ef7f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18000ef7f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18000ef7f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18000ef7f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18000ef7f
cmp dword [rcx + 0x84], 0xe
jbe 0x18000ef7f
cmp dword [rcx + 0xf8], 0
je 0x18000ef7f
mov ecx, ebx
call fcn.18000f030
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.18000ee0c
nop
cmp dword [rbp + 0x20], 0
je 0x18000efcd
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.18000efd8
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x18000ef10

Function at 0x18001073c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x180010752
mov al, 1
jmp 0x1800107b2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x180010763
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1800107b0
mov ecx, dword [rcx + 0x18]
nop
call fcn.18001a018
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1800107b0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1800107b0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1800107b0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1800107b2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x180014d60
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.180006450
sub rsp, rax
mov rax, qword [0x180031080]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.18001061c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x180014daf
mov rax, rbp
jmp 0x180014eb7
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x33160]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180015cac
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x33160]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180014eb3
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180014eb3
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180015cac
test rax, rax
js 0x180014eb3
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180014eb3
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180014ea5
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180014ea5
cmp byte [rcx], 0xd
jne 0x180014e8b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x180014e9a
cmp byte [rcx + 1], 0xa
jne 0x180014e9a
inc rcx
jmp 0x180014e9a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x314a0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x180014e6d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180014eb7
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180005bf0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x18001504c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x180033160]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1800150a3
cmp word [rdx], r13w
jne 0x1800150a3
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1800150a8
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1800151cd
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1800151ee
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1800150e1
mov rdx, r9
mov word [rbx], cx
jmp 0x180015108
cmp r9, r8
jae 0x180015118
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1800150c2
jmp 0x1800151cd
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800151c2
cmp dword [rsp + 0x80], esi
je 0x1800151c2
lea r8, [0x180033160]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x18001519a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x18001516a
mov word [rbx], r13w
jmp 0x1800151ca
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x180015177
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1800151ca
cmp word [rsp + 0x70], r13w
jne 0x1800151a7
cmp rbx, r14
je 0x180015164
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.180015cb4
cmp word [rsp + 0x70], r13w
je 0x1800151cd
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x180033160]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1800151c7
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1800151cd