joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000eb90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rdi, r8
mov ebx, edx
test r8, r8
je 0x14000ecf6
mov rax, qword [rcx]
call qword [rax]
mov rsi, rax
test ebx, ebx
je 0x14000ebfd
cmp ebx, 3
je 0x14000ebfd
sub ebx, 1
je 0x14000ebec
cmp ebx, 1
jne 0x14000ecf6
movzx edx, di
mov rcx, rax
call qword [sym.imp.USER32.dll_LoadIconW]
jmp 0x14000ecf8
movzx edx, di
mov rcx, rsi
call qword [sym.imp.USER32.dll_LoadCursorW]
jmp 0x14000ecf8
movzx edx, di
mov r8d, 0xa
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
je 0x14000ecf6
xor r12d, r12d
mov edi, r12d
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x14000ecf6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r15, rax
test rax, rax
je 0x14000ecc5
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x30], xmm1
mov qword [rsp + 0x40], r12
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r8d, eax
mov rdx, r15
lea rcx, [rsp + 0x20]
call fcn.14000c770
test rax, rax
je 0x14000ec9e
mov rdi, qword [rsp + 0x20]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x30], xmm1
mov qword [rsp + 0x40], r12
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x14000ecc5
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x30], xmm1
mov qword [rsp + 0x40], r12
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
test rdi, rdi
je 0x14000ecf6
cmp ebx, 3
jne 0x14000ecf1
mov rcx, rdi
call fcn.14000e680
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbx
jmp 0x14000ecf8
mov rax, rdi
jmp 0x14000ecf8
xor eax, eax
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x14000edb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r14
sub rsp, 0x20
xor esi, esi
mov r14, r9
mov qword [r8 + 0x28], rsi
mov rbx, r8
mov rbp, rdx
test rdx, rdx
jne 0x14000ede2
lea eax, [rdx + 1]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
mov rax, qword [rcx]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r15
call qword [rax]
movzx edx, bp
mov r8, r14
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x14000eed7
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x14000eed7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
je 0x14000eece
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov qword [rbx + 0x28], rsi
cmp qword [rbx + 0x20], rdi
jl 0x14000eeac
cmp rdi, 1
jne 0x14000ee6a
movzx ecx, byte [r14]
mov rax, qword [rbx + 0x18]
mov byte [rax], cl
inc qword [rbx + 0x28]
jmp 0x14000eec9
cmp rdi, 2
jne 0x14000ee81
movzx ecx, word [r14]
mov rax, qword [rbx + 0x18]
mov word [rax], cx
add qword [rbx + 0x28], rdi
jmp 0x14000eec9
cmp rdi, 4
jne 0x14000ee96
mov ecx, dword [r14]
mov rax, qword [rbx + 0x18]
mov dword [rax], ecx
add qword [rbx + 0x28], rdi
jmp 0x14000eec9
cmp rdi, 8
jne 0x14000eeac
mov rcx, qword [r14]
mov rax, qword [rbx + 0x18]
mov qword [rax], rcx
add qword [rbx + 0x28], rdi
jmp 0x14000eec9
test eax, eax
je 0x14000eec9
mov rdx, rdi
mov rcx, rbx
call fcn.1400108e0
mov r8, rdi
mov rdx, r14
mov rcx, rax
call fcn.1400180c0
mov esi, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15, qword [rsp + 0x48]
mov rax, rsi
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
Function at 0x14000f7a0
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x10]
sub rsp, 0x110
test rcx, rcx
je 0x14000f909
cmp word [rcx], 0
je 0x14000f909
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movaps xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
mov qword [rbp], rax
mov dword [rbp - 0x60], 0x68
psrldq xmm0, 0xc
movd eax, xmm0
or eax, 1
mov dword [rbp - 0x24], eax
xor edi, edi
mov word [rbp - 0x20], di
lea rax, vtable.CVolCommonBaseWithMemManager.0
mov qword [rsp + 0x50], rax
lea rsi, vtable.CVolObject.0
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], rdi
lea r14, vtable.CVolMem.0
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], rdi
mov qword [rbp - 0x80], 0x40
mov rdx, rcx
lea rcx, [rsp + 0x50]
call fcn.140010a30
mov rdx, qword [rsp + 0x68]
cmp qword [rsp + 0x78], rdi
cmove rdx, rdi
lea rax, [rbp - 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x14000f8ab
mov ebx, edi
jmp 0x14000f8d3
mov edx, 0x1f4
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.USER32.dll_WaitForInputIdle]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
mov qword [rsp + 0x50], r14
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x14000f8f0
lea rcx, [rsp + 0x50]
mov r8, qword [rsp + 0x50]
call qword [r8 + 0x18]
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x50], rsi
mov rax, rbx
jmp 0x14000f90b
xor eax, eax
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x14000f960
Capabilities:
Accept command line arguments

Disassembly:
push rsi
push r14
sub rsp, 0x28
mov r14, rcx
call fcn.14000bb00
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
movzx eax, word [rax]
test ax, ax
je 0x14000f994
cmp ax, 0x20
ja 0x14000f994
movzx eax, word [rdx + 2]
add rdx, 2
test ax, ax
jne 0x14000f981
movzx r9d, word [rdx]
movzx eax, r9w
cmp r9w, 0x22
jne 0x14000f9a7
movzx eax, word [rdx + 2]
mov ecx, 0x20
mov r8d, 0x22
cmovne r8w, cx
lea rcx, [rdx + 2]
cmovne rcx, rdx
cmp ax, r8w
je 0x14000f9e1
movzx edx, ax
movzx eax, dx
test dx, dx
je 0x14000f9e1
movzx eax, word [rcx + 2]
add rcx, 2
movzx edx, ax
cmp ax, r8w
jne 0x14000f9c8
test ax, ax
lea rdx, [rcx + 2]
cmove rdx, rcx
mov rsi, rdx
cmp r9w, 0x22
jne 0x14000fa00
cmp word [rdx], 0x20
jne 0x14000fa00
lea rsi, [rdx + 2]
movzx eax, word [rsi]
test ax, ax
je 0x14000fb8e
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x20], r15
xor r15d, r15d
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbp
cmp ax, 0x22
jne 0x14000fad2
movzx eax, word [rsi + 2]
add rsi, 2
mov rdi, rsi
test ax, ax
je 0x14000fa53
nop dword [rax]
cmp ax, 0x22
je 0x14000fa53
movzx eax, word [rdi + 2]
add rdi, 2
test ax, ax
jne 0x14000fa40
mov rbx, rdi
sub rbx, rsi
sar rbx, 1
test rbx, rbx
jle 0x14000fa88
mov rax, qword [r14]
add rbx, rbx
mov rcx, r14
lea rdx, [rbx + 2]
call qword [rax]
mov r8, rbx
mov rdx, rsi
mov rcx, rax
mov rbp, rax
call fcn.1400180c0
mov word [rbx + rbp], r15w
jmp 0x14000fa8b
mov rbp, r15
mov rbx, qword [r14 + 0x30]
lea rcx, [r14 + 8]
mov rax, qword [rcx + 0x20]
sub rax, rbx
cmp rax, 8
jl 0x14000faaf
mov rax, qword [rcx + 0x18]
mov qword [rbx + rax], rbp
add qword [rcx + 0x28], 8
jmp 0x14000fabc
lea rdx, [rbx + 8]
call fcn.1400108e0
mov qword [rax + rbx], rbp
mov rsi, rdi
cmp word [rdi], r15w
je 0x14000fb6e
lea rsi, [rdi + 2]
jmp 0x14000fb6e
cmp ax, 0x20
jbe 0x14000fb6a
mov rdi, rsi
nop
cmp ax, 0x22
je 0x14000faf9
cmp ax, 0x20
jbe 0x14000faf9
movzx eax, word [rdi + 2]
add rdi, 2
test ax, ax
jne 0x14000fae0
mov rbx, rdi
sub rbx, rsi
sar rbx, 1
test rbx, rbx
jle 0x14000fb2e
mov rax, qword [r14]
add rbx, rbx
mov rcx, r14
lea rdx, [rbx + 2]
call qword [rax]
mov r8, rbx
mov rdx, rsi
mov rcx, rax
mov rbp, rax
call fcn.1400180c0
mov word [rbx + rbp], r15w
jmp 0x14000fb31
mov rbp, r15
mov rbx, qword [r14 + 0x30]
lea rcx, [r14 + 8]
mov rax, qword [rcx + 0x20]
sub rax, rbx
cmp rax, 8
jl 0x14000fb58
mov rax, qword [rcx + 0x18]
mov rsi, rdi
mov qword [rbx + rax], rbp
add qword [rcx + 0x28], 8
jmp 0x14000fb6e
lea rdx, [rbx + 8]
call fcn.1400108e0
mov rsi, rdi
mov qword [rax + rbx], rbp
jmp 0x14000fb6e
add rsi, 2
movzx eax, word [rsi]
test ax, ax
jne 0x14000fa23
mov r15, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, qword [r14 + 0x30]
shr rax, 3
add rsp, 0x28
pop r14
pop rsi
ret
Function at 0x14001300c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140013056
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140013056
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140013056
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140013056
cmp dword [rcx + 0x84], 0xe
jbe 0x140013056
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140013058
xor al, al
add rsp, 0x28
ret

