joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140009380
Capabilities:
Access the windows event log

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x60
mov rbp, rdx
mov rdx, qword [rcx + 8]
xorps xmm0, xmm0
mov rdi, rcx
xor ecx, ecx
movzx esi, r8w
movdqu xmmword [rsp + 0x50], xmm0
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x140009408
mov rcx, qword [rdi + 8]
mov edx, 2
lea rax, [rsp + 0x50]
mov qword [rsp + 0x50], rcx
xor ecx, ecx
xor r8d, r8d
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov word [rsp + 0x28], dx
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov rcx, rbx
movzx edx, si
mov qword [rsp + 0x58], rbp
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret

Function at 0x140009420
Capabilities:
Access the windows event log

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x280
mov rax, qword [0x14002e2c0]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rdi, rcx
mov dword [rsp + 0x20], r8d
mov r9, rdx
lea r8, str._s_failed_w_err_0x_08lx
lea rcx, [rsp + 0x60]
mov edx, 0x104
call fcn.140008ec0
mov rdx, qword [rdi + 8]
xor ecx, ecx
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x1400094d2
mov rcx, qword [rdi + 8]
mov r9d, 2
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rcx
xor ecx, ecx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x40], rcx
lea rax, [rsp + 0x50]
lea edx, [r9 - 1]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov word [rsp + 0x28], r9w
mov qword [rsp + 0x20], rcx
xor r8d, r8d
xor r9d, r9d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14000b770
mov rbx, qword [rsp + 0x2a8]
add rsp, 0x280
pop rdi
ret
Function at 0x140009500
Capabilities:
Create service
Persist via windows service

