joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140007260
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x20
lea rbp, [rsp + 0x20]
mov rax, rdx
mov rsi, qword [rbp + 0x70]
mov rdi, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov ebx, ecx
shr ebx, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov r15, rax
movzx r14d, byte [rax + 1]
add rax, 2
lea r10, [r11 + r14]
cmp byte [r15], bl
jne 0x1400072e0
cmp r11, r10
ja 0x140007357
cmp r10, rdx
ja 0x140007369
add r11, r9
xor r15d, r15d
nop dword [rax + rax]
cmp r14, r15
je 0x1400072e2
lea r12, [r15 + 1]
cmp byte [r11 + r15], cl
mov r15, r12
jne 0x1400072c0
jmp 0x140007344
ja 0x1400072ea
mov r11, r10
cmp rax, r8
jne 0x14000728e
add rsi, rdi
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r8, [rdi + 1]
movzx edx, byte [rdi]
test dl, dl
js 0x140007320
mov rdi, r8
sub ecx, edx
jns 0x14000733b
jmp 0x140007346
cmp r8, rsi
je 0x140007378
movzx r8d, byte [rdi + 1]
add rdi, 2
and edx, 0x7f
shl edx, 8
or edx, r8d
sub ecx, edx
js 0x140007346
xor al, 1
cmp rdi, rsi
jne 0x140007300
jmp 0x140007346
xor eax, eax
and al, 1
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
lea r8, str._U2_
mov rcx, r11
mov rdx, r10
call fcn.140005370
lea r8, str._U2_
mov rcx, r10
call fcn.140004860
lea rcx, str.librarycore_srcunicodeprintable.rs
call fcn.140005d60
int3

