joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000de60
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x14000ded0
call sym._pthread_time_in_ms_from_timespec
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x14000df08
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14000df60
test esi, esi
je 0x14000dee6
call sym.pthread_testcancel
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000df40
mov edx, edi
call sym._pthread_wait_for_single_object
call sym.pthread_testcancel
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14000df50
call sym.pthread_testcancel
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call sym.pthread_testcancel
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
jne 0x14000dea5
call sym.__pthread_self_lite.part.0
mov rbx, rax
jmp 0x14000dea5
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14000debe
call sym.__pthread_self_lite.part.0
jmp 0x14000dee6
call sym.__pthread_self_lite.part.0
mov rbx, rax
jmp 0x14000dea1

Function at 0x14000df70
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14000dfe0
test esi, esi
je 0x14000dfc0
call sym.pthread_testcancel
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000dff0
mov edx, esi
call sym._pthread_wait_for_single_object
call sym.pthread_testcancel
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call sym.pthread_testcancel
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call sym.pthread_testcancel
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
call sym.__pthread_self_lite.part.0
mov rbx, rax
jmp 0x14000df91
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14000dfaa
Function at 0x14000e000
Capabilities:
Get thread local storage value
Hijack thread execution

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
test rcx, rcx
mov rsi, rcx
je 0x14000e0f0
lea rdi, [0x1400123d8]
mov rcx, rdi
call sym.pthread_mutex_lock
mov rcx, rsi
call sym.__pthread_get_pointer
mov rcx, rdi
mov rbx, rax
call sym.pthread_mutex_unlock
test rbx, rbx
je 0x14000e0f0
mov rcx, qword [rbx + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000e0f0
lea rdi, [rsp + 0x20]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14000e0f0
lea rbp, [rbx + 0x38]
mov rcx, rbp
call sym.pthread_mutex_lock
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14000e200
cmp rsi, qword [rax + 0x1d8]
movzx edx, byte [rbx + 0x40]
je 0x14000e108
mov eax, dword [rbx + 0x44]
and eax, 3
cmp eax, 3
je 0x14000e160
test dl, 3
jne 0x14000e0e0
and edx, 0xfffffffc
or edx, 1
mov byte [rbx + 0x40], dl
lock add dword [0x140019cf8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000e0d1
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
jmp 0x14000e0f5
mov rcx, rbp
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
je 0x14000e0d9
nop
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test dl, 3
jne 0x14000e0e0
and edx, 0xfffffffc
or edx, 1
mov byte [rbx + 0x40], dl
lock add dword [0x140019cf8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000e12d
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x14000e0d1
and eax, 0xfffffffe
mov rcx, rbp
mov dword [rbx + 0x44], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
nop word [rax + rax]
test dl, 0xc
jne 0x14000e0e0
and edx, 0xf
jne 0x14000e0f0
mov rcx, qword [rbx + 0x28]
mov dword [rsp + 0x50], 0x100001
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14000e0d1
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
lock add dword [0x140019cf8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000e1e8
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x14000e0d1
call sym.__pthread_self_lite.part.0
test rax, rax
jne 0x14000e090
movzx edx, byte [rbx + 0x40]
jmp 0x14000e09d
Function at 0x14000e220
Capabilities:
Get thread local storage value
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x1400123d8]
mov rbx, rcx
mov rcx, rdi
mov esi, edx
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x14000e298
cmp qword [rax + 0x1d8], rbx
jne 0x14000e298
test byte [rax + 0x40], 0xc
jne 0x14000e298
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x14000e298
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x14000e298
mov rcx, rdi
call sym.pthread_mutex_unlock
test esi, esi
je 0x14000e2b0
lea edx, [rsi - 2]
cmp edx, 0x15
ja 0x14000e2b8
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp sym.pthread_cancel
mov rcx, rdi
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor eax, eax
jmp 0x14000e2a5
mov eax, 0x16
jmp 0x14000e2a5

Function at 0x14000e480
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
mov rdi, rdx
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14000e4f0
cmp esi, 1
ja 0x14000e4fd
lea rbp, [rbx + 0x38]
mov rcx, rbp
call sym.pthread_mutex_lock
test rdi, rdi
je 0x14000e4c4
mov eax, dword [rbx + 0x44]
and eax, 1
mov dword [rdi], eax
mov eax, dword [rbx + 0x44]
mov rcx, qword [rbx + 0x1d8]
and eax, 0xfffffffe
or eax, esi
mov dword [rbx + 0x44], eax
call sym.test_cancel_locked
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.__pthread_self_lite.part.0
test rax, rax
mov rbx, rax
jne 0x14000e4a6
mov eax, 0x16
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x14000e510
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, ecx
mov rdi, rdx
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x14000e588
mov ebp, esi
and ebp, 0xfffffffd
jne 0x14000e595
lea r12, [rbx + 0x38]
mov rcx, r12
call sym.pthread_mutex_lock
test rdi, rdi
je 0x14000e558
mov eax, dword [rbx + 0x44]
and eax, 2
mov dword [rdi], eax
mov eax, dword [rbx + 0x44]
mov rcx, qword [rbx + 0x1d8]
and eax, 0xfffffffd
or eax, esi
mov dword [rbx + 0x44], eax
call sym.test_cancel_locked
mov rcx, r12
call sym.pthread_mutex_unlock
mov eax, ebp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call sym.__pthread_self_lite.part.0
test rax, rax
mov rbx, rax
jne 0x14000e538
mov ebp, 0x16
mov eax, ebp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x14000e840
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
test rcx, rcx
mov rsi, rcx
mov rbp, rdx
je 0x14000e960
lea rdi, [0x1400123d8]
mov rcx, rdi
call sym.pthread_mutex_lock
mov rcx, rsi
call sym.__pthread_get_pointer
mov rcx, rdi
mov rbx, rax
call sym.pthread_mutex_unlock
test rbx, rbx
je 0x14000e960
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14000e960
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14000e960
test byte [rbx + 0x44], 4
jne 0x14000e970
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14000e990
cmp rsi, qword [rax + 0x1d8]
je 0x14000e9b8
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x14000e8eb
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000e8fa
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000e90e
call rsi
mov qword [rbx + 0x30], 0
lea rcx, [rbx + 0x38]
test rbp, rbp
je 0x14000e9a8
mov rax, qword [rbx + 8]
mov qword [rbp], rax
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x14000e9bf
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14000e980
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, 0x16
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbx
call sym.push_pthread_mem.part.0
xor eax, eax
jmp 0x14000e956
call sym.__pthread_self_lite.part.0
test rax, rax
jne 0x14000e8c6
jmp 0x14000e8d3
call sym.pthread_mutex_destroy
jmp 0x14000e930
mov eax, 0x24
jmp 0x14000e965
call sym.replace_spin_keys.part.0
nop
nop word cs:[rax + rax]
Function at 0x14000e9d0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [0x1400123d8]
mov rsi, rcx
mov rcx, rbp
mov rdi, rdx
call sym.pthread_mutex_lock
mov rcx, rsi
call sym.__pthread_get_pointer
test rax, rax
mov rbx, rax
je 0x14000eaf0
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x14000eaf0
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14000eaf0
test byte [rbx + 0x44], 4
jne 0x14000eb10
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400123e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14000eb50
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x14000eb88
mov edx, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test edx, edx
jne 0x14000ea77
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14000eb30
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14000ea8b
call rsi
mov qword [rbx + 0x30], 0
lea rcx, [rbx + 0x38]
test rdi, rdi
je 0x14000eb68
mov rax, qword [rbx + 8]
mov qword [rdi], rax
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x14000eb9a
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14000eb78
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x16
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x14000ea73
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x10
jmp 0x14000eade
call sym.__pthread_self_lite.part.0
xor edx, edx
test rax, rax
jne 0x14000ea45
jmp 0x14000ea4c
call sym.pthread_mutex_destroy
jmp 0x14000eaac
mov rcx, rbx
call sym.push_pthread_mem.part.0
jmp 0x14000ead4
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x24
jmp 0x14000eade
call sym.replace_spin_keys.part.0
nop
Function at 0x140a00058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140a001df
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 0x140a00089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a0006f
add dl, dl
jne 0x140a00096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a000f6
xor eax, eax
add dl, dl
jne 0x140a000a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a001ad
add dl, dl
jne 0x140a000b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a000c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a000d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a000dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a000ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a0007e
mov eax, 1
add dl, dl
jne 0x140a00106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a00113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a000fb
sub eax, ebx
mov ebx, 1
jne 0x140a0014c
mov ecx, 1
add dl, dl
jne 0x140a0012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a0013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a00123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a00168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a00175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a0015d
cmp eax, 0x7d00
jae 0x140a0019b
cmp eax, 0x500
jb 0x140a00196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0007e
cmp eax, 0x7f
ja 0x140a0019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a001d2
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 0x140a0007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00538490]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x005384a0]
mov dword [rax], 1
mov rax, qword [0x005384b0]
mov dword [rax], 1
mov rax, qword [0x00538480]
mov dword [rax], 1
mov rax, qword [0x00538340]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00538470]
mov dword [0x0053b008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00538430]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x005382f0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x4f15c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0053b624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4f1748
mov rax, qword [0x0053b628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4f160c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4f1695
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4f15f0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x4f177d
mov rax, qword [0x0053b628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0053b628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4f1760
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4f168e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4f16f0
add dword [0x0053b624], 1
cmp edi, 8
jae 0x4f16c3
test dil, 4
jne 0x4f1734
test edi, edi
je 0x4f16b8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4f174f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x4f16b8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x4f16dc
jmp 0x4f16b8
add rsi, qword [0x0053b628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4f168e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4f16b8
xor esi, esi
jmp 0x4f1617
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4f16b8
mov rax, qword [0x0053b628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x4f1ed0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0053b900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0053b8e0]
test rbx, rbx
je 0x4f1f24
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x4f1f1b
test rsi, rsi
je 0x4f1f1b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4f1f00
lea rcx, [0x0053b900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4f2160
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x4f2170
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x4f2180
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4f21c1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x4f21b8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4f21c3
add rax, 0x28
cmp rax, r9
jne 0x4f21a4
xor eax, eax
ret

Function at 0x4f2260
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00538340]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4f22cd
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4f22cd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4f22cd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4f22c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4f22cf
add rax, 0x28
cmp rax, r9
jne 0x4f22b0
xor eax, eax
add rsp, 0x28
ret

Function at 0x4f23d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00538340]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x4f23f0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4f23e8
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4f244d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4f2444
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4f2454
add rax, 0x28
cmp rax, r9
jne 0x4f2430
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x4f2470
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00538340]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x4f24de
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4f24de
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x4f24de
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x4f24de
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x4f24d5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x4f24e5
add rcx, 0x28
cmp rcx, rax
jne 0x4f24c0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x4f24f8
jmp 0x4f24de
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x4f2506
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x4f24de
test r9d, r9d
jg 0x4f24f0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x4f2740
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub rsp, 0x28
call sym.__main
mov rax, qword [0x005383b0]
xor edx, edx
mov r9d, dword [rax]
mov rax, qword [0x005383a0]
mov r8, qword [rax]
mov rax, qword [0x00538390]
mov rcx, qword [rax]
add rsp, 0x28
jmp sym.WinMain

Function at 0x4f2780
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop