joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140026d38
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, [0x14008eb50]
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 0x140026d8f
cmp word [rdx], r13w
jne 0x140026d8f
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140026d94
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140026eb9
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140026eda
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140026dcd
mov rdx, r9
mov word [rbx], cx
jmp 0x140026df4
cmp r9, r8
jae 0x140026e04
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 0x140026dae
jmp 0x140026eb9
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 0x140026eae
cmp dword [rsp + 0x80], esi
je 0x140026eae
lea r8, [0x14008eb50]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140026e86
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140026e56
mov word [rbx], r13w
jmp 0x140026eb6
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 0x140026e63
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140026eb6
cmp word [rsp + 0x70], r13w
jne 0x140026e93
cmp rbx, r14
je 0x140026e50
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400279a0
cmp word [rsp + 0x70], r13w
je 0x140026eb9
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, [0x14008eb50]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140026eb3
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140026eb9
Function at 0x14002ade0
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 0x14002ae10
xor eax, eax
jmp 0x14002aed3
mov rbp, rbx
cmp word [rax], si
je 0x14002ae35
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14002ae1c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14002ae18
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.1400294f0
movsxd r14, eax
test eax, eax
jne 0x14002ae73
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14002ae09
mov rcx, r14
call fcn.140022790
mov rdi, rax
test rax, rax
jne 0x14002ae8c
xor ecx, ecx
call fcn.14002199c
jmp 0x14002ae68
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.1400294f0
test eax, eax
jne 0x14002aebd
mov rcx, rdi
call fcn.14002199c
jmp 0x14002aec7
xor ecx, ecx
call fcn.14002199c
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 0x14002de48
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.14002163c
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 0x14002dee9
cmp ebx, dword [rsp + 0x30]
je 0x14002dee2
test esi, esi
je 0x14002dee2
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14002debd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14002deca
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14002dea7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14002dece
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14002deeb
mov eax, 1
jmp 0x14002deeb
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400317ec
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.14001ab30
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140031876
cmp byte [rbp - 0x21], r15b
je 0x140031871
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400318ac
call fcn.140021ca0
test eax, eax
jne 0x140031898
cmp byte [rbp - 0x21], r15b
je 0x140031890
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400318ac
cmp byte [rbp - 0x21], r15b
je 0x1400318a9
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.14001d680
test eax, eax
jne 0x14003194c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14001ab30
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400318eb
cmp byte [rbp - 0x21], r15b
je 0x140031920
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140031920
call fcn.140021ca0
test eax, eax
jne 0x14003190c
cmp byte [rbp - 0x21], r15b
je 0x140031905
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140031920
cmp byte [rbp - 0x21], r15b
je 0x14003191d
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.14001d680
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14003194c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14003194f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14003195d
mov rcx, rdi
call fcn.14002199c
cmp byte [rbp + 0x3f], r15b
je 0x14003196c
mov rcx, qword [rbp + 0x27]
call fcn.14002199c
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 0x140f6bdd4
Capabilities:
Encode data using xor

