joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180002110
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x20
mov rbp, rdx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1800573c4], eax
je 0x18000213e
mov eax, 0x10dd
mov rbp, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret
mov eax, dword [0x1800573c0]
test eax, eax
jne 0x180002245
test rsi, rsi
je 0x180002168
cmp qword [rsi], 0
jne 0x180002178
mov dword [0x1800573c0], 6
mov qword [0x1800573e8], rsi
mov eax, 6
mov rbp, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret
mov qword [rsp + 0x30], rbx
mov ecx, 0x30
mov qword [rsp + 0x38], rdi
call fcn.1800032b0
mov rcx, qword [rsi]
mov rbx, rax
call fcn.1800014e0
mov rcx, rbp
mov rdi, rax
call fcn.1800014e0
movzx edx, byte [rdi + 0x3e]
mov rbp, qword [rdi + 0x48]
sub rbp, rdx
test dl, dl
je 0x180002216
cmp rdx, 0x1e
ja 0x180002216
cmp qword [rdi + 0x50], rax
jne 0x180002216
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], 0
mov r8d, 0x40
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1800021e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x180002224
mov dword [rbx + 8], 1
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x20], rdi
mov qword [rbx + 0x18], rbp
mov eax, dword [rsp + 0x40]
mov dword [rbx + 0x28], eax
mov rax, qword [0x1800573d0]
mov qword [rbx], rax
xor eax, eax
mov qword [0x1800573d0], rbx
jmp 0x18000223b
cmp dword [0x1800573bc], 0
mov edi, 9
jne 0x18000222a
mov dword [0x1800573c0], edi
mov rcx, rbx
call fcn.180003290
mov eax, edi
mov qword [0x1800573e8], rsi
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret

Function at 0x180002830
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x1c0
mov rax, qword [0x180055008]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov rbx, rcx
mov rdx, rcx
mov rcx, qword [0x180055b60]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x1800028ca
mov rax, rbx
shr rax, 0x10
test ax, ax
jne 0x180002889
mov r8, rbx
lea rdx, [0x18003f404]
lea rcx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rbx, [rsp + 0x20]
mov r8, rbx
lea rdx, [0x18003f408]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.USER32.dll_wsprintfA]
mov r9d, 0x10
lea r8, str.AheadLib
lea rdx, [rsp + 0xa0]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, 0xfffffffe
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.180002e20
add rsp, 0x1c0
pop rbx
ret
Function at 0x180002a10
Capabilities:
Get common file path

Disassembly:
sub rsp, 0x358
mov rax, qword [0x180055008]
xor rax, rsp
mov qword [rsp + 0x340], rax
cmp edx, 1
jne 0x180002b76
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
mov edx, 0x104
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea rdx, [0x18003f3c0]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180055b60], rax
test rax, rax
jne 0x180002ab8
lea r8, [rsp + 0x20]
lea rdx, [0x18003f3d0]
lea rcx, [rsp + 0x130]
call qword [sym.imp.USER32.dll_wsprintfA]
mov r9d, 0x10
lea r8, str.AheadLib
lea rdx, [rsp + 0x130]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rax, qword [0x180055b60]
test rax, rax
je 0x180002b5c
lea rcx, [0x18003f430]
call fcn.180002830
mov qword [0x180055b20], rax
test rax, rax
je 0x180002b5c
lea rcx, [0x18003f440]
call fcn.180002830
mov qword [0x180055b28], rax
test rax, rax
je 0x180002b5c
lea rcx, [0x18003f450]
call fcn.180002830
mov qword [0x180055b30], rax
test rax, rax
je 0x180002b5c
lea rcx, [0x18003f460]
call fcn.180002830
mov qword [0x180055b38], rax
test rax, rax
je 0x180002b5c
lea rcx, [0x18003f470]
call fcn.180002830
mov qword [0x180055b40], rax
test rax, rax
je 0x180002b5c
call fcn.180001550
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call fcn.180001ba0
lea rdx, [0x1800028f0]
lea rcx, [0x180055b58]
call fcn.180001c40
jmp 0x180002bb2
xor eax, eax
mov rcx, qword [rsp + 0x340]
xor rcx, rsp
call fcn.180002e20
add rsp, 0x358
ret
test edx, edx
jne 0x180002bb7
mov rcx, qword [0x180055b60]
test rcx, rcx
je 0x180002b8c
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.180001550
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call fcn.180001ba0
lea rdx, [0x1800028f0]
lea rcx, [0x180055b58]
call fcn.180002110
call fcn.1800015e0
mov eax, 1
mov rcx, qword [rsp + 0x340]
xor rcx, rsp
call fcn.180002e20
add rsp, 0x358
ret

