joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140028660
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x14004f3e0]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x1400286be
cmp word [rdx], r12w
jne 0x1400286be
or byte [rax + r8*8 + 0x38], cl
jmp 0x1400286c4
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14002881f
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x1400287fa
lea r9, [rcx + 2]
cmp ax, r13w
je 0x1400286fd
mov rcx, r9
jmp 0x140028720
cmp r9, rdx
jae 0x140028737
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x1400286e1
jmp 0x14002881f
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x1400287f4
cmp dword [rsp + 0x80], edi
je 0x1400287f4
mov rdx, r14
lea r11, [0x14004f3e0]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x1400287cd
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1400287a0
mov word [rbx], r12w
jmp 0x14002881b
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x1400287a9
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14002881b
cmp word [rsp + 0x70], r12w
jne 0x1400287da
cmp rbx, rsi
je 0x14002879a
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.1400292ec
cmp word [rsp + 0x70], r12w
je 0x14002881f
mov word [rbx], r13w
jmp 0x14002881b
lea r11, [0x14004f3e0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140028817
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14002881f
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14002c9c4
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.api_ms_win_core_processenvironment_l1_1_0.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14002c9f4
xor eax, eax
jmp 0x14002cab7
mov rbp, rbx
cmp word [rax], si
je 0x14002ca19
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14002ca00
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14002c9fc
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.14002b134
movsxd r14, eax
test eax, eax
jne 0x14002ca57
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_FreeEnvironmentStringsW]
jmp 0x14002c9ed
mov rcx, r14
call fcn.140023d50
mov rdi, rax
test rax, rax
jne 0x14002ca70
xor ecx, ecx
call fcn.140023d14
jmp 0x14002ca4c
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.14002b134
test eax, eax
jne 0x14002caa1
mov rcx, rdi
call fcn.140023d14
jmp 0x14002caab
xor ecx, ecx
call fcn.140023d14
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.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 0x140034b10
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1400292ec
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400292ec
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140034c60
cmp rax, 0xffffffffffffffff
je 0x140034c60
xor edi, edi
test rbp, rbp
jle 0x140034c0b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140025600
mov rbx, rax
test rax, rax
jne 0x140034b98
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140034c01
mov edx, 0x8000
mov ecx, r14d
call fcn.14002126c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140026174
cmp eax, 0xffffffff
je 0x140034be1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140034ba8
mov edx, r15d
mov ecx, r14d
call fcn.14002126c
jmp 0x140034c01
cmp byte [rsi + 0x38], dil
je 0x140034bf8
cmp dword [rsi + 0x34], 5
jne 0x140034bf8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140034c01
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140023d14
jmp 0x140034c74
jns 0x140034c74
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400292ec
cmp rax, 0xffffffffffffffff
jne 0x140034c2c
cmp byte [rsi + 0x30], dil
je 0x140034c74
mov edi, dword [rsi + 0x2c]
jmp 0x140034c74
mov ecx, r14d
call fcn.14002d6e4
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetEndOfFile]
test eax, eax
jne 0x140034c74
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140034c74
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140034c6d
mov eax, dword [rsi + 0x2c]
jmp 0x140034c72
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400292ec
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140001480
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140015690]
mov dword [rax], 1
mov rax, qword [0x1400156a0]
mov dword [rax], 1
mov rax, qword [0x1400156b0]
mov dword [rax], 1
mov rax, qword [0x140015680]
mov dword [rax], 1
mov rax, qword [0x140015530]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014de
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14000150a
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x140001530
cmp eax, 0x20b
je 0x140001557
jmp 0x140001586
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001543
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001572
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140002010
Capabilities:
Write file on windows

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