Disassembly:
jmp 0x140f6bdde
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x140f6be07
pop rbp
sub rbp, 0x33
sub rbp, 0xf6bdd4
sub rsp, 0x20
jmp 0x140f6be26
mov rax, 0xf6bdd4
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0x2b4bda05
xor byte [rax], dl
inc rax
dec rcx
jne 0x140f6be45
jmp 0x140f6be5c
mov r12, gs
mov cs, word [rcx + rdi + 0x4d050505]
test ah, al
or eax, 0x4d050504
add al, 0xec
ret 0x2c5
Function at 0x140fe0160
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140fe02e7
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140fe0191
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140fe0177
add dl, dl
jne 0x140fe019e
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140fe01fe
xor eax, eax
add dl, dl
jne 0x140fe01ad
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140fe02b5
add dl, dl
jne 0x140fe01be
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140fe01cb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140fe01d8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140fe01e5
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140fe01f2
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140fe0186
mov eax, 1
add dl, dl
jne 0x140fe020e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140fe021b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140fe0203
sub eax, ebx
mov ebx, 1
jne 0x140fe0254
mov ecx, 1
add dl, dl
jne 0x140fe0236
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140fe0243
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140fe022b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140fe0186
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140fe0270
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140fe027d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140fe0265
cmp eax, 0x7d00
jae 0x140fe02a3
cmp eax, 0x500
jb 0x140fe029e
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140fe0186
cmp eax, 0x7f
ja 0x140fe02a6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140fe0186
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140fe02da
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140fe0186
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140002d10
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.140004050
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.140004050
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 0x140002d80
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400090a4]
mov rbx, rcx
test esi, esi
jle 0x140002eb0
mov rax, qword [0x1400090a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002dcb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002e55
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002db0
mov rcx, rbx
call fcn.1400037d0
mov rdi, rax
test rax, rax
je 0x140002ed2
mov rax, qword [0x1400090a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003910
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400090a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002eb7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002e4e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002e60
add dword [0x1400090a4], 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 [0x1400090a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002e4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002d10
nop dword [rax]
xor esi, esi
jmp 0x140002dd8
mov rax, qword [0x1400090a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002d10
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002d10
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003440
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x14000349c
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 eax, eax
jne 0x140003493
test rsi, rsi
je 0x140003493
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003478
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 0x1400037d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140006a30]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400037f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400037f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400037f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000384d
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 0x140003844
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400037f0
add rax, 0x28
cmp rax, r9
jne 0x140003830
xor eax, eax
ret

Function at 0x140003850
Capabilities:
Parse pe header

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

Function at 0x140003910
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006a30]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000392f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003938
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140003c00
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
mov rbx, r8
xor edx, edx
test rcx, rcx
je 0x140003c34
cmp word [rcx], 0x5a4d
jne 0x140003c34
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003c34
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003c34
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003b40
test eax, eax
jne 0x140003c50
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140003bb0
test rax, rax
je 0x140003c45
lea rdx, [rax + 0x10]
lea rax, [rsp + 0x38]
mov rcx, qword [rbx]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], 0
call fcn.1400043ff
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140004300
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.1400042a0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140004754
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x140537678]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x140537674]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400047a2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000479a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140004889
inc ebx
add rax, 0x28
jmp 0x14000477a
mov rcx, r12
call fcn.140004f81
mov rbp, rax
test rax, rax
jne 0x1400047c1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.1400046f0
movsxd rbx, ebx
mov rax, qword [0x140537678]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.14000502f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140537678]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140004823
mov rax, qword [0x140537678]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400046f0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140004883
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140004883
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 [0x140537678]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140004883
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400046f0
inc dword [0x140537674]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140004cb0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x1405376e0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1405376c0]
test rbx, rbx
je 0x140004cfc
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140004cf6
test eax, eax
jne 0x140004cf6
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140004cce
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140004eb0
Capabilities:
Parse pe header

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

Function at 0x140004ed4
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x140004f0e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140004f05
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140004f10
inc r8d
add rax, 0x28
jmp 0x140004eec
xor eax, eax
ret

