joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140144a00
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.140139630
sub rsp, rax
mov rax, qword [0x140228078]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14014f9cc
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140144a4f
mov rax, rbp
jmp 0x140144b57
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, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x24bec0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1401534bc
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x24bec0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140144b53
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 0x140144b53
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1401534bc
test rax, rax
js 0x140144b53
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140144b53
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140144b45
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140144b45
cmp byte [rcx], 0xd
jne 0x140144b2b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140144b3a
cmp byte [rcx + 1], 0xa
jne 0x140144b3a
inc rcx
jmp 0x140144b3a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x228480]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140144b0d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140144b57
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140139600
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 0x14014d86c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14014d668
Function at 0x140153568
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, [0x14024bec0]
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 0x1401535bf
cmp word [rdx], r13w
jne 0x1401535bf
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1401535c4
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1401536e9
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14015370a
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1401535fd
mov rdx, r9
mov word [rbx], cx
jmp 0x140153624
cmp r9, r8
jae 0x140153634
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 0x1401535de
jmp 0x1401536e9
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 0x1401536de
cmp dword [rsp + 0x80], esi
je 0x1401536de
lea r8, [0x14024bec0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1401536b6
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140153686
mov word [rbx], r13w
jmp 0x1401536e6
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 0x140153693
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1401536e6
cmp word [rsp + 0x70], r13w
jne 0x1401536c3
cmp rbx, r14
je 0x140153680
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1401534c4
cmp word [rsp + 0x70], r13w
je 0x1401536e9
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, [0x14024bec0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1401536e3
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1401536e9
Function at 0x140155dbc
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140155dd2
mov al, 1
jmp 0x140155e32
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140155de3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140155e30
mov ecx, dword [rcx + 0x18]
nop
call fcn.14015af50
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140155e30
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140155e30
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140155e30
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140155e32
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14015a020
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14015a050
xor eax, eax
jmp 0x14015a113
mov rbp, rbx
cmp word [rax], si
je 0x14015a075
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14015a05c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14015a058
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1401560b4
movsxd r14, eax
test eax, eax
jne 0x14015a0b3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14015a049
mov rcx, r14
call fcn.140150548
mov rdi, rax
test rax, rax
jne 0x14015a0cc
xor ecx, ecx
call fcn.140150494
jmp 0x14015a0a8
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1401560b4
test eax, eax
jne 0x14015a0fd
mov rcx, rdi
call fcn.140150494
jmp 0x14015a107
xor ecx, ecx
call fcn.140150494
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x14015a130
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
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14015a1b7
mov rsi, rbx
cmp word [rax], bp
je 0x14015a176
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14015a160
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14015a15c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140150548
mov rdi, rax
test rax, rax
je 0x14015a1a4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14013b040
mov rbp, rdi
xor ecx, ecx
call fcn.140150494
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14015d4a4
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14014fec0
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14015d545
cmp ebx, dword [rsp + 0x30]
je 0x14015d53e
test esi, esi
je 0x14015d53e
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14015d519
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14015d526
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14015d503
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14015d52a
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14015d547
mov eax, 1
jmp 0x14015d547
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1401618a4
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140145a58
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14016192e
cmp byte [rbp - 0x21], r15b
je 0x140161929
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140161964
call fcn.140152768
test eax, eax
jne 0x140161950
cmp byte [rbp - 0x21], r15b
je 0x140161948
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140161964
cmp byte [rbp - 0x21], r15b
je 0x140161961
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1401467fc
test eax, eax
jne 0x140161a04
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140145a58
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1401619a3
cmp byte [rbp - 0x21], r15b
je 0x1401619d8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1401619d8
call fcn.140152768
test eax, eax
jne 0x1401619c4
cmp byte [rbp - 0x21], r15b
je 0x1401619bd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1401619d8
cmp byte [rbp - 0x21], r15b
je 0x1401619d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1401467fc
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140161a04
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140161a07
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140161a15
mov rcx, rdi
call fcn.140150494
cmp byte [rbp + 0x3f], r15b
je 0x140161a24
mov rcx, qword [rbp + 0x27]
call fcn.140150494
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x14016265c
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1401534c4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1401534c4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1401627ac
cmp rax, 0xffffffffffffffff
je 0x1401627ac
xor edi, edi
test rbp, rbp
jle 0x140162757
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1401504d0
mov rbx, rax
test rax, rax
jne 0x1401626e4
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14016274d
mov edx, 0x8000
mov ecx, r14d
call fcn.14014d8e8
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1401559bc
cmp eax, 0xffffffff
je 0x14016272d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1401626f4
mov edx, r15d
mov ecx, r14d
call fcn.14014d8e8
jmp 0x14016274d
cmp byte [rsi + 0x38], dil
je 0x140162744
cmp dword [rsi + 0x34], 5
jne 0x140162744
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14016274d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140150494
jmp 0x1401627c0
jns 0x1401627c0
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1401534c4
cmp rax, 0xffffffffffffffff
jne 0x140162778
cmp byte [rsi + 0x30], dil
je 0x1401627c0
mov edi, dword [rsi + 0x2c]
jmp 0x1401627c0
mov ecx, r14d
call fcn.14015af50
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1401627c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1401627c0
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1401627b9
mov eax, dword [rsi + 0x2c]
jmp 0x1401627be
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1401534c4
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140163080
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1401630a8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1401630a8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x140001930
Capabilities:
Enumerate gui resources

Disassembly:
sub rsp, 0x28
xor r8d, r8d
lea rdx, [0x1400011c0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_EnumResourceTypesW]
xor eax, eax
add rsp, 0x28
ret
Function at 0x401c40
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x58
mov eax, 1
xchg byte [0x00ea6100], al
test al, al
je 0x401c5f
lea rcx, [0x00ea6100]
call fcn.00438d60
movzx eax, byte [0x00ea6101]
test al, al
je 0x401c80
mov byte [0x00ea6100], 0
add rsp, 0x58
ret
lea rdx, [0x00f27148]
lea rcx, [0x00f27170]
mov rax, rdx
mov byte [rax], 0
add rax, 1
cmp rax, rcx
jne 0x401c91
lea rax, [0x00f27148]
xor ecx, ecx
pxor xmm0, xmm0
mov qword [0x00f27148], rax
mov qword [0x00f27150], rax
lea rax, [0x00ea6140]
mov r8, rax
add rcx, 1
movaps xmmword [r8], xmm0
add r8, 0x10
cmp rcx, 0x4000
jne 0x401cc2
mov byte [0x00ee6140], 0
xor ecx, ecx
pxor xmm0, xmm0
add rcx, 1
movaps xmmword [rax + 0x40040], xmm0
add rax, 0x10
cmp rcx, 0xd8
jne 0x401ce4
lea rax, [0x00ee6f00]
mov byte [rax], 0
add rax, 1
cmp rax, rdx
jne 0x401d03
mov rax, qword [0x0066e0f8]
test rax, rax
jne 0x401d31
lea rcx, [rsp + 0x20]
call qword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x24]
mov qword [0x0066e0f8], rax
mov qword [0x00ee6f00], rax
lea rax, [0x00ee6f10]
mov qword [0x00ee6f08], rax
mov byte [0x00ea6101], 1
mov byte [0x00ea6100], 0
add rsp, 0x58
ret
Function at 0x40d6b0
Capabilities:
Get system information on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rax, qword [0x0060e220]
mov rsi, rcx
lea rcx, [rax - 1]
test rax, rcx
jne 0x40d784
lea rbx, [rdx + rcx]
neg rax
mov rdx, qword [rsi]
and rbx, rax
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, rbx
jge 0x40d74b
mov rax, qword [0x0066e0f8]
test rax, rax
je 0x40d790
lea rdi, [rax - 1]
test rdi, rax
jne 0x40d784
lea rdx, str.Allocate
neg rax
add rdi, rbx
and rdi, rax
mov rcx, rdi
call fcn.0040d590
mov r8, qword [0x00e988d0]
lea rdx, [rax + rdi]
mov qword [rsi + 8], rax
mov qword [rsi], rdx
test r8, r8
je 0x40d743
mov rdx, rdi
mov rcx, rax
call r8
mov rdx, qword [rsi]
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rbx, rdx
jg 0x40d760
add rbx, rax
mov qword [rsi + 8], rbx
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
lea r8, str.__allocated_end____allocated_current_____sptr_size______0_
xor r9d, r9d
mov edx, 0x1b33
mov qword [rsp + 0x20], 0
lea rcx, str.gotsan.cpp
call fcn.00406990
call fcn.0040b4c0
nop dword [rax]
lea rcx, [rsp + 0x30]
call qword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x34]
mov qword [0x0066e0f8], rax
jmp 0x40d6f7
Function at 0x40e930
Capabilities:
Get system information on windows
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rbx, qword [0x0066e0f8]
mov r12, qword [rsp + 0xf0]
test rbx, rbx
mov qword [rsp + 0xd0], rcx
mov rbp, rdx
mov rsi, r9
mov qword [rsp + 0xe0], r8
je 0x40eb30
mov r13, qword [sym.imp.kernel32.dll_ReadFile]
lea r14, [rsp + 0x50]
cmp r12, rbx
cmovbe rbx, r12
mov rax, qword [rsp + 0xe0]
mov rcx, qword [rbp]
mov rdx, qword [rax]
call fcn.0040e7f0
xor ecx, ecx
mov r9d, 4
mov rdx, rbx
mov r8d, 0x3000
call qword [sym.imp.kernel32.dll_VirtualAlloc]
test rax, rax
je 0x40ebb7
mov qword [rbp], rax
mov rax, qword [rsp + 0xe0]
xor r9d, r9d
mov r8d, 7
mov edx, 0x80000000
mov rcx, qword [rsp + 0xd0]
mov qword [rax], rbx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.kernel32.dll_CreateFileA]
cmp rax, 1
mov rdi, rax
je 0x40eb50
cmp rax, 2
je 0x40eb74
cmp qword [rsp + 0xf8], 0
setne r15b
cmp rax, 0xffffffffffffffff
sete al
test al, r15b
jne 0x40eae1
cmp rdi, 0xffffffffffffffff
je 0x40eaf1
mov qword [rsi], 0
xor ecx, ecx
jmp 0x40ea6b
test eax, eax
mov r8d, dword [rsp + 0x50]
je 0x40eaac
mov rcx, r8
add rcx, qword [rsi]
cmp r12, rcx
mov qword [rsi], rcx
sete dl
test r8, r8
sete al
or al, dl
jne 0x40eba0
cmp rbx, rcx
jbe 0x40eb10
mov r8d, ebx
mov rdx, rcx
mov r9, r14
add rdx, qword [rbp]
mov qword [rsp + 0x20], 0
sub r8d, ecx
mov rcx, rdi
call r13
test eax, eax
jne 0x40ea45
test r15b, r15b
je 0x40ea45
call qword [sym.imp.kernel32.dll_GetLastError]
mov rsi, qword [rsp + 0xf8]
mov dword [rsi], eax
mov rax, qword [rsp + 0xe0]
mov rcx, qword [rbp]
mov rdx, qword [rax]
call fcn.0040e7f0
mov rcx, rdi
call qword [sym.imp.kernel32.dll_CloseHandle]
xor edx, edx
mov eax, edx
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.kernel32.dll_GetLastError]
mov rdi, qword [rsp + 0xf8]
mov dword [rdi], eax
mov rax, qword [rsp + 0xe0]
mov rcx, qword [rbp]
mov rdx, qword [rax]
call fcn.0040e7f0
xor edx, edx
jmp 0x40eacb
add rbx, rbx
mov rcx, rdi
call qword [sym.imp.kernel32.dll_CloseHandle]
cmp r12, rbx
cmovbe rbx, r12
jmp 0x40e984
lea rcx, [rsp + 0x50]
call qword [sym.imp.kernel32.dll_GetSystemInfo]
mov ebx, dword [rsp + 0x54]
mov qword [0x0066e0f8], rbx
jmp 0x40e971
lea r8, str.__res_____fd_t_1_____fd_t_1_____fd_t__1_______0_
xor r9d, r9d
mov edx, 0x2564
mov qword [rsp + 0x20], 0
lea rcx, str.gotsan.cpp
call fcn.00406990
lea r8, str.__res_____fd_t_2_____fd_t_2_____fd_t__1_______0_
xor r9d, r9d
mov edx, 0x2565
mov qword [rsp + 0x20], 0
lea rcx, str.gotsan.cpp
call fcn.00406990
nop dword [rax + rax]
mov byte [rsp + 0x4f], al
mov rcx, rdi
call qword [sym.imp.kernel32.dll_CloseHandle]
movzx edx, byte [rsp + 0x4f]
jmp 0x40eacb
call qword [sym.imp.kernel32.dll_GetLastError]
mov dword [rsp + 0x20], 0
lea r8, str.allocate
mov rcx, rbx
lea rdx, str.ReadFileToBuffer
mov r9d, eax
call fcn.0040d4f0
nop
nop
Function at 0x4598c0
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x459a66
sub rsp, 0x50
mov qword [rsp + 0x48], rbp
lea rbp, [rsp + 0x48]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rbx
mov rcx, qword [sym.imp.kernel32.dll_VirtualFree_1]
mov qword [rsp], rcx
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x4000
call fcn.00475a40
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x20], 0
jne 0x45992b
mov rax, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
jmp 0x459940
mov rbp, qword [rsp + 0x48]
add rsp, 0x50
ret
sub rcx, rbx
add rax, rbx
mov rbx, rcx
nop
test rbx, rbx
jbe 0x459965
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x40], rax
mov rcx, rbx
jmp 0x459979
cmp rbx, 0x1000
jae 0x459935
nop dword [rax]
jmp 0x4599e9
mov rbp, qword [rsp + 0x48]
add rsp, 0x50
ret
shr rbx, 1
and rbx, 0xfffffffffffff000
mov qword [rsp + 0x38], rbx
nop
cmp rbx, 0x1000
jae 0x45998d
xor edx, edx
jmp 0x4599e0
mov rcx, qword [sym.imp.kernel32.dll_VirtualFree_1]
mov qword [rsp], rcx
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x4000
call fcn.00475a40
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x20], 0
sete al
mov rcx, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x38]
mov edx, eax
mov rax, qword [rsp + 0x40]
nop dword [rax]
test dl, dl
jne 0x45996f
jmp 0x459954
call fcn.004a7760
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov eax, dword [rsp]
mov qword [rsp + 0x30], rax
call fcn.0047a020
lea rax, [0x00538002]
mov ebx, 0x18
call fcn.0047a920
mov rax, qword [rsp + 0x38]
call fcn.0047a620
lea rax, [0x005380c2]
mov ebx, 0x19
call fcn.0047a920
mov rax, qword [rsp + 0x30]
nop
call fcn.0047a620
call fcn.0047a280
call fcn.0047a0a0
lea rax, [0x0053a362]
mov ebx, 0x21
nop dword [rax + rax]
call fcn.004786e0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call fcn.004a3500
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
nop
jmp fcn.004598c0
Function at 0x459aa0
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x459cca
sub rsp, 0x58
mov qword [rsp + 0x50], rbp
lea rbp, [rsp + 0x50]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rbx
mov rcx, qword [sym.imp.kernel32.dll_VirtualAlloc_1]
mov qword [rsp], rcx
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x1000
mov qword [rsp + 0x20], 4
call fcn.00475ac0
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov rax, qword [rsp + 0x60]
mov rcx, rax
cmp qword [rsp + 0x28], rax
je 0x459b19
mov rbx, qword [rsp + 0x68]
mov rax, rbx
jmp 0x459b2c
mov rbp, qword [rsp + 0x50]
add rsp, 0x58
ret
sub rdx, rbx
add rcx, rbx
mov rbx, rdx
test rbx, rbx
jbe 0x459b50
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rcx
mov rdx, rbx
nop
jmp 0x459b64
cmp rbx, 0x1000
jae 0x459b23
jmp 0x459be5
mov rbp, qword [rsp + 0x50]
add rsp, 0x58
ret
shr rbx, 1
and rbx, 0xfffffffffffff000
mov qword [rsp + 0x38], rbx
cmp rbx, 0x1000
jae 0x459b76
xor esi, esi
jmp 0x459bd6
mov rax, qword [sym.imp.kernel32.dll_VirtualAlloc_1]
mov qword [rsp], rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x1000
mov qword [rsp + 0x20], 4
nop dword [rax]
call fcn.00475ac0
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x28], 0
sete al
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
mov esi, eax
mov rax, qword [rsp + 0x68]
test sil, sil
jne 0x459b5a
nop
jmp 0x459b42
call fcn.004a7760
xorps xmm15, xmm15
mov r14, qword [0x00669050]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov eax, dword [rsp]
mov dword [rsp + 0x34], eax
cmp eax, 8
jne 0x459c65
call fcn.0047a020
lea rax, [0x00538491]
mov ebx, 0x19
call fcn.0047a920
mov rax, qword [rsp + 0x68]
call fcn.0047a620
lea rax, [0x005380c2]
mov ebx, 0x19
call fcn.0047a920
mov eax, dword [rsp + 0x34]
nop dword [rax]
call fcn.0047a620
call fcn.0047a280
call fcn.0047a0a0
lea rax, [0x0053504c]
mov ebx, 0xd
nop dword [rax + rax]
call fcn.004786e0
cmp eax, 0x5af
je 0x459c08
call fcn.0047a020
lea rax, [0x00538491]
mov ebx, 0x19
nop dword [rax]
call fcn.0047a920
mov rax, qword [rsp + 0x38]
call fcn.0047a620
lea rax, [0x005380c2]
mov ebx, 0x19
nop dword [rax + rax]
call fcn.0047a920
mov eax, dword [rsp + 0x34]
call fcn.0047a620
call fcn.0047a280
call fcn.0047a0a0
lea rax, [0x00539c55]
mov ebx, 0x1f
call fcn.004786e0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call fcn.004a3500
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp fcn.00459aa0