Disassembly:
push rbx
push rsi
sub rsp, 0x298
mov rax, qword [0x14002e2c0]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rbx, rdx
mov rsi, rcx
lea rdx, [rsp + 0x72]
mov r8d, 0x106
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movsxd rcx, eax
test eax, eax
jne 0x140009552
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x1400095c8
lea eax, [rcx + 2]
mov edx, 0x22
mov word [rsp + rcx*2 + 0x72], dx
movsxd rcx, eax
mov word [rsp + 0x70], dx
add rcx, rcx
cmp rcx, 0x20c
jae 0x140009686
mov qword [rsp + 0x2c0], rbp
xor ebp, ebp
xor edx, edx
mov word [rsp + rcx + 0x70], bp
lea r8d, [rbp + 3]
xor ecx, ecx
mov qword [rsp + 0x290], rdi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400095e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
mov rbp, qword [rsp + 0x2c0]
mov rdi, qword [rsp + 0x290]
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14000b770
add rsp, 0x298
pop rsi
pop rbx
ret
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x58], rbp
lea rax, [0x1400280ac]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rbp
lea rax, [rsp + 0x70]
mov r9d, 4
mov r8, rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov rdx, rsi
mov rcx, rdi
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140009657
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x140009666
lea rcx, str._s_is_installed._n
mov rdx, rsi
call fcn.14000cd80
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x1400095b8
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400095b8
call fcn.14000cb98
int3
Function at 0x140009690
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x14002e2c0]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
mov rdi, rcx
xor edx, edx
lea r8d, [rax + 1]
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400096f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x14000981f
mov r8d, 0x10024
mov rdx, rdi
mov rcx, rax
mov qword [rsp + 0x68], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140009733
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x140009803
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x140009803
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400097d1
lea rcx, str.Stopping__s.
mov rdx, rdi
call fcn.14000cd80
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400097b2
nop word [rax + rax]
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x1400097b6
lea rcx, [0x14002812c]
call fcn.14000cd80
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140009780
mov eax, dword [rsp + 0x24]
mov rdx, rdi
lea rcx, str._n_s_is_stopped._n
cmp eax, 1
je 0x1400097cc
lea rcx, str._n_s_failed_to_stop._n
call fcn.14000cd80
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400097f4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x140009803
lea rcx, str._s_is_removed._n
mov rdx, rdi
call fcn.14000cd80
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x14000981a
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000b770
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x140009840
Capabilities:
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x14002e2c0]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
mov rdi, rcx
xor edx, edx
lea r8d, [rax + 1]
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400098a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x14000998d
mov r8d, 0x24
mov rdx, rdi
mov rcx, rax
mov qword [rsp + 0x68], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400098e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x140009971
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000cd80
jmp 0x140009971
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140009971
lea rcx, str.Stopping__s.
mov rdx, rdi
call fcn.14000cd80
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140009952
nop dword [rax + rax]
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x140009956
lea rcx, [0x14002812c]
call fcn.14000cd80
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140009920
mov eax, dword [rsp + 0x24]
mov rdx, rdi
lea rcx, str._n_s_is_stopped._n
cmp eax, 1
je 0x14000996c
lea rcx, str._n_s_failed_to_stop._n
call fcn.14000cd80
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140009988
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000b770
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x1400099b0
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x60
mov ebp, edx
mov rsi, rcx
test edx, edx
je 0x1400099d7
neg r8d
sbb ebx, ebx
add ebx, 3
jmp 0x1400099e1
mov ebx, 4
call fcn.140009840
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140009a10
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed___d__n
mov edx, eax
call fcn.14000cd80
jmp 0x140009ac4
mov r8d, 2
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
jne 0x140009a40
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenService_failed___d__n
mov edx, eax
call fcn.14000cd80
jmp 0x140009abb
xor eax, eax
or r9d, 0xffffffff
mov r8d, ebx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
or edx, r9d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140009a92
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ChangeServiceConfig_failed___d__n
mov edx, eax
call fcn.14000cd80
jmp 0x140009ab2
lea rax, str.enabled
test ebp, ebp
lea rdx, str.disabled
lea rcx, str.Service__s_successfully._n
cmovne rdx, rax
call fcn.14000cd80
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
Function at 0x14000ae90
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor ebx, ebx
mov rdi, r9
mov rsi, r8
mov r15, rdx
mov r14d, ebx
test r9, r9
je 0x14000aeb9
mov r14d, dword [r9]
test rdx, rdx
je 0x14000af83
test r8, r8
je 0x14000af83
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x14000af74
mov qword [rsp + 0x30], rcx
cmp qword [rsp + 0x80], rbx
je 0x14000af11
mov rdx, qword [rsp + 0x80]
lea rax, [rsp + 0x30]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000af74
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rdx, r15
mov dword [rsp + 0x68], 4
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
cmp qword [rsp + 0x80], rbx
je 0x14000af51
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r15d, r15d
jne 0x14000af74
mov eax, dword [rsp + 0x78]
cmp eax, 4
je 0x14000af6b
cmp eax, 3
jne 0x14000af70
cmp dword [rsp + 0x68], 4
jne 0x14000af70
mov ebx, 1
mov eax, ebx
jmp 0x14000af85
test rdi, rdi
je 0x14000af83
mov dword [rsi], r14d
mov eax, 1
jmp 0x14000af85
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x14000afa0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
xor esi, esi
mov r14, r9
mov rdi, r8
mov r15, rdx
mov r12d, esi
test rdx, rdx
je 0x14000b14f
test r8, r8
je 0x14000b14f
test r9, r9
je 0x14000b14f
mov rcx, qword [rcx + 0x10]
mov qword [r11 + 8], rbx
or rbx, 0xffffffffffffffff
mov qword [r11 + 0x18], rbp
test rcx, rcx
je 0x14000b0ff
mov rbp, qword [rsp + 0x98]
mov r12d, dword [r9]
mov qword [r11 - 0x38], rcx
test rbp, rbp
je 0x14000b02c
lea rax, [r11 - 0x38]
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbp
mov qword [r11 - 0x48], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000b0ff
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x78]
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
test rbp, rbp
je 0x14000b05a
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x78]
cmp ecx, 2
jne 0x14000b0cc
mov eax, 2
mul r12
cmovo rax, rbx
mov rcx, rax
call fcn.14000b748
mov rbp, rax
test rax, rax
je 0x14000b0c8
mov r8d, r12d
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rdx, rdi
mov rcx, rbp
sub rdx, rbp
nop word [rax + rax]
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x14000b0a0
mov rax, rbx
inc rax
cmp word [rdi + rax*2], si
jne 0x14000b0b4
mov rcx, rbp
mov dword [r14], eax
call fcn.14000b750
mov ecx, dword [rsp + 0x78]
test r15d, r15d
jne 0x14000b0ff
lea eax, [rcx - 1]
cmp eax, 1
jbe 0x14000b0de
cmp ecx, 7
jne 0x14000b0e3
mov esi, 1
mov eax, esi
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14000b14b
nop dword [rax]
cmp word [rcx + rbx*2 + 2], si
lea rbx, [rbx + 1]
jne 0x14000b110
lea edx, [rbx*2 + 2]
cmp edx, r12d
ja 0x14000b14b
sub rdi, rcx
nop word [rax + rax]
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdi + rcx - 2], ax
test ax, ax
jne 0x14000b130
mov dword [r14], edx
mov eax, 1
jmp 0x14000b0e5
xor eax, eax
jmp 0x14000b0e5
xor eax, eax
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x14000b2e0
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push r14
sub rsp, 0x60
mov rcx, qword [rcx + 0x10]
mov rsi, r9
mov r14d, r8d
mov rbp, rdx
test rcx, rcx
je 0x14000b3c3
test rdx, rdx
je 0x14000b3c3
test r9, r9
je 0x14000b3c3
mov qword [r11 + 0x10], rbx
xor ebx, ebx
mov qword [r11 - 0x18], rcx
cmp qword [rsp + 0x98], rbx
je 0x14000b384
mov rdx, qword [rsp + 0x98]
lea rax, [r11 + 8]
xor r9d, r9d
mov qword [r11 - 0x28], rax
lea rax, [r11 - 0x18]
xor r8d, r8d
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x38], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14000b37f
xor eax, eax
mov rbx, qword [rsp + 0x78]
lea r11, [rsp + 0x60]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x90]
mov r9d, r14d
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp qword [rsp + 0x98], rbx
je 0x14000b3ba
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
sete bl
mov eax, ebx
jmp 0x14000b367
lea r11, [rsp + 0x60]
xor eax, eax
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x140002ca0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov al, 0xc5
mov byte [rsp + 0x27], 0x8c
and al, 0x27
invalid
invalid
Function at 0x6d7d3120
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d7f45e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d7d32a8
mov rax, qword [0x6d7f45e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7d316c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7d31f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7d3150
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7d32dd
mov rax, qword [0x6d7f45e8]
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 [0x6d7f45e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d7d32c0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7d31ee
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7d3250
add dword [0x6d7f45e4], 1
cmp edi, 8
jae 0x6d7d3223
test dil, 4
jne 0x6d7d3294
test edi, edi
je 0x6d7d3218
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7d32af
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 0x6d7d3218
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 0x6d7d323c
jmp 0x6d7d3218
add rsi, qword [0x6d7f45e8]
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 0x6d7d31ee
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 0x6d7d3218
xor esi, esi
jmp 0x6d7d3177
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7d3218
mov rax, qword [0x6d7f45e8]
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 0x6d7d3a30
Capabilities:
Get thread local storage value

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

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

Function at 0x6d7d3ce0
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 0x6d7d3d21
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 0x6d7d3d18
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7d3d23
add rax, 0x28
cmp rax, r9
jne 0x6d7d3d04
xor eax, eax
ret

Function at 0x6d7d3dc0
Capabilities:
Enumerate pe sections

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

Function at 0x6d7d3f30
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f11f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7d3f50
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d3f48
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 0x6d7d3fad
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 0x6d7d3fa4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d3fb4
add rax, 0x28
cmp rax, r9
jne 0x6d7d3f90
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7d3fd0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d7f11f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7d403e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d403e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7d403e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7d403e
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 0x6d7d4035
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7d4045
add rcx, 0x28
cmp rcx, rax
jne 0x6d7d4020
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7d4058
jmp 0x6d7d403e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7d4066
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7d403e
test r9d, r9d
jg 0x6d7d4050
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7d43a0
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 0x1400012b0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
mov edi, esi
xor eax, eax
lock cmpxchg qword [0x1400039c8], rbx
je 0x1400012f6
cmp rax, rbx
jne 0x1400012e9
mov edi, 1
jmp 0x1400012f6
mov ecx, 0x3e8
call qword [sym.imp.orauts.dll_Sleep]
jmp 0x1400012d0
mov eax, dword [0x1400039c4]
cmp eax, 1
jne 0x14000130b
lea ecx, [rax + 0x1e]
call sub.MSVCR80.dll__amsg_exit
jmp 0x14000134a
mov eax, dword [0x1400039c4]
test eax, eax
jne 0x140001340
mov dword [0x1400039c4], 1
lea rdx, [0x140002148]
lea rcx, [0x140002130]
call sub.MSVCR80.dll__initterm_e
test eax, eax
je 0x14000134a
mov eax, 0xff
jmp 0x14000142b
mov dword [0x1400039ac], 1
mov eax, dword [0x1400039c4]
cmp eax, 1
jne 0x140001372
lea rdx, [0x140002128]
lea rcx, [0x140002118]
call sub.MSVCR80.dll__initterm
mov dword [0x1400039c4], 2
test edi, edi
jne 0x14000137d
xchg qword [0x1400039c8], rsi
cmp qword [0x1400039e0], 0
je 0x1400013a6
lea rcx, [0x1400039e0]
call fcn.1400017e0
test eax, eax
je 0x1400013a6
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x1400039e0]
mov rcx, qword [sym.imp.MSVCR80.dll___initenv]
mov rax, qword [0x140003990]
mov qword [rcx], rax
mov r8, qword [0x140003990]
mov rdx, qword [0x140003998]
mov ecx, dword [0x140003988]
call 0x14000100e
mov dword [0x1400039a8], eax
cmp dword [0x14000398c], 0
jne 0x1400013e7
mov ecx, eax
call qword [sym.imp.MSVCR80.dll_exit]
cmp dword [0x1400039ac], 0
jne 0x1400013fc
call qword [sym.imp.MSVCR80.dll__cexit]
mov eax, dword [0x1400039a8]
jmp 0x14000142b
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
sub rsp, 0x28
call fcn.140001860
add rsp, 0x28
jmp 0x1400012b0