Function at 0x140004f81
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140533750]
mov r8, rcx
mov rcx, r9
call fcn.140004eb0
test eax, eax
je 0x140004fad
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp fcn.140004ed4
xor eax, eax
add rsp, 0x28
ret
Function at 0x140003010
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x30
mov r14, rdx
mov r13, rcx
mov rax, qword [0x1400f9028]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov byte [rcx], 1
mov qword [rcx + 8], 0
mov byte [rcx + 0x10], 0
mov eax, dword [0x140100748]
mov ecx, dword [0x1400fc638]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400031c1
mov ecx, dword [0x1400fc468]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140003144
movsxd rcx, dword [0x140100740]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x140100744]
jne 0x140003144
mov rdi, qword [rax + rcx]
test rdi, rdi
je 0x140003144
movabs r12, 0x6000000000000000
movabs r15, 0xffffffffffffff
mov rax, qword [rdi]
mov rbx, rax
and rbx, r15
and rax, r12
movabs rcx, 0x4000000000000000
cmp rax, rcx
jne 0x14000310a
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1400030f7
mov rsi, qword [rdi]
call qword [rcx + 8]
movabs rcx, 0xff00000000000000
and rcx, rsi
or rcx, rax
mov qword [rdi], rcx
movabs rax, 0xbfffffffffffffff
lock and qword [rdi], rax
mov byte [r13 + 0x10], 1
movabs rsi, 0x8000000000000001
mov qword [r13 + 8], rbx
lea rbx, [rsp + 0x20]
mov rcx, rbx
call qword [fcn.14003b480]
mov rax, qword [rbx]
lea rcx, [r14 + rsi]
cmp rcx, 2
jae 0x14000314b
add rsi, rax
cmp rsi, 1
ja 0x14000316d
cmp rax, r14
je 0x14000316d
int3
mov byte [r13], 0
jmp 0x1400031a1
xor ecx, ecx
mov rdx, rax
add rdx, r14
setns cl
movabs rdx, 0x7fffffffffffffff
add rdx, rcx
add rax, r14
cmovo rax, rdx
mov r14, rax
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14000318f
mov rsi, qword [rdi]
call qword [rcx + 8]
movabs rcx, 0xff00000000000000
and rcx, rsi
or rcx, rax
mov qword [rdi], rcx
mov rax, qword [rdi]
and rax, r12
and r14, r15
or r14, rax
mov qword [rdi], r14
inc dword [rdi + 0x14]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140065120
mov rax, r13
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x140100748]
call fcn.140062c24
cmp dword [0x140100748], 0xffffffff
jne 0x140003068
mov qword [0x140100740], 0
lea rcx, [0x140100740]
xor edx, edx
call fcn.140035760
lea rcx, [0x140100748]
call fcn.140062bc4
jmp 0x140003068
Function at 0x140005790
Capabilities:
Get thread local storage value

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov r14, r8
mov ebp, edx
mov rsi, rcx
mov ebx, dword [0x140100ce4]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test edi, edi
jne 0x140005875
cmp rbx, 1
je 0x1400057d3
mov eax, dword [rsi + 0x1518]
test eax, eax
je 0x1400057da
xor eax, eax
jmp 0x14000586a
mov eax, 1
lock xadd dword [rsi + 0x1518], eax
cmp eax, 0x7fffffff
je 0x1400058c1
mov rcx, rsi
call fcn.140027720
mov rdi, rax
lock dec dword [rsi + 0x1518]
inc qword [rax + 0x5a0]
cmp bp, 0x29
jae 0x140005882
movzx edx, bp
mov rsi, rdx
shl rsi, 4
mov rbx, rdi
add rbx, rsi
mov rax, qword [rdi + rsi]
test rax, rax
je 0x140005895
inc qword [rdi + 0x5a8]
mov rcx, qword [rax]
test rcx, rcx
je 0x14000584d
mov rdx, rcx
not rdx
cmp qword [rax + 8], rdx
jne 0x1400058bc
bswap rcx
prefetcht0 byte [rcx]
jmp 0x14000584f
xor ecx, ecx
dec byte [rdi + rsi + 8]
mov qword [rbx], rcx
movzx ecx, word [rdi + rsi + 0xa]
mov qword [r14], rcx
movzx ecx, word [rdi + rsi + 0xa]
sub qword [rdi + 0x590], rcx
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400057c3
inc qword [rdi + 0x5c0]
inc qword [rdi + 0x5b0]
jmp 0x1400057d3
inc qword [rdi + 0x5b8]
inc qword [rdi + 0x5b0]
mov rcx, rdi
call fcn.140038d80
mov rax, qword [rbx]
test rax, rax
jne 0x140005831
jmp 0x1400057d3
call fcn.140091440
int3

Function at 0x140005cf0
Capabilities:
Check if file exists

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, rcx
xor eax, eax
test r8d, r8d
sete al
xor ebx, ebx
test edx, edx
sete bl
xor ecx, ecx
mov edx, ebx
mov r8d, eax
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi], 0
test rax, rax
je 0x140005dac
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x140005d79
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140005d54
mov qword [rsi], rdi
call fcn.140034b10
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsi]
mov byte [rsi + 8], 1
inc rax
cmp rax, 1
jbe 0x140005db0
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140034b10
mov r14, qword [rsi]
mov rcx, qword [0x140100728]
test rcx, rcx
je 0x140005d9e
mov rax, qword [rcx]
mov rdx, r14
call qword [rax]
mov qword [rsi], 0
jmp 0x140005d42
call fcn.140098580
mov rcx, qword [0x140100728]
jmp 0x140005d8d
mov byte [rsi + 8], 1
int3