Function at 0x140002c42
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14001a168]
test eax, eax
je 0x140002cda
lea rax, [0x14001a140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14001a170]
mov qword [rbp - 8], rax
jmp 0x140002cbe
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002cb2
cmp qword [rbp - 0x10], 0
je 0x140002cb2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140002c78
lea rax, [0x14001a140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140002cdb
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140002de0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140002e08
mov eax, 0
jmp 0x140002e56
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140002e31
mov eax, 0
jmp 0x140002e56
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140002e51
mov eax, 0
jmp 0x140002e56
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140002e5c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140002eda
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140002ed1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140002ed1
mov rax, qword [rbp - 8]
jmp 0x140002eef
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140002ea4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x3a9fd1370
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov dword [rbp + 0x28], r9d
lea rax, [rbp - 8]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call rax
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0x800c
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
call rax
mov rax, qword [rbp - 0x10]
mov ecx, dword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptHashData]
call rax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov edx, 0x6610
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
call rax
mov rax, qword [rbp - 0x18]
lea rdx, [rbp + 0x18]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp + 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call rax
mov rax, qword [rbp - 8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
call rax
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
nop
add rsp, 0x50
pop rbp
ret
Function at 0x3a9fd14ae
Capabilities:
Create thread

Disassembly:
push rbp
mov eax, 0x17c70
call fcn.3a9fd2420
sub rsp, rax
lea rbp, [rsp + 0x80]
mov r9d, 0
lea r8, str.Gemini_Security
lea rax, str.Welcome_
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_MessageBoxA]
call rax
movabs rax, 0x6c66c075f06c70d
movabs rdx, 0x7279f9f1c88a142b
mov qword [rbp + 0x17bc0], rax
mov qword [rbp + 0x17bc8], rdx
lea rax, [rbp - 0x40]
lea rdx, [0x3a9fd90a8]
mov ecx, 0x17c00
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov dword [rbp + 0x17bec], 0x17c00
mov r9d, 4
mov r8d, 0x3000
mov edx, 0x17c00
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x17be0], rax
cmp qword [rbp + 0x17be0], 0
jne 0x3a9fd1584
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_Allocate_memory___u__n
mov rcx, rax
call sym.printf_char_const__::_
mov eax, 0xffffffff
jmp 0x3a9fd16b6
lea rcx, [rbp + 0x17bc0]
mov edx, dword [rbp + 0x17bec]
lea rax, [rbp - 0x40]
mov r9d, 0x10
mov r8, rcx
mov rcx, rax
call sym.DeAES_char__unsigned_long__unsigned_char__unsigned_long_
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x17be0]
mov r8d, 0x17c00
mov rcx, rax
call sym.memmove
lea rdx, [rbp - 0x44]
mov rax, qword [rbp + 0x17be0]
mov r9, rdx
mov r8d, 0x20
mov edx, 0x17c00
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
sete al
test al, al
je 0x3a9fd1611
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_change_memory_protection___u__n
mov rcx, rax
call sym.printf_char_const__::_
mov eax, 0xfffffffe
jmp 0x3a9fd16b6
mov rax, qword [rbp + 0x17be0]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8, rax
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp + 0x17bd8], rax
cmp qword [rbp + 0x17bd8], 0
jne 0x3a9fd1677
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Failed_to_Create_the_thread___u__n
mov rcx, rax
call sym.printf_char_const__::_
mov eax, 0xfffffffd
jmp 0x3a9fd16b6
mov rax, qword [rbp + 0x17be0]
mov rdx, rax
lea rax, str._n_nalloc_mem_:__p_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x17bd8]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp + 0x17be0]
call rax
mov eax, 0
add rsp, 0x17c70
pop rbp
ret

Function at 0x3a9fd1860
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 dbg.__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 dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x3a9fd18d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x3a9ff4064]
mov rbx, rcx
test esi, esi
jle 0x3a9fd1a00
mov rax, qword [0x3a9ff4068]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x3a9fd191b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x3a9fd19a5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x3a9fd1900
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x3a9fd1a22
mov rax, qword [0x3a9ff4068]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x3a9ff4068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3a9fd1a07
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x3a9fd199e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3a9fd19b0
add dword [0x3a9ff4064], 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 [0x3a9ff4068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x3a9fd199e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x3a9fd1928
mov rax, qword [0x3a9ff4068]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x3a9fd1da0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x3a9ff40a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x3a9ff4080]
test rbx, rbx
je 0x3a9fd1dfc
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 0x3a9fd1df3
test rsi, rsi
je 0x3a9fd1df3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x3a9fd1dd8
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 0x3a9fd2010
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x3a9fd2028
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x3a9fd2030
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x3a9fd2040
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x3a9fd208d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x3a9fd2084
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x3a9fd208f
add rax, 0x28
cmp rax, r9
jne 0x3a9fd2070
xor eax, eax
ret

Function at 0x3a9fd2090
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x3a9fd2120
mov rdx, qword [0x3a9ff1250]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x3a9fd210e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x3a9fd210e
cmp word [rax + 0x18], 0x20b
jne 0x3a9fd210e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x3a9fd2120
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x3a9fd20f9
add rbx, 0x28
cmp rbx, rdi
je 0x3a9fd2120
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x3a9fd20f0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

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

Function at 0x3a9fd21b0
Capabilities:
Parse pe header

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

Function at 0x3a9fd21f0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x3a9ff1250]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x3a9fd2210
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x3a9fd2218
ret
cmp word [rdx + 0x18], 0x20b
jne 0x3a9fd2210
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x3a9fd2260
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x3a9fd2257
test rcx, rcx
je 0x3a9fd2210
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x3a9fd2248
xor eax, eax
ret
Function at 0x3a9fd2270
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3a9ff1250]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x3a9fd228f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x3a9fd2298
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x3a9ff1250]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x3a9fd22d0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x3a9fd22d8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x3a9fd22d0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x3a9fd22d0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x3a9fd2324
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x3a9fd2330
add rdx, 0x28
cmp r9, rdx
jne 0x3a9fd2310
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x3a9ff1250]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x3a9fd2362
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x3a9fd2370
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x3a9fd2362
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x3a9fd2362
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x3a9fd2362
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x3a9fd23c5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x3a9fd23d8
add rdx, 0x28
cmp rdx, r10
jne 0x3a9fd23b0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x3a9fd23e7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x3a9fd23f7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x3a9fd23ce
test ecx, ecx
jg 0x3a9fd23e0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret