joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401cfe
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, qword [fcn.0040b670]
xor ebx, ebx
mov rbp, rcx
mov r12, rdx
cmp rbx, r12
jl 0x401d56
mov ecx, 1
call rsi
mov r8d, 1
mov edx, 1
lea rcx, [0x0040d13c]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rsi
mov rcx, rax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.0040b5a0
mov rdi, qword [rbp + rbx*8]
mov ecx, 1
inc rbx
call rsi
xor r8d, r8d
mov rcx, rax
mov rdx, rdi
call fcn.00401c5c
jmp 0x401d17

Function at 0x401f2b
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov rcx, rdx
mov edx, 1
mov r9, rbx
mov rsi, r8
call sub.msvcrt.dll_fread
cmp rsi, rax
je 0x401f5e
mov rcx, rbx
mov qword [rsp + 0x28], rax
call fcn.00401e6d
mov rax, qword [rsp + 0x28]
add rsp, 0x38
pop rbx
pop rsi
ret

Function at 0x4023d7
Capabilities:
Write file on windows

Disassembly:
push rdi
push rbx
sub rsp, 0x28
xor r8d, r8d
test rdx, rdx
mov rbx, rcx
mov r10, rdx
je 0x402400
mov rdi, rdx
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, rcx
not rdx
lea r8, [rdx - 1]
mov rcx, r10
mov r9, rbx
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rdi
jmp fcn.0040b5a0

Function at 0x404b1d
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rsi, rcx
mov qword [rsp + 0x28], rdx
mov ecx, 2
call qword [fcn.0040b670]
mov r8, qword [rsp + 0x28]
mov rcx, rsi
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.0040b5a0
Function at 0x407166
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov qword [rsp + 0xd0], rcx
lea rcx, [0x0040dce0]
mov qword [rsp + 0xd8], rdx
mov edx, 0x3661c085
mov dword [rsp + 0x6c], 0
call fcn.004070e0
lea rcx, [0x0040dc60]
test rax, rax
je 0x4071b8
cmp qword [rax], 0
je 0x4071b8
lea rcx, [rax + 0x10]
mov rax, qword [0x0040efe0]
xor r9d, r9d
mov edx, 0x80000000
xor r14d, r14d
mov r8d, 1
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x30], 0
lea rbp, [0x0040dcc0]
mov dword [rsp + 0x20], 3
call qword [rax]
xor edx, edx
mov rcx, rax
mov rsi, rax
mov rax, qword [0x0040eff0]
call qword [rax]
mov edi, eax
mov rax, qword [0x0040f020]
call qword [rax]
movsxd r8, edi
xor edx, edx
mov rcx, rax
mov rax, qword [0x0040f010]
call qword [rax]
lea r9, [rsp + 0x6c]
mov rcx, rsi
mov r8d, edi
mov qword [rsp + 0x20], 0
mov rbx, rax
mov rdx, rax
mov rax, qword [0x0040f000]
call qword [rax]
movsxd r13, dword [rbx + 0x3c]
add r13, rbx
movzx r12d, word [r13 + 0x14]
lea rsi, [r13 + 0x18]
mov eax, dword [r13 + 0x88]
add r12, rsi
mov dword [rsp + 0x48], eax
mov r15, r12
cmp word [r13 + 6], r14w
ja 0x4072aa
movsxd r8, dword [rsp + 0x48]
movsxd rcx, dword [r15 + 0xc]
movsxd rdx, dword [r15 + 0x14]
add r8, rbx
sub r8, rcx
lea r13, [r8 + rdx]
movsxd rdi, dword [r13 + 0x20]
add rdi, rbx
sub rdi, rcx
lea rax, [rdi + rdx]
xor edi, edi
mov qword [rsp + 0x50], rax
movsxd rax, dword [r13 + 0x1c]
add rax, rbx
sub rax, rcx
add rax, rdx
mov qword [rsp + 0x48], rax
jmp 0x4072e2
movzx edi, word [r13 + 0x14]
imul eax, r14d, 0x28
mov edx, 8
movzx eax, ax
add rdi, rsi
add rdi, rax
mov rcx, rdi
call fcn.0040712e
mov rdx, rbp
mov rcx, rax
call fcn.00406238
test al, al
cmove rdi, r15
inc r14d
mov r15, rdi
jmp 0x407263
cmp dword [r13 + 0x18], edi
jle 0x4073a8
mov rcx, qword [rsp + 0x50]
movsxd rdx, edi
inc edi
call fcn.004070d5
mov rcx, qword [rsp + 0x48]
movsxd rdx, edi
movsxd rbp, dword [rax]
movsxd rax, dword [r15 + 0xc]
add rbp, rbx
sub rbp, rax
movsxd rax, dword [r15 + 0x14]
add rbp, rax
call fcn.004070d5
movsxd r14, dword [r12 + 0xc]
mov rcx, rbp
movsxd rsi, dword [rax]
mov eax, dword [r12 + 0x14]
mov rdx, qword [rsp + 0xd0]
mov dword [rsp + 0x5c], eax
mov rax, qword [0x0040f050]
call qword [rax]
test eax, eax
jne 0x4072e2
add rsi, rbx
mov rcx, qword [0x0040c090]
mov rbx, rsi
movsxd rsi, dword [rsp + 0x5c]
sub rbx, r14
mov rdi, qword [rsp + 0xd8]
add rsi, rbx
rep movsb byte [rdi], byte [rsi]
lea rbx, [rsp + 0x70]
mov ecx, 4
mov rdi, rbx
rep stosd dword [rdi], eax
lea rcx, [0x0040dc80]
call fcn.004053ac
mov rcx, rbp
mov qword [rsp + 0x70], rax
call fcn.004045bf
mov edx, 2
mov rcx, rbx
mov qword [rsp + 0x78], rax
call fcn.00401cfe
mov eax, 1
jmp 0x4073aa
xor eax, eax
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x4073e7
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
test rcx, rcx
je 0x40740f
cmp word [rcx], 0x5a4d
jne 0x40740f
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x40740f
mov ax, word [rcx + 0x16]
shr ax, 0xd
and eax, 1
ret
Function at 0x40746e
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
xor eax, eax
mov dword [rsp + 0x34], r9d
lea r9, [rsp + 0x40]
mov r13, rcx
mov r12, rdx
mov rdi, r9
mov ecx, 0x20
rep stosd dword [rdi], eax
mov rcx, r13
call fcn.004073e7
test eax, eax
jne 0x4074b0
xor edx, edx
jmp 0x407641
movsxd rax, dword [r13 + 0x3c]
mov ecx, 0x20
mov rdi, r9
lea rsi, [r13 + rax + 0x88]
rep movsd dword [rdi], dword [rsi]
mov eax, dword [rsp + 0x44]
test eax, eax
mov dword [rsp + 0x28], eax
je 0x4074a9
movsxd rsi, dword [rsp + 0x40]
test esi, esi
je 0x4074a9
add rsi, r13
movsxd r9, dword [rsi + 0x1c]
add r9, r13
test r12, r12
je 0x407513
cmp qword [r12], 0
je 0x407513
mov eax, dword [rsi + 0x18]
mov r14, r9
mov dword [rsp + 0x30], 0
mov ebp, dword [r9]
mov dword [rsp + 0x2c], eax
movsxd rax, dword [rsi + 0x20]
mov r15d, dword [rax + r13]
jmp 0x407596
movsxd rdx, dword [r9 + r8*4 - 4]
jmp 0x407608
mov rax, qword [0x0040f070]
movsxd r11, r15d
xor edx, edx
lea r8, [0x0040dd21]
add r11, r13
mov rcx, r11
mov qword [rsp + 0x38], r11
call qword [rax]
xor edx, edx
mov rcx, rax
call fcn.004073c1
mov r11, qword [rsp + 0x38]
test al, al
je 0x4075a9
add r14, 4
mov ebx, dword [r14]
test r11, r11
mov ecx, 1
je 0x40756e
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r11
repne scasb al, byte [rdi]
not ecx
add r15d, ecx
cmp qword [r12], 0
lea rcx, [0x0040dd20]
je 0x407584
lea rcx, [r12 + 0x10]
mov rdx, r11
call fcn.004073c1
test al, al
jne 0x4075b1
inc dword [rsp + 0x30]
mov ebp, ebx
mov ebx, dword [rsp + 0x30]
cmp dword [rsp + 0x2c], ebx
jge 0x40751d
jmp 0x4074a9
inc dword [rsp + 0x2c]
mov ebx, ebp
jmp 0x407557
lea rcx, [0x0040de40]
mov edx, 0x20e2115f
call fcn.00407415
mov edx, 0x22e1588d
lea rcx, [0x0040de00]
call fcn.00407415
mov edx, 0x75be65f7
lea rcx, [0x0040dde0]
call fcn.00407415
mov edx, 0x51ba83d5
lea rcx, [0x0040dda0]
call fcn.00407415
mov ecx, dword [rsp + 0x34]
call fcn.00406e40
movsxd rdx, ebp
test al, al
je 0x407608
movsxd rdx, ebx
add rdx, r13
test rdx, rdx
je 0x4074a9
cmp rdx, rsi
jb 0x407641
movsxd rax, dword [rsp + 0x28]
add rsi, rax
cmp rdx, rsi
jae 0x407641
mov rcx, r13
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp 0x407789
mov rax, rdx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov ebp, 0x10
mov r8d, 3
mov rdi, rbp
lea r12, [rsp + 0x68]
mov rbx, rcx
mov qword [rsp + 0x68], rdx
mov rsi, rdx
mov qword [rsp + 0x28], 0
mov rcx, r12
sub rcx, rdx
lea rdx, [0x0040dd90]
movsxd rcx, ecx
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x28]
mov rdi, rbp
call fcn.00405543
mov rax, qword [rsp + 0x28]
mov ecx, 0x41
xor edx, edx
lea rsi, [rax + 0x10]
rep movsd dword [rdi], dword [rsi]
call fcn.00407658
test rax, rax
je 0x407808
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, rax
call fcn.0040746e
jmp 0x407813
mov rdx, r12
mov rcx, rbx
call fcn.00407735
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x407658
Capabilities:
Access peb ldr_data

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rbx, qword [rax + 0x20]
lea rbp, [rax + 0x20]
mov rsi, rcx
mov edi, edx
mov rax, qword [0x0040f060]
mov rcx, rsi
mov rdx, qword [rbx + 0x50]
call qword [rax]
test eax, eax
je 0x407698
mov rbx, qword [rbx]
cmp rbp, rbx
jne 0x40767a
jmp 0x4076a1
mov rax, qword [rbx + 0x20]
jmp 0x40772c
xor eax, eax
test edi, edi
je 0x40772c
lea rcx, [0x0040dd60]
call fcn.00406eec
xor edx, edx
mov rcx, rax
call fcn.00407658
xor r8d, r8d
mov r9d, 1
lea rdx, [0x0040dd40]
mov rcx, rax
call fcn.0040746e
test rax, rax
mov rbx, rax
jne 0x4076e5
xor eax, eax
jmp 0x40772c
lea r8, [rsp + 0x40]
xor eax, eax
mov ecx, 4
mov qword [rsp + 0x38], 0
mov rdi, r8
mov rdx, rsi
mov qword [rsp + 0x28], r8
rep stosd dword [rdi], eax
mov rax, qword [0x0040efd0]
mov rcx, r8
call qword [rax]
xor edx, edx
xor ecx, ecx
mov r8, qword [rsp + 0x28]
lea r9, [rsp + 0x38]
call rbx
test eax, eax
jne 0x4076e1
mov rax, qword [rsp + 0x38]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x407735
Capabilities:
Access peb ldr_data

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rbx, qword [rax + 0x20]
lea rsi, [rax + 0x20]
mov rdi, rcx
mov rbp, rdx
cmp rbx, rsi
je 0x40777e
mov rcx, qword [rbx + 0x20]
cmp rcx, rdi
je 0x407779
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
call fcn.0040746e
test rax, rax
jne 0x407780
mov rbx, qword [rbx]
jmp 0x407758
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x40a070
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00414664]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40a1f8
mov rax, qword [0x00414668]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40a0bc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40a145
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40a0a0
mov rcx, rbx
call fcn.0040ad10
test rax, rax
mov r12, rax
je 0x40a22d
mov rax, qword [0x00414668]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.0040ae40
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00414668]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40a210
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40a13e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40a1a0
add dword [0x00414664], 1
cmp edi, 8
jae 0x40a173
test dil, 4
jne 0x40a1e4
test edi, edi
je 0x40a168
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40a1ff
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 0x40a168
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 0x40a18c
jmp 0x40a168
add rsi, qword [0x00414668]
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 0x40a13e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040b810
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40a168
xor esi, esi
jmp 0x40a0c7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40a168
mov rax, qword [0x00414668]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.0040b810
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040b810
nop
nop dword [rax]

