joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400df7f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x30], rax
movups xmm0, xmmword [rdx]
movaps xmmword [rsp + 0x20], xmm0
mov rdi, qword [rcx + 0x50]
mov rbp, qword [rcx + 0x58]
mov r15d, 1
cmp rdi, rbp
je 0x1400df888
mov r14, r8
mov rsi, rcx
lea rbx, [rsp + 0x20]
mov rcx, rdi
mov rdx, rbx
call fcn.1400df120
test al, al
jne 0x1400df84c
add rdi, 0x70
cmp rdi, rbp
jne 0x1400df831
mov rdi, rbp
cmp rdi, qword [rsi + 0x58]
je 0x1400df888
cmp byte [rdi + 0x27], 0
jns 0x1400df85e
mov rcx, qword [rdi + 0x10]
jmp 0x1400df862
lea rcx, [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
shr ecx, 3
and ecx, 2
cmp eax, 0xffffffff
mov r15d, 1
cmovne r15d, ecx
test r15d, r15d
jne 0x1400df888
mov qword [r14], rdi
xor r15d, r15d
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140087640
mov eax, r15d
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x1400dfa00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x40
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rdx]
movaps xmmword [rsp + 0x20], xmm0
mov rdi, qword [rcx + 0x50]
mov rsi, qword [rcx + 0x58]
mov r12d, 1
cmp rdi, rsi
je 0x1400dfa8a
mov r14, r9
mov r15d, r8d
mov rbx, rcx
lea rbp, [rsp + 0x20]
mov rcx, rdi
mov rdx, rbp
call fcn.1400df120
test al, al
jne 0x1400dfa61
add rdi, 0x70
cmp rdi, rsi
jne 0x1400dfa46
mov rdi, rsi
cmp rdi, qword [rbx + 0x58]
je 0x1400dfa8a
mov eax, dword [rdi + 0x68]
cmp eax, r15d
jne 0x1400dfa7b
cmp byte [rdi + 0x27], 0
jns 0x1400dfaa9
mov rcx, qword [rdi + 0x10]
jmp 0x1400dfaad
xor ecx, ecx
cmp eax, 1
sete cl
lea r12d, [rcx + rcx*2]
inc r12d
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140087640
mov eax, r12d
add rsp, 0x40
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rcx, [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400dfa8a
shr eax, 3
and eax, 2
mov r12d, eax
jne 0x1400dfa8a
mov byte [rbx + 0x48], 1
mov qword [r14], rdi
xor r12d, r12d
jmp 0x1400dfa8a
Function at 0x1400e6af0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1a0
mov ebx, edx
mov rsi, rcx
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x198], rax
cmp byte [rcx + 0x17], 0
jns 0x1400e6b1a
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400e6b3c
mov edi, eax
test bl, bl
jne 0x1400e6b34
mov eax, edi
and eax, 0x400
jne 0x1400e6b4a
and edi, 0x10
shr edi, 4
jmp 0x1400e6b4c
mov ecx, 2
call fcn.140069cb0
test al, al
jne 0x1400e6b69
xor edi, edi
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.140087640
mov eax, edi
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rcx, [rsp + 0x58]
mov r8d, 0x82
mov r9d, 2
call fcn.1400d4d70
lea rcx, [rsp + 0x68]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.1400b97e0
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x40]
mov rcx, rsi
call fcn.14006d130
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x1400e6be8
mov r8, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rcx, rdi
mov rdx, rsi
call fcn.1400b97e0
cmp byte [rsp + 0x57], 0
jns 0x1400e6c04
mov rcx, qword [rsp + 0x40]
call fcn.140086158
lea rcx, [rsp + 0x58]
call fcn.1400d4df0
jmp 0x1400e6b4a

Function at 0x1400e6c20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
sub rsp, 0x198
mov rsi, rcx
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x190], rax
cmp byte [rcx + 0x17], 0
jns 0x1400e6c47
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400e6c77
test eax, 0x410
sete sil
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.140087640
mov eax, esi
add rsp, 0x198
pop rdi
pop rsi
ret
mov ecx, 2
call fcn.140069cb0
test al, al
jne 0x1400e6c89
xor esi, esi
jmp 0x1400e6c5b
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rcx, [rsp + 0x50]
mov r8d, 0x75
mov r9d, 2
call fcn.1400d4d70
lea rcx, [rsp + 0x60]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.1400b97e0
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x28]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x38]
mov rcx, rsi
call fcn.14006d130
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x1400e6d08
mov r8, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, rsi
call fcn.1400b97e0
cmp byte [rsp + 0x4f], 0
jns 0x1400e6d24
mov rcx, qword [rsp + 0x38]
call fcn.140086158
lea rcx, [rsp + 0x50]
call fcn.1400d4df0
jmp 0x1400e6c85
Function at 0x1400e6d40
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push rsi
push rdi
sub rsp, 0x198
mov rsi, rcx
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x190], rax
cmp byte [rcx + 0x17], 0
jns 0x1400e6d67
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400e6d7e
and eax, 0x410
cmp eax, 0x410
je 0x1400e6dc5
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1400e6d8a
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dil, 1
test eax, eax
je 0x1400e6db3
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.140087640
mov eax, edi
add rsp, 0x198
pop rdi
pop rsi
ret
mov ecx, 2
call fcn.140069cb0
test al, al
jne 0x1400e6de6
xor edi, edi
jmp 0x1400e6d97
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.140087640
mov rcx, rsi
add rsp, 0x198
pop rdi
pop rsi
jmp fcn.1400e6e90
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rcx, [rsp + 0x50]
mov r8d, 0x95
mov r9d, 2
call fcn.1400d4d70
lea rcx, [rsp + 0x60]
lea rdx, str.DeleteFile
mov r8d, 0xb
call fcn.1400b97e0
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x28]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x38]
mov rcx, rsi
call fcn.14006d130
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x1400e6e65
mov r8, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, rsi
call fcn.1400b97e0
cmp byte [rsp + 0x4f], 0
jns 0x1400e6e81
mov rcx, qword [rsp + 0x38]
call fcn.140086158
lea rcx, [rsp + 0x50]
call fcn.1400d4df0
jmp 0x1400e6dc1

Function at 0x1400e6e90
Capabilities:
Delete directory

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1a0
mov rdi, rcx
mov rax, qword [0x140114038]
xor rax, rsp
mov qword [rsp + 0x198], rax
cmp byte [rcx + 0x17], 0
jns 0x1400e6eb8
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
test eax, eax
jne 0x1400e6ed2
mov ecx, 2
call fcn.140069cb0
test al, al
jne 0x1400e6ef4
test esi, esi
setne bl
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.140087640
mov eax, ebx
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
lea rcx, [rsp + 0x58]
mov r8d, 0x30
mov r9d, 2
call fcn.1400d4d70
lea rcx, [rsp + 0x68]
lea rdx, str.RemoveDirectory
mov r8d, 0x10
call fcn.1400b97e0
mov rbx, rax
movzx eax, byte [rdi + 0x17]
test al, al
mov rcx, qword [rdi]
cmovns rcx, rdi
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
cmovs rax, qword [rdi + 8]
mov qword [rdx + 8], rax
lea rdi, [rsp + 0x40]
mov rcx, rdi
call fcn.14006d130
movzx r8d, byte [rdi + 0x17]
test r8b, r8b
jns 0x1400e6f73
mov r8, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
mov rcx, rbx
mov rdx, rdi
call fcn.1400b97e0
cmp byte [rsp + 0x57], 0
jns 0x1400e6f8f
mov rcx, qword [rsp + 0x40]
call fcn.140086158
lea rcx, [rsp + 0x58]
call fcn.1400d4df0
jmp 0x1400e6ed2
Function at 0x140001070
Capabilities:
Allocate or change rwx memory
Terminate process

Disassembly:
push rbx
sub rsp, 0x140
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x138], rax
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], 5
mov rbx, rax
call fcn.140001280
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
movsd xmm0, qword [0x140a832b0]
xorps xmm1, xmm1
sub rax, rbx
cvtsi2sd xmm1, rax
divsd xmm1, qword [0x140a832b8]
comisd xmm0, xmm1
jb 0x1400010d7
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xor ebx, ebx
mov qword [rsp + 0x150], rsi
lea rsi, [fcn.1400014d0]
mov qword [rsp + 0x158], rdi
lea r9, [rsp + 0x130]
mov dword [rsp + 0x130], ebx
mov edx, 0xa80cdc
mov rcx, rsi
lea r8d, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001129
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error:__d
call fcn.140001010
mov eax, ebx
lea rcx, [rsp + 0x30]
mov byte [rcx], al
lea rcx, [rcx + 1]
inc eax
cmp eax, 0x100
jl 0x140001130
xor r8b, r8b
lea r10, [rsp + 0x30]
mov r9d, ebx
lea rdi, str.advapi32.dll
nop dword [rax]
nop word [rax + rax]
movzx r11d, byte [r10]
mov eax, 0xaaaaaaab
mul r9d
movzx r8d, r8b
mov eax, r9d
shr edx, 3
lea ecx, [rdx + rdx*2]
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movsx edx, byte [rcx + rdi]
add edx, r11d
add r8d, edx
and r8d, 0x800000ff
jge 0x1400011a1
dec r8d
or r8d, 0xffffff00
inc r8d
movzx ecx, r8b
inc r9d
movzx eax, byte [rsp + rcx + 0x30]
mov byte [r10], al
inc r10
mov byte [rsp + rcx + 0x30], r11b
cmp r9d, 0x100
jl 0x140001160
xor dil, dil
mov r11, rbx
nop word [rax + rax]
lea eax, [rbx + 1]
and eax, 0x800000ff
jge 0x1400011e3
dec eax
or eax, 0xffffff00
inc eax
movsxd rbx, eax
movzx r8d, byte [rsp + rbx + 0x30]
add dil, r8b
movzx ecx, dil
movzx eax, byte [rsp + rcx + 0x30]
mov byte [rsp + rbx + 0x30], al
mov byte [rsp + rcx + 0x30], r8b
movzx eax, byte [rsp + rbx + 0x30]
add r8, rax
movzx eax, r8b
movzx r8d, byte [rsp + rax + 0x30]
xor byte [r11 + rsi], r8b
inc r11
cmp r11, 0xa80cdc
jl 0x1400011d0
mov r8d, dword [rsp + 0x130]
lea r9, [rsp + 0x130]
mov rdi, qword [rsp + 0x158]
mov edx, 0xa80cdc
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call fcn.1400014d0
mov rsi, qword [rsp + 0x150]
xor eax, eax
mov rcx, qword [rsp + 0x138]
xor rcx, rsp
call fcn.140a821c0
add rsp, 0x140
pop rbx
ret

Function at 0x140a82a80
Capabilities:
Parse pe header

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

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4d5a82
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f8108]
test eax, eax
je 0x2fc4d5b1a
lea rax, [0x2fc4f80e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f8110]
mov qword [rbp - 8], rax
jmp 0x2fc4d5afe
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d5af2
cmp qword [rbp - 0x10], 0
je 0x2fc4d5af2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d5ab8
lea rax, [0x2fc4f80e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d5b1b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d5c20
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d5c48
mov eax, 0
jmp 0x2fc4d5c96
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d5c71
mov eax, 0
jmp 0x2fc4d5c96
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d5c91
mov eax, 0
jmp 0x2fc4d5c96
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d5c9c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4d5d1a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d5d11
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4d5d11
mov rax, qword [rbp - 8]
jmp 0x2fc4d5d2f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4d5ce4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bda70]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bda80]
mov dword [rax], 1
mov rax, qword [0x004bda90]
mov dword [rax], 1
mov rax, qword [0x004bda60]
mov dword [rax], 1
mov rax, qword [0x004bd930]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bda50]
mov dword [0x004e400c], 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 [0x004bda10]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004bcd70]
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 0x401560
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbp
mov eax, 0x1070
call fcn.0040d770
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1000], rcx
mov qword [rbp + 0x1008], rdx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rcx, str.Downloader
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0xfe8], rax
cmp qword [rbp + 0xfe8], 0
jne 0x4015c8
mov eax, 0
jmp 0x40179f
mov rax, qword [rbp + 0xfe8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0x1000]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0xfe0], rax
cmp qword [rbp + 0xfe0], 0
jne 0x40162d
mov rax, qword [rbp + 0xfe8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x40179f
mov rax, qword [rbp + 0x1008]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
mov r9d, 0
mov r8d, 0
mov edx, 0x40000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0xfd8], rax
cmp qword [rbp + 0xfd8], 0xffffffffffffffff
jne 0x4016ab
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x40179f
lea rcx, [rbp - 0x34]
lea rdx, [rbp - 0x30]
mov rax, qword [rbp + 0xfe0]
mov r9, rcx
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x4016e1
mov eax, dword [rbp - 0x34]
test eax, eax
je 0x4016e1
mov eax, 1
jmp 0x4016e6
mov eax, 0
test al, al
je 0x401761
mov ecx, dword [rbp - 0x34]
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x30]
mov rax, qword [rbp + 0xfd8]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov edx, dword [rbp - 0x34]
mov eax, dword [rbp - 0x38]
cmp edx, eax
je 0x4016ab
mov rax, qword [rbp + 0xfd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x40179f
mov rax, qword [rbp + 0xfd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 1
add rsp, 0x1070
pop rbp
ret
Function at 0x40c6f0
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 0x40c760
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e4634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40c908
mov rax, qword [0x004e4638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c7ac
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40c837
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c790
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40c942
mov rax, qword [0x004e4638]
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 [0x004e4638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c951
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40c830
sub eax, 4
and eax, 0xfffffffb
jne 0x40c8c0
add dword [0x004e4634], 1
cmp ebx, 8
jae 0x40c868
test bl, 4
jne 0x40c910
test ebx, ebx
je 0x40c859
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40c930
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 0x40c859
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 0x40c89a
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 [0x004e4638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c830
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 0x40c7b7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40c859
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40c859
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e4638]
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]