joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400e3b00
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140119dd0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400e3b20
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400e3b28
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400e3b20
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x1400e3b70
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400e3b67
test rcx, rcx
je 0x1400e3b20
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400e3b58
xor eax, eax
ret

Function at 0x1400e3b80
Capabilities:
Parse pe header

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

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

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

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

Disassembly:
mov r11, qword [0x140119dd0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400e3c72
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400e3c80
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400e3c72
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400e3c72
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x1400e3c72
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x1400e3cd5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x1400e3ce8
add rdx, 0x28
cmp rdx, r10
jne 0x1400e3cc0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x1400e3cf7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x1400e3d07
mov edx, dword [rax + 0xc]
test edx, edx
je 0x1400e3cde
test ecx, ecx
jg 0x1400e3cf0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140002fd0
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.140003e20
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x140003040
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000a094]
test esi, esi
mov rbx, rcx
jle 0x140003170
mov rax, qword [0x14000a098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000308b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003115
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140003070
mov rcx, rbx
call fcn.140003ab0
test rax, rax
mov rdi, rax
je 0x140003192
mov rax, qword [0x14000a098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003bf0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003177
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000310e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003120
add dword [0x14000a094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x14000a098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000310e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002fd0
nop dword [rax]
xor esi, esi
jmp 0x140003098
mov rax, qword [0x14000a098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140002fd0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140002fd0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140003700
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000a100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x14000375c
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 0x140003753
test rsi, rsi
je 0x140003753
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003738
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 0x140003970
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400039a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400039b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140003980
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400039a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400039b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140003990
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400039a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400039b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

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

Function at 0x140003b30
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400075e0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140003b4f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003b58
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003b4f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140003bf0
Capabilities:
Parse pe header

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

Function at 0x140003dd0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov r8d, 0x2c
mov ecx, 2
lea rdx, str._stack_smashing_detected_:_terminated_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x140003e00
mov ecx, 2
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140004320
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x1400050e0], 0
je 0x14000433f
mov edx, 1
jmp 0x140004485
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor edx, edx
mov rcx, qword [rax + 0x10]
xor eax, eax
mov r10, qword [rcx + 0x30]
test r10, r10
je 0x1400043a3
movsxd rdx, dword [r10 + 0x3c]
mov edx, dword [r10 + rdx + 0x88]
test edx, edx
je 0x14000439b
lea rax, [rdx + r10]
mov edx, dword [rax + 0xc]
add rdx, r10
mov r8d, dword [rdx]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x14000439b
mov edx, dword [rdx + 4]
or edx, 0x20202020
cmp edx, 0x6c642e6c
je 0x1400043a6
mov rcx, qword [rcx]
mov rdx, r10
jmp 0x140004354
mov r10, rdx
xor edx, edx
test rax, rax
je 0x140004485
mov ebp, dword [rax + 0x1c]
mov qword [0x1400060a0], r10
xor r11d, r11d
mov esi, dword [rax + 0x24]
lea r13, [0x1400050e4]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rbp, r10
add rsi, r10
lea ebx, [rdx - 1]
add rax, r10
lea rdi, [rax + rbx*4]
add rbx, rbx
add rbx, rsi
mov ecx, dword [rdi]
add rcx, r10
cmp word [rcx], 0x775a
jne 0x140004419
mov eax, r11d
inc r11d
lea r12, [r13 + rax*8]
call fcn.1400042f0
cmp r11d, 0x1f4
mov dword [r12], eax
movzx eax, word [rbx]
mov eax, dword [rbp + rax*4]
mov dword [r12 + 4], eax
je 0x14000442b
lea rax, [rbx - 2]
sub rdi, 4
cmp rsi, rbx
je 0x14000442b
mov rbx, rax
jmp 0x1400043e4
mov dword [0x1400050e0], r11d
lea r10, [0x1400050e4]
dec r11d
test r11d, r11d
je 0x140004335
lea rax, [0x1400050e0]
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, dword [rax + 8]
mov rdx, rcx
lea rcx, [r10 + rcx*8]
mov r9d, dword [rcx + 4]
cmp r9d, r8d
jae 0x140004477
mov ebx, dword [rax + 4]
mov esi, dword [rcx]
mov dword [rax + 8], r9d
mov dword [rax + 4], esi
mov dword [rcx], ebx
mov dword [rcx + 4], r8d
add rax, 8
cmp edx, r11d
jb 0x14000444e
dec r11d
jmp 0x14000443c
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x140004640
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x250
mov rbx, qword [0x1400076b0]
lea rsi, section..rdata
mov rax, qword [rbx]
mov qword [rsp + 0x248], rax
xor eax, eax
lea rdi, [rsp + 0x28]
mov r9, rcx
mov ecx, 8
rep movsd dword [rdi], dword [rsi]
lea r10, [rsp + 0x148]
mov r11, rdx
lea rbp, [rsp + 0x48]
mov rdx, rax
mov byte [rax + r10], al
inc rax
and edx, 0x1f
mov dl, byte [rsp + rdx + 0x28]
mov byte [rax + rbp - 1], dl
cmp rax, 0x100
jne 0x14000468b
mov r12, r10
xor esi, esi
xor r13d, r13d
mov edi, 0x100
movzx eax, byte [r12]
movzx edx, byte [rbp + rsi]
inc rsi
add eax, r13d
add eax, edx
cdq
idiv edi
movsxd rcx, edx
mov rdx, r12
inc r12
mov r13, rcx
add rcx, r10
call fcn.1400045c0
cmp rsi, 0x100
jne 0x1400046b5
lea rdi, [r9 + r11]
xor ebp, ebp
xor r12d, r12d
cmp rdi, r9
je 0x140004745
lea eax, [rbp + 1]
cdq
idiv esi
movsxd r13, edx
movzx eax, byte [rsp + r13 + 0x148]
lea rcx, [r10 + r13]
mov rbp, r13
add eax, r12d
cdq
idiv esi
movsxd r14, edx
lea rdx, [r10 + r14]
mov r12, r14
call fcn.1400045c0
mov cl, byte [rsp + r14 + 0x148]
add cl, byte [rsp + r13 + 0x148]
movzx ecx, cl
mov al, byte [rsp + rcx + 0x148]
xor byte [r9], al
inc r9
jmp 0x1400046f0
mov rax, qword [rsp + 0x248]
sub rax, qword [rbx]
je 0x140004757
call fcn.140003dd0
mov rax, r11
add rsp, 0x250
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0040c850]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0040c860]
mov dword [rax], 1
mov rax, qword [0x0040c870]
mov dword [rax], 1
mov rax, qword [0x0040c840]
mov dword [rax], 1
mov rax, qword [0x0040c730]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0040c830]
mov dword [0x0040f00c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x0040c7f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x0040c6e0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

Function at 0x401b40
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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 rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x401bb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0040f614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401d58
mov rax, qword [0x0040f618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401bfc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401c87
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401be0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x401d92
mov rax, qword [0x0040f618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0040f618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401da1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401c80
sub eax, 4
and eax, 0xfffffffb
jne 0x401d10
add dword [0x0040f614], 1
cmp ebx, 8
jae 0x401cb8
test bl, 4
jne 0x401d60
test ebx, ebx
je 0x401ca9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401d80
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x401ca9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x401cea
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x0040f618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c80
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 edi, edi
jmp 0x401c07
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401ca9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401ca9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x0040f618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x402580
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040f900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040f8e0]
test rbx, rbx
je 0x4025d4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x4025cb
test r12, r12
je 0x4025cb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4025b0
lea rcx, [0x0040f900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402800
Capabilities:
Parse pe header

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

Function at 0x402820
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 0x402865
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40285c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402867
add rax, 0x28
cmp rax, r9
jne 0x402848
xor eax, eax
ret

Function at 0x402910
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x0040c730]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402989
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402989
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x402986
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40297d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402989
add r8, 0x28
cmp r8, r9
jne 0x402968
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x402a70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x0040c730]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402adf
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402adf
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x402add
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x402ad4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402ae8
add rax, 0x28
cmp rax, r9
jne 0x402ac0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402b00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x0040c730]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402b78
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402b78
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402b78
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402b78
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x402b6c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402b80
add rdx, 0x28
cmp rdx, r10
jne 0x402b58
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402b90
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402b9e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402b75
test r8d, r8d
jg 0x402b88
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x403910
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x0040f9c8]
test rbx, rbx
je 0x403948
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x0040f9c8]
test rax, rax
je 0x403970
cmp dword [rax], 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x0040f9c8], rax
mov rbx, rax
jmp 0x403921
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x0040f9c8], rax
jmp 0x403935

Function at 0x403e20
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x403e45
call sym.pthread_spin_destroy
cmp eax, 1
je 0x403e52
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
ret
lea r12, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x403ed8
mov eax, 0x28
jmp 0x403eaa
add rax, 1
cmp rax, 0x6b
je 0x403eca
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x403ea0
cmp eax, 0x6a
je 0x403eca
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
jmp 0x403eb8