Function at 0x40a980
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00414940]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00414920]
test rbx, rbx
je 0x40a9d4
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 0x40a9cb
test rsi, rsi
je 0x40a9cb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40a9b0
lea rcx, [0x00414940]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40ad10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0040f270]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40ad7d
mov rcx, r8
call fcn.0040abf0
test eax, eax
je 0x40ad7d
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 0x40ad7d
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 0x40ad74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40ad7f
add rax, 0x28
cmp rax, r9
jne 0x40ad60
xor eax, eax
add rsp, 0x28
ret

Function at 0x40b810
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
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 fcn.0040b670
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.0040b670
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140001a5c
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400213d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400213e0]
mov dword [rax], 1
mov rax, qword [0x1400213f0]
mov dword [rax], 1
mov rax, qword [0x140021380]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400213c0]
mov dword [0x14002400c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400214a0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140021480]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140021330]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x140001450
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 rdi
push rsi
push rbx
sub rsp, 0x50
mov dword [rsp + 0x78], edx
mov rdi, rcx
mov rbx, r8
mov esi, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x38]
mov r9d, 0x18
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140001548
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov edx, 0x800c
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140001548
xor r9d, r9d
mov rcx, qword [rsp + 0x40]
mov r8d, esi
mov rdx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140001548
lea rax, [rsp + 0x48]
xor r9d, r9d
mov r8, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov edx, 0x6610
call qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x140001548
lea rax, [rsp + 0x78]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140001548
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor eax, eax
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
mov eax, 0xffffffff
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x140001820
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 0x140001890
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400240b4]
mov rbx, rcx
test esi, esi
jle 0x1400019c0
mov rax, qword [0x1400240b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400018db
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001965
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400018c0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400019e2
mov rax, qword [0x1400240b8]
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 [0x1400240b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400019c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000195e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001970
add dword [0x1400240b4], 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 [0x1400240b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000195e
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 0x1400018e8
mov rax, qword [0x1400240b8]
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 0x140001f50
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140024120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140024100]
test rbx, rbx
je 0x140001fac
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 0x140001fa3
test rsi, rsi
je 0x140001fa3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001f88
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 0x1400021c0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400021d8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400021e0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400021f0
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 0x14000223d
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 0x140002234
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000223f
add rax, 0x28
cmp rax, r9
jne 0x140002220
xor eax, eax
ret

Function at 0x140002240
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400022d0
mov rdx, qword [0x140021380]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400022be
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400022be
cmp word [rax + 0x18], 0x20b
jne 0x1400022be
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400022d0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400022a9
add rbx, 0x28
cmp rbx, rdi
je 0x1400022d0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400022a0
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 0x1400022e0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140002360
Capabilities:
Parse pe header

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