Function at 0x14000d860
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rbp, rsp
mov rax, rdx
sub rdx, rcx
cmp rdx, 0x20
jae 0x14000d885
cmp rax, rcx
je 0x14000d88b
cmp rdx, 4
jae 0x14000d892
xor eax, eax
xor r8d, r8d
jmp 0x14000d930
pop rbp
jmp fcn.140004380
xor eax, eax
jmp 0x14000d947
mov r8d, edx
and r8d, 0x1c
pxor xmm0, xmm0
xor eax, eax
movdqa xmm2, xmmword [0x140045420]
movdqa xmm3, xmmword [0x140045430]
pxor xmm1, xmm1
nop word cs:[rax + rax]
movzx r9d, word [rcx + rax]
movd xmm4, r9d
movzx r9d, word [rcx + rax + 2]
movd xmm5, r9d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rax, 4
cmp r8, rax
jne 0x14000d8c0
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rax, xmm0
cmp r8, rdx
je 0x14000d947
nop dword [rax]
xor r9d, r9d
cmp byte [rcx + r8], 0xc0
setge r9b
add rax, r9
inc r8
cmp rdx, r8
jne 0x14000d930
pop rbp
ret
Function at 0x14000e920
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r14
push rsi
push rdi
push rbx
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov r10, qword [rcx]
test r10, r10
je 0x14000e9a4
mov r11, qword [rcx + 8]
mov r8, qword [rcx + 0x10]
cmp r8, r11
jae 0x14000e9a4
movzx eax, byte [r10 + r8]
cmp eax, 0x49
mov rbx, rcx
je 0x14000e9bd
cmp eax, 0x42
jne 0x14000e9a4
lea rsi, [r8 + 1]
mov qword [rcx + 0x10], rsi
mov r9b, 1
cmp rsi, r11
jae 0x14000eaed
cmp byte [r10 + rsi], 0x5f
jne 0x14000ea7c
lea rax, [r8 + 2]
mov qword [rcx + 0x10], rax
xor eax, eax
cmp rax, r8
jae 0x14000eaed
mov edx, dword [rcx + 0x18]
inc edx
cmp edx, 0x1f4
jbe 0x14000eb47
mov dil, 1
xor r9d, r9d
jmp 0x14000eaef
xor edx, edx
call fcn.14000a460
mov esi, eax
add sil, sil
mov eax, esi
add rsp, 0x40
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
inc r8
mov qword [rcx + 0x10], r8
xor edx, edx
call fcn.14000a460
test al, al
jne 0x14000eb2d
mov rdx, rbx
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x14000e9fc
lea rdx, [0x14032641b]
mov r8d, 1
call fcn.1400048e0
mov rdx, rbx
test al, al
jne 0x14000eb2d
mov rax, qword [rdx]
mov sil, 1
test rax, rax
je 0x14000e9b0
xor r14d, r14d
lea rdi, [0x140326771]
nop word cs:[rax + rax]
mov rcx, qword [rdx + 0x10]
cmp rcx, qword [rdx + 8]
jae 0x14000ea34
cmp byte [rax + rcx], 0x45
je 0x14000eb80
sub r14, 1
jb 0x14000ea5c
mov rcx, qword [rdx + 0x20]
test rcx, rcx
je 0x14000ea5c
mov r8d, 2
mov rdx, rdi
call fcn.1400048e0
mov rdx, rbx
test al, al
jne 0x14000eb2d
mov rcx, rdx
call fcn.14000bcc0
test al, al
jne 0x14000eb2d
mov rdx, rbx
mov rax, qword [rbx]
test rax, rax
jne 0x14000ea20
jmp 0x14000e9b0
xor eax, eax
mov r14d, 0x3e
nop word cs:[rax + rax]
movzx edx, byte [r10 + rsi]
cmp dl, 0x5f
je 0x14000eadd
lea edi, [rdx - 0x30]
cmp dil, 0xa
jb 0x14000eabf
lea edi, [rdx - 0x61]
cmp dil, 0x1a
jae 0x14000eab1
add dl, 0xa9
jmp 0x14000eabd
lea edi, [rdx - 0x41]
cmp dil, 0x1a
jae 0x14000eaed
add dl, 0xe3
mov edi, edx
inc rsi
mov qword [rcx + 0x10], rsi
mul r14
jo 0x14000eaed
movzx edx, dil
xor edi, edi
add rax, rdx
jb 0x14000eaef
cmp rsi, r11
jb 0x14000ea90
jmp 0x14000eaef
inc rsi
mov qword [rcx + 0x10], rsi
inc rax
jne 0x14000e97f
xor edi, edi
mov rax, qword [rcx + 0x20]
test rax, rax
je 0x14000eb35
mov ecx, r9d
xor cl, 1
movzx ecx, cl
lea r8, [rcx + rcx*8]
add r8, 0x10
lea rcx, str.invalid_syntaxrecursion_limit_reached_for_______::closureshim_as__mut_const___dyn___unsafe_extern__
lea rdx, [0x140326750]
test r9b, r9b
cmovne rdx, rcx
mov rcx, rax
call fcn.1400048e0
mov rcx, rbx
test al, al
je 0x14000eb35
mov sil, 2
jmp 0x14000e9b0
mov qword [rcx], 0
mov byte [rcx + 8], dil
xor esi, esi
jmp 0x14000e9b0
cmp qword [rcx + 0x20], 0
je 0x14000eb40
movups xmm0, xmmword [rcx]
movups xmm1, xmmword [rcx + 0x10]
movaps xmmword [rbp - 0x10], xmm1
movaps xmmword [rbp - 0x20], xmm0
mov qword [rcx + 0x10], rax
mov dword [rcx + 0x18], edx
mov rsi, rcx
call fcn.14000e920
movaps xmm0, xmmword [rbp - 0x20]
movaps xmm1, xmmword [rbp - 0x10]
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm1
jmp 0x14000e9b2
inc rcx
mov qword [rdx + 0x10], rcx
jmp 0x14000e9b0
Function at 0x140011770
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
sub rsp, 0xa8
lea rbp, [rsp + 0x80]
mov rsi, rcx
movups xmm0, xmmword [0x140329608]
movaps xmmword [rbp], xmm0
mov eax, 0xffffffff
cmp r8, rax
cmovb rax, r8
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rdx
mov rax, rbp
mov qword [rsp + 0x20], rax
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x1400117df
mov rcx, rsi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rbp]
cmp eax, 0x103
je 0x14001180b
test eax, eax
js 0x1400117eb
mov rdx, qword [rbp + 8]
xor eax, eax
jmp 0x140011801
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov eax, 1
add rsp, 0xa8
pop rsi
pop rbp
ret
mov dword [rbp + 0x18], 0
mov byte [rbp + 0x1c], 0
lea rax, [0x140329668]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], 1
lea rax, [rbp + 0x20]
mov qword [rbp - 0x28], rax
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
lea rcx, [rbp + 0x18]
lea rdx, [rbp - 0x38]
call fcn.1400110c0
mov qword [rbp - 8], rax
lea rcx, [rbp - 8]
call fcn.140011140
mov ecx, 7
int 0x29
ud2