Function at 0x140018ad8
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140018943
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140018943
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140018943
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140018943
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140018943
cmp dword [rcx + 0x84], 0xe
jbe 0x140018943
cmp dword [rcx + 0xf8], 0
je 0x140018943
mov ecx, ebx
call fcn.1400189f4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1400187d0
nop
cmp dword [rbp + 0x20], 0
je 0x140018991
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14001899c
int3
xor r8d, r8d
xor edx, edx
jmp 0x1400188d4
Function at 0x140021ef4
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140021f7b
mov rsi, rbx
cmp word [rax], bp
je 0x140021f3a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140021f24
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140021f20
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001fa18
mov rdi, rax
test rax, rax
je 0x140021f68
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400180c0
mov rbp, rdi
xor ecx, ecx
call fcn.14001e300
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140026940
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140026968
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140026968
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14002e84c
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x7f0]
sub rsp, 0x8f0
mov rax, qword [0x140056920]
xor rax, rsp
mov qword [rbp + 0x7e0], rax
mov rsi, rdx
lea rcx, [rsp + 0x74]
xor edx, edx
mov rdi, r8
lea r8d, [rdx + 0x64]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xorps xmm0, xmm0
mov dword [rsp + 0x70], 0x68
xor eax, eax
lea rdx, str.ExecuteCommandLine:_started
xor ecx, ecx
mov qword [rsp + 0x68], rax
movups xmmword [rsp + 0x58], xmm0
call fcn.14000b5ac
test rdi, rdi
jne 0x14002e8c5
mov ebx, 0x80070057
mov ecx, ebx
call fcn.14000bbd0
jmp 0x14002e9c7
mov r9, rsi
lea r8, [0x140046e20]
mov edx, 0x400
lea rcx, [rbp - 0x20]
call fcn.140003a5c
mov ebx, eax
test eax, eax
jns 0x14002e8e7
mov ecx, eax
jmp 0x14002e8bb
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp - 0x20]
lea rax, [rsp + 0x70]
xor r8d, r8d
mov qword [rsp + 0x40], rax
xor ecx, ecx
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000020
and dword [rsp + 0x20], 0
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessW]
nop dword [rax + rax]
test eax, eax
jne 0x14002e963
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14002e8b9
mov rcx, qword [rsp + 0x58]
or edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetExitCodeProcess]
nop dword [rax + rax]
test eax, eax
jne 0x14002e9c1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
lea rdx, str.ExecuteCommandLine:_Failed_to_get_process_information
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b430
mov ebx, eax
test eax, eax
js 0x14002e8e3
mov eax, dword [rsp + 0x50]
mov dword [rdi], eax
mov rcx, qword [rsp + 0x58]
cmp rcx, 0xffffffffffffffff
je 0x14002e9de
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x60]
cmp rcx, 0xffffffffffffffff
je 0x14002e9f5
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
test ebx, ebx
jne 0x14002e9fd
cmp dword [rdi], ebx
je 0x14002ea0e
mov r8, rsi
lea rdx, str.ExecuteCommandLine:_There_was_a_problem_executing_the_command_line__s
mov ecx, ebx
call fcn.14000b430
lea rdx, str.ExecuteCommandLine:_ended
mov ecx, ebx
call fcn.14000b5ac
mov ecx, ebx
call fcn.14000bbf0
mov eax, ebx
mov rcx, qword [rbp + 0x7e0]
xor rcx, rsp
call fcn.1400301c0
mov rbx, qword [rsp + 0x910]
add rsp, 0x8f0
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400301f4
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140056f20], eax
call fcn.140030aa0
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x140056f20], 0
jne case.default.0x14003024a
mov ecx, 1
call fcn.140030aa0
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
invalid
jg 0x14008ab70
test eax, 0xf7230d45
ret
Function at 0x6d7d7a40
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d7f85e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d7d7bc8
mov rax, qword [0x6d7f85e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7d7a8c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7d7b15
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7d7a70
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7d7bfd
mov rax, qword [0x6d7f85e8]
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 [0x6d7f85e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d7d7be0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7d7b0e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7d7b70
add dword [0x6d7f85e4], 1
cmp edi, 8
jae 0x6d7d7b43
test dil, 4
jne 0x6d7d7bb4
test edi, edi
je 0x6d7d7b38
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7d7bcf
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 0x6d7d7b38
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 0x6d7d7b5c
jmp 0x6d7d7b38
add rsi, qword [0x6d7f85e8]
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 0x6d7d7b0e
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 0x6d7d7b38
xor esi, esi
jmp 0x6d7d7a97
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7d7b38
mov rax, qword [0x6d7f85e8]
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 0x6d7d8350
Capabilities:
Get thread local storage value

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

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

Function at 0x6d7d8600
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 0x6d7d8641
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 0x6d7d8638
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7d8643
add rax, 0x28
cmp rax, r9
jne 0x6d7d8624
xor eax, eax
ret

Function at 0x6d7d86e0
Capabilities:
Enumerate pe sections

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

Function at 0x6d7d8850
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f51f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7d8870
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d8868
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 0x6d7d88cd
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 0x6d7d88c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d88d4
add rax, 0x28
cmp rax, r9
jne 0x6d7d88b0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7d88f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d7f51f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7d895e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d895e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7d895e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7d895e
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 0x6d7d8955
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7d8965
add rcx, 0x28
cmp rcx, rax
jne 0x6d7d8940
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7d8978
jmp 0x6d7d895e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7d8986
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7d895e
test r9d, r9d
jg 0x6d7d8970
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7d8cc0
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