Function at 0x180007380
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.180006e60
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x1800073bf
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x18003f318]
jmp 0x1800073c9
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rsp, 0x48
ret
Function at 0x1800249e0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.180004dc0
lea rcx, [rsp + 0x40]
call fcn.1800249a0
movzx eax, al
test eax, eax
jne 0x180024a28
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.1800248d0
mov rax, qword [rsp + 0x70]
jmp 0x180024bf9
lea rcx, [rsp + 0x40]
call fcn.180004e40
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.180024950
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.180004e40
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.1800247a0
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x180024ace
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.1800248d0
mov rax, qword [rsp + 0x80]
jmp 0x180024bf9
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.18000d2f0
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.180004dc0
lea rcx, [rsp + 0x48]
call fcn.180004e00
movzx eax, al
test eax, eax
jne 0x180024b35
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.180004de0
lea rcx, [rsp + 0x40]
call fcn.1800248d0
mov rax, qword [rsp + 0x88]
jmp 0x180024bf9
lea rcx, [rsp + 0x48]
call fcn.180004e40
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.180004e40
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.1800247a0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x180024bcb
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.180004de0
lea rcx, [rsp + 0x40]
call fcn.1800248d0
mov rax, qword [rsp + 0xa0]
jmp 0x180024bf9
lea rcx, [rsp + 0x48]
call fcn.180005390
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.180004de0
lea rcx, [rsp + 0x40]
call fcn.1800248d0
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x180028760
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret
Function at 0x1800382f0
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.18003d730
sub rsp, rax
mov rax, qword [0x180055008]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x1800568e0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x1800384e2
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x180038436
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x180038436
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x18003841b
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x1800383b8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800384a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x180038501
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x1800384dd
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x180038501
jmp 0x18003838e
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.180002e20
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x180038520
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.18003d730
sub rsp, rax
mov rax, qword [0x180055008]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x1800568e0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x18003872d
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x180038679
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x180038679
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x180038659
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x1800385e8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800386ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x18003874c
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x180038728
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x18003874c
jmp 0x1800385be
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.180002e20
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
xor rdx, rdx
mov rdx, qword gs:[rdx + 0x60]
push rcx
push rsi
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
mov rsi, qword [rdx + 0x50]
movzx rcx, word [rdx + 0x4a]
xor r9, r9
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
push r9
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
push rax
mov r8d, dword [rax + 0x20]
add r8, rdx
mov ecx, dword [rax + 0x18]
jrcxz 0x1400040ca
xor r9, r9
dec rcx
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor rax, rax
lodsb al, byte [rsi]
ror r9d, 0xd
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
add rax, rdx
pop r8
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x6dae5ca0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6db065e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6dae5e28
mov rax, qword [0x6db065e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6dae5cec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6dae5d75
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6dae5cd0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6dae5e5d
mov rax, qword [0x6db065e8]
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 [0x6db065e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6dae5e40
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6dae5d6e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6dae5dd0
add dword [0x6db065e4], 1
cmp edi, 8
jae 0x6dae5da3
test dil, 4
jne 0x6dae5e14
test edi, edi
je 0x6dae5d98
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6dae5e2f
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 0x6dae5d98
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 0x6dae5dbc
jmp 0x6dae5d98
add rsi, qword [0x6db065e8]
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 0x6dae5d6e
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 0x6dae5d98
xor esi, esi
jmp 0x6dae5cf7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6dae5d98
mov rax, qword [0x6db065e8]
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 0x6dae65b0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6db068c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6db068a0]
test rbx, rbx
je 0x6dae6604
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 0x6dae65fb
test rsi, rsi
je 0x6dae65fb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6dae65e0
lea rcx, [0x6db068c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6dae6840
Capabilities:
Parse pe header

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

Function at 0x6dae6860
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 0x6dae68a1
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 0x6dae6898
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6dae68a3
add rax, 0x28
cmp rax, r9
jne 0x6dae6884
xor eax, eax
ret

Function at 0x6dae6940
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6db031f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6dae69ad
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6dae69ad
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 0x6dae69ad
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 0x6dae69a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6dae69af
add rax, 0x28
cmp rax, r9
jne 0x6dae6990
xor eax, eax
add rsp, 0x28
ret

Function at 0x6dae6ab0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6db031f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6dae6ad0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6dae6ac8
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 0x6dae6b2d
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 0x6dae6b24
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6dae6b34
add rax, 0x28
cmp rax, r9
jne 0x6dae6b10
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6dae6b50
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6db031f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6dae6bbe
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6dae6bbe
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6dae6bbe
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6dae6bbe
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 0x6dae6bb5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6dae6bc5
add rcx, 0x28
cmp rcx, rax
jne 0x6dae6ba0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6dae6bd8
jmp 0x6dae6bbe
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6dae6be6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6dae6bbe
test r9d, r9d
jg 0x6dae6bd0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6dae6f20
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
Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
push rcx
push rsi
xor rdx, rdx
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
xor r9, r9
movzx rcx, word [rdx + 0x4a]
mov rsi, qword [rdx + 0x50]
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
push r9
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
push rax
mov ecx, dword [rax + 0x18]
mov r8d, dword [rax + 0x20]
add r8, rdx
jrcxz 0x1400040ca
dec rcx
xor r9, r9
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
add rax, rdx
pop r8
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021