Function at 0x140011d70
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov ecx, dword [0x1400440c8]
test ecx, ecx
je 0x140011e63
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140011da6
cmp qword [rax + 8], 0
je 0x140011da6
add rax, 0x10
jmp 0x140011e5c
mov ecx, dword [0x1400440c8]
test ecx, ecx
je 0x140011e76
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140011e5a
test rax, rax
jne 0x140011e20
mov qword [rbp - 8], 0
lea rax, [0x1400440b0]
mov qword [rbp - 0x10], rax
movzx eax, byte [0x1403320a0]
mov ecx, 0x18
call fcn.14003d510
test rax, rax
je 0x140011ea2
mov rcx, qword [rbp]
mov qword [rax + 0x10], rcx
movups xmm0, xmmword [rbp - 0x10]
movups xmmword [rax], xmm0
mov ecx, dword [0x1400440c8]
test ecx, ecx
je 0x140011e89
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov rdx, rax
add rax, 0x10
mov rcx, qword [rdx + 0x10]
cmp qword [rdx + 8], 0
mov qword [rdx + 8], 1
mov qword [rdx + 0x10], 0
je 0x140011e5c
test rcx, rcx
je 0x140011e5c
lock dec qword [rcx]
jne 0x140011e5c
mov rsi, rax
call fcn.140011f60
mov rax, rsi
jmp 0x140011e5c
xor eax, eax
add rsp, 0x38
pop rsi
pop rbp
ret
lea rcx, [0x1400440b0]
call fcn.140012020
mov ecx, eax
jmp 0x140011d8b
lea rcx, [0x1400440b0]
call fcn.140012020
mov ecx, eax
jmp 0x140011db6
lea rcx, [0x1400440b0]
mov rsi, rax
call fcn.140012020
mov ecx, eax
mov rax, rsi
jmp 0x140011e12
mov ecx, 8
mov edx, 0x18
call fcn.1400036f0
ud2
Function at 0x140012020
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov rsi, rcx
cmp qword [rcx], 0
je 0x1400120b5
mov rax, qword [0x140335038]
mov dword [rbp], 0
lea rbx, [rsi + 0x10]
mov r8, rbp
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rbp + 4], eax
cmp eax, 1
jne 0x1400120f4
cmp dword [rbp], 0
je 0x1400120d8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x140012109
mov edi, eax
mov rax, qword [0x140332170]
nop word cs:[rax + rax]
mov qword [rsi + 8], rax
lock cmpxchg qword [0x140332170], rsi
jne 0x140012090
mov eax, edi
inc eax
mov dword [rsi + 0x18], eax
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x1400120e9
call sub.KERNEL32.dll_TlsAlloc
mov dword [rbp + 4], eax
cmp eax, 0xffffffff
je 0x14001214b
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x1400120dd
mov edi, dword [rbp + 4]
jmp 0x1400120e9
mov edi, dword [rsi + 0x18]
jmp 0x1400120e7
mov edi, eax
mov ecx, dword [rbp + 4]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop rbp
ret
mov qword [rbp - 0x30], 0
lea rcx, [rbp + 4]
lea rdx, [rbp - 0x30]
call fcn.1400121b0
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 1
mov qword [rbp - 0x20], 8
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
lea rdx, str.library_std_src_syspalwindows_thread_local_key.rs
lea rcx, [rbp - 0x30]
call fcn.140003eb0
lea rax, str.out_of_TLS_indexes
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 1
mov qword [rbp - 0x20], 8
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
lea rcx, [rbp + 4]
lea rdx, [rbp - 0x30]
call fcn.140012200
int3

Function at 0x1400128a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov ecx, dword [0x140044088]
test ecx, ecx
je 0x14001293b
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x1400128cc
cmp byte [rax + 8], 0
jne 0x14001292c
mov ecx, dword [0x140044088]
test ecx, ecx
je 0x14001294e
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140012932
test rax, rax
jne 0x140012926
movzx eax, byte [0x1403320a0]
mov ecx, 0x10
call fcn.14003d510
test rax, rax
je 0x140012977
lea rcx, [0x140044070]
mov qword [rax], rcx
mov byte [rax + 8], 0
mov ecx, dword [0x140044088]
test ecx, ecx
je 0x140012961
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov word [rax + 8], 1
add rax, 9
jmp 0x140012934
xor eax, eax
add rsp, 0x28
pop rsi
pop rbp
ret
lea rcx, [0x140044070]
call fcn.140012020
mov ecx, eax
jmp 0x1400128bb
lea rcx, [0x140044070]
call fcn.140012020
mov ecx, eax
jmp 0x1400128d8
lea rcx, [0x140044070]
mov rsi, rax
call fcn.140012020
mov ecx, eax
mov rax, rsi
jmp 0x140012918
mov ecx, 8
mov edx, 0x10
call fcn.1400036f0
int3
Function at 0x140012f10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov ecx, dword [0x140044068]
test ecx, ecx
je 0x140012fd2
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140012f46
cmp qword [rax + 8], 0
je 0x140012f46
add rax, 0x10
jmp 0x140012fcb
mov ecx, dword [0x140044068]
test ecx, ecx
je 0x140012fe5
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140012fc9
test rax, rax
jne 0x140012fac
movzx eax, byte [0x1403320a0]
mov ecx, 0x20
call fcn.14003d510
test rax, rax
je 0x14001300e
lea rcx, [0x140044050]
mov qword [rax], rcx
mov qword [rax + 8], 0
mov ecx, dword [0x140044068]
test ecx, ecx
je 0x140012ff8
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov qword [rax + 8], 1
mov rcx, rax
add rax, 0x10
mov qword [rcx + 0x10], 0
mov byte [rcx + 0x18], 0
jmp 0x140012fcb
xor eax, eax
add rsp, 0x28
pop rsi
pop rbp
ret
lea rcx, [0x140044050]
call fcn.140012020
mov ecx, eax
jmp 0x140012f2b
lea rcx, [0x140044050]
call fcn.140012020
mov ecx, eax
jmp 0x140012f56
lea rcx, [0x140044050]
mov rsi, rax
call fcn.140012020
mov ecx, eax
mov rax, rsi
jmp 0x140012f9e
mov ecx, 8
mov edx, 0x20
call fcn.1400036f0
int3
Function at 0x140014880
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x468
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3c8], rcx
mov qword [rbp + 0x3d0], 0
mov qword [rbp + 0x3d8], 2
mov qword [rbp + 0x3e0], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3c0], rax
xor esi, esi
xor edi, edi
xor ebx, ebx
cmp r8, 0x201
jae 0x140014910
jmp 0x1400148ff
jae 0x1400149cb
cmp r8, 0x201
jae 0x140014910
mov r14d, 0x200
lea r15, [rbp - 0x60]
mov r12, r8
jmp 0x140014967
sub r8, rbx
sub rdi, rbx
cmp rdi, r8
jae 0x14001493f
lea rcx, [rbp + 0x3d0]
mov rdx, rbx
call fcn.140016750
mov rsi, qword [rbp + 0x3d0]
mov rax, qword [rbp + 0x3d8]
mov qword [rbp + 0x3c0], rax
mov eax, 0xffffffff
cmp rsi, rax
mov ebx, 0xffffffff
cmovb rbx, rsi
mov qword [rbp + 0x3e0], rbx
mov rdi, rsi
mov r14, rbx
mov r15, qword [rbp + 0x3c0]
mov r12, rbx
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov ecx, r12d
mov rdx, r15
call sub.KERNEL32.dll_GetCurrentDirectoryW
mov r13d, eax
test eax, eax
jne 0x14001498d
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x140014a2f
mov r8d, r13d
cmp r12, r8
jne 0x1400148f0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140014a60
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x1400148ff
jmp 0x140014910
cmp r14, r8
jb 0x140014a7a
lea rcx, [rbp + 0x3a0]
mov rdx, r15
call fcn.140015270
movups xmm0, xmmword [rbp + 0x3a0]
movups xmm1, xmmword [rbp + 0x3b0]
mov rax, qword [rbp + 0x3c8]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax], xmm0
cmp qword [rbp + 0x3d0], 0
je 0x140014a1a
mov rcx, qword [rbp + 0x3d8]
mov edx, 2
call fcn.140003300
nop
add rsp, 0x468
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x3c8]
mov qword [rcx + 8], rax
movabs rax, 0x8000000000000000
mov qword [rcx], rax
cmp qword [rbp + 0x3d0], 0
jne 0x140014a09
jmp 0x140014a1a
lea rcx, str.internal_error:_entered_unreachable_code
lea r8, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.140004bd0
jmp 0x140014a8f
lea rax, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r14
mov r8, rax
call fcn.140004860
ud2
Function at 0x140016940
Capabilities:
Read file via mapping

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xe0
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x50], xmm6
mov rax, r8
mov rsi, rcx
mov dword [rbp - 0x40], 0
xorps xmm6, xmm6
movups xmmword [rbp - 0x38], xmm6
mov dword [rbp - 0x28], 7
mov qword [rbp - 0x24], 0
mov word [rbp - 0x1c], 0
mov byte [rbp - 0x20], 1
lea r8, [rbp - 0x40]
mov rcx, rdx
mov rdx, rax
call fcn.14002e5b0
mov rdi, rdx
test rax, rax
je 0x1400169be
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x18]
mov qword [rbp + 0x18], rdi
call fcn.140011160
mov qword [rsi], 0
jmp 0x140016b61
movaps xmmword [rbp + 0x30], xmm6
movaps xmmword [rbp + 0x20], xmm6
movaps xmmword [rbp + 0x10], xmm6
mov dword [rbp + 0x40], 0
lea rdx, [rbp + 0x10]
mov rcx, rdi
call sub.KERNEL32.dll_GetFileInformationByHandle
test eax, eax
je 0x140016a67
test dword [rbp + 0x10], 0x400
je 0x140016a11
mov qword [rbp + 8], 0
lea r8, [rbp + 8]
mov rcx, rdi
mov edx, 9
mov r9d, 8
call sub.KERNEL32.dll_GetFileInformationByHandleEx
test eax, eax
je 0x140016a67
mov r12d, dword [rbp + 0x30]
mov r15d, dword [rbp + 0x34]
test rdi, rdi
je 0x140016aad
mov qword [rbp + 0x10], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbp + 0x10]
mov rcx, rax
mov rdx, rdi
mov r8, rax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x140016b30
mov rbx, qword [rbp + 0x10]
jmp 0x140016aaf
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
lea rcx, [rbp - 0x38]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 2
call fcn.140011160
mov qword [rsi], 0
mov rcx, rdi
movaps xmm6, xmmword [rbp + 0x50]
add rsp, 0xe0
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
jmp fcn.140041e1c
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.KERNEL32.dll_CreateFileMappingA
test rax, rax
je 0x140016b1f
mov r14, rax
shl r12, 0x20
or r12, r15
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call fcn.140041e1c
test r15, r15
je 0x140016b1f
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
mov qword [rsi], 1
jmp 0x140016b59
mov qword [rsi], 0
mov rcx, rbx
call fcn.140041e1c
jmp 0x140016b59
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x40], 1
lea rcx, [rbp - 0x38]
mov qword [rbp - 0x38], rax
call fcn.140011160
mov qword [rsi], 0
mov rcx, rdi
call fcn.140041e1c
movaps xmm6, xmmword [rbp + 0x50]
add rsp, 0xe0
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
Function at 0x14002f300
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x498
lea rbp, [rsp + 0x80]
mov rsi, rcx
movabs rdi, 0x8000000000000000
lea rcx, [rbp - 0x60]
call fcn.14002e800
mov rax, qword [rbp - 0x60]
cmp rax, rdi
jne 0x14002f34b
lea rcx, [rbp - 0x58]
call fcn.140011160
mov qword [rsi], rdi
jmp 0x14002f584
mov qword [rbp + 0x3f0], rsi
mov qword [rbp + 0x3e8], rax
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x3f8], rax
mov qword [rbp + 0x400], 0
mov qword [rbp + 0x408], 2
mov qword [rbp + 0x410], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3e0], rax
xor esi, esi
xor ebx, ebx
xor r12d, r12d
cmp r8, 0x201
jae 0x14002f3d0
jmp 0x14002f3bf

Function at 0x140030560
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
sub rsp, 0xa8
sub esp, 0xa8

Function at 0x140031e90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov ecx, dword [0x1400440a8]
test ecx, ecx
je 0x140031f83
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140031ec6
cmp qword [rax + 8], 0
je 0x140031ec6
add rax, 0x10
jmp 0x140031f7c
mov ecx, dword [0x1400440a8]
test ecx, ecx
je 0x140031f96
dec ecx
lea rcx, [0x140044090]
call fcn.140012020
mov ecx, eax
jmp 0x140031eab
lea rcx, [0x140044090]
Function at 0x140038190
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov rsi, rcx
movabs rbx, 0x8000000000000000
lea rcx, [rbp - 0x28]
call fcn.14002e800
mov rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
cmp rcx, rbx
jne 0x1400381ce
mov qword [rbp - 8], rax
mov qword [rbp - 0x10], rbx
jmp 0x1400381f4
mov rdx, qword [rbp - 0x18]
mov qword [rbp - 0x40], rcx
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rdx
lea rcx, [rbp - 0x10]
lea rdx, [rbp - 0x40]
call fcn.1400380b0
mov r14, qword [rbp - 0x10]
cmp r14, rbx
jne 0x14003820d
lea rcx, [rbp - 8]
call fcn.140011160
mov qword [rsi], rbx
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
mov rdi, qword [rbp - 8]
mov r15, qword [rbp]
mov rcx, rdi
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x14003822f
mov qword [rsi], r14
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], r15
jmp 0x140038200
mov qword [rsi], rbx
test r14, r14
je 0x140038200
mov edx, 2
mov rcx, rdi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
jmp fcn.140003300
Function at 0x14003ceb0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov rdi, rdx
cmp qword [rdx], 0
jne 0x14003d016
mov rsi, rcx
mov rbx, qword [rdi + 0x18]
mov rax, qword [rbx]
test rax, rax
jne 0x14003ceed
mov rdx, qword [rbx + 0x10]
lea rax, [rdx + 0xf]
cmp rax, 0xf
jbe 0x14003d000
xor eax, eax
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
je 0x14003cfe3
sub rax, rdx
add rdx, qword [rbx + 8]
mov r8, qword [rdi + 0x10]
mov ecx, 0xffffffff
cmp rax, rcx
cmovae rax, rcx
mov dword [rbp + 4], 0
mov rcx, qword [rdi + 0x20]
mov qword [rsp + 0x20], r8
lea r9, [rbp + 4]
mov r8d, eax
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x14003cf4b
mov eax, dword [rbp + 4]
mov ecx, 2
test rax, rax
je 0x14003cf8d
mov qword [rdi], rcx
mov qword [rdi + 8], rax
mov byte [rsi + 1], 1
jmp 0x14003cf91
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x40], rax
movabs rcx, 0xffffffff00000000
and rcx, rax
movabs rdx, 0x6d00000000
cmp rcx, rdx
je 0x14003cf95
movabs rdx, 0x3e500000000
cmp rcx, rdx
jne 0x14003cfbf
lea rax, [rbp - 8]
jmp 0x14003cfa1
mov byte [rsi + 1], 0
xor eax, eax
jmp 0x14003cfc5
mov qword [rbp - 8], 1
lea rax, [rbp - 0x10]
mov qword [rax], 0
lea rcx, [rbp - 0x40]
call fcn.140011160
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x10]
cmp rcx, 2
jne 0x14003cfd0
mov qword [rsi + 8], rax
mov al, 1
mov byte [rsi], al
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop rbp
ret
test rcx, rcx
jne 0x14003cf34
mov ecx, 1
jmp 0x14003cf3e
mov r8d, 1
mov rcx, rbx
mov rdx, rax
call fcn.1400166b0
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x10]
jmp 0x14003cefa
mov r8d, 0x10
mov rcx, rbx
call fcn.1400166b0
mov rax, qword [rbx]
jmp 0x14003ceed
mov qword [rbp - 0x40], 0
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.14003d030
int3

Function at 0x140042810
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.1400435b0
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.1400435b0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]