joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140036e30
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 0x140036ea0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400451f4]
mov rbx, rcx
test esi, esi
jle 0x140036fd0
mov rax, qword [0x1400451f8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140036eeb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140036f75
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140036ed0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140036ff2
mov rax, qword [0x1400451f8]
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 [0x1400451f8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140036fd7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140036f6e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140036f80
add dword [0x1400451f4], 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 [0x1400451f8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140036f6e
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 0x140036ef8
mov rax, qword [0x1400451f8]
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 0x140037580
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140045260]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140045240]
test rbx, rbx
je 0x1400375dc
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 rsi, rsi
je 0x1400375d3
test eax, eax
jne 0x1400375d3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400375b8
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 0x1400377f0
Capabilities:
Parse pe header

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

Function at 0x140037820
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 0x14003786d
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 0x140037864
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14003786f
add rax, 0x28
cmp rax, r9
jne 0x140037850
xor eax, eax
ret

Function at 0x140037870
Capabilities:
Parse pe header

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

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

Function at 0x140037990
Capabilities:
Parse pe header

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

Disassembly:
mov r8, qword [0x14003f1b0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400379f0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400379f8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400379f0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140037a40
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140037a37
test rcx, rcx
je 0x1400379f0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140037a28
xor eax, eax
ret

Function at 0x140037a50
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x14003f1b0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140037ab0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140037ab8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140037ab0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140037ab0
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 0x140037b04
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140037b10
add rdx, 0x28
cmp rdx, r9
jne 0x140037af0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x14003f1b0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140037b42
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140037b50
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140037b42
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140037b42
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140037b42
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 0x140037ba5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140037bb8
add rdx, 0x28
cmp r10, rdx
jne 0x140037b90
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140037bc7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140037bd7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140037bae
test ecx, ecx
jg 0x140037bc0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x2fc4cb720
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 0x2fc4cc122
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f0108]
test eax, eax
je 0x2fc4cc1ba
lea rax, [0x2fc4f00e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f0110]
mov qword [rbp - 8], rax
jmp 0x2fc4cc19e
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 0x2fc4cc192
cmp qword [rbp - 0x10], 0
je 0x2fc4cc192
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 0x2fc4cc158
lea rax, [0x2fc4f00e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4cc1bb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4cc2c0
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 0x2fc4cc2e8
mov eax, 0
jmp 0x2fc4cc336
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 0x2fc4cc311
mov eax, 0
jmp 0x2fc4cc336
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 0x2fc4cc331
mov eax, 0
jmp 0x2fc4cc336
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4cc33c
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 0x2fc4cc3ba
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4cc3b1
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 0x2fc4cc3b1
mov rax, qword [rbp - 8]
jmp 0x2fc4cc3cf
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 0x2fc4cc384
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
and al, 0x10
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x20], edi
push r12
push r13

Function at 0x401880
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x20
mov eax, r8d
mov rbp, rdx
mov ebx, r8d
shr eax, 4
mov rsi, rcx
mov r8d, 6
add ax, 1
mov rcx, rbp
movzx edx, ax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
mov r12, rax
je 0x4019f1
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x4019f1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x4019f1
mov rdx, r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rdi
and ebx, 0xf
jbe 0x401926
nop
cmp rdi, r11
jae 0x4019f1
add ebx, 0xffffffff
movzx eax, word [rdi]
lea rdi, [rdi + rax*2 + 2]
jne 0x401910
cmp rdi, r11
jae 0x4019f1
add byte [rax], al
invalid
movzx eax, word [rdi]

Function at 0x407080
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
mov esi, eax
movabs eax, dword [0xda8b088900409214]
test ebx, ebx
jle 0x4070a1
mov eax, 0xff
call fcn.00402680
xor byte [rsi], al
jne 0x407091
pop rsi
pop rbx
ret
Function at 0x40df10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
mov eax, r8d
mov rsi, rdx
mov ebx, r8d
shr eax, 4
mov rbp, rcx
mov r8d, 6
add ax, 1
mov rcx, rsi
movzx edx, ax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
mov r12, rax
je 0x40e079
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x40e079
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x40e079
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rdi
and ebx, 0xf
jbe 0x40dfaa
cmp rdi, r11
jae 0x40e079
add ebx, 0xffffffff
movzx eax, word [rdi]
lea rdi, [rdi + rax*2 + 2]
jne 0x40df94
cmp rdi, r11
jae 0x40e079
movzx eax, word [rdi]
test ax, ax
je 0x40e079
mov qword [rsp + 0x60], r13
movzx ebx, ax
call qword [0x00442910]
xor r13d, r13d
lea r12, [rdi + 2]
mov r9d, ebx
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov ecx, eax
mov r8, r12
xor edx, edx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, qword [rbp]
mov edx, 1
movsxd rsi, eax
sub edx, dword [rcx - 8]
mov ecx, dword [rcx - 0xc]
sub ecx, esi
or edx, ecx
jge 0x40e01a
mov edx, esi
mov rcx, rbp
call fcn.0040dbc0
mov rbx, qword [rbp]
movzx edi, word [rdi]
call qword [0x00442910]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov ecx, eax
mov r9d, edi
mov r8, r12
xor edx, edx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test esi, esi
mov r13, qword [rsp + 0x60]
js 0x40e06e
mov rcx, qword [rbp]
cmp esi, dword [rcx - 0xc]
jg 0x40e06e
mov dword [rcx - 0x10], esi
mov rcx, qword [rbp]
mov eax, 1
mov byte [rsi + rcx], 0
jmp 0x40e07b
mov ecx, 0x80070057
call fcn.00401000
int3
xor eax, eax
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret
Function at 0x413b80
Capabilities:
Copy file

Disassembly:
push rdi
sub rsp, 0x40
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbp
mov rbp, r8
mov qword [rsp + 0x60], rsi
mov rsi, rdx
mov rdx, qword [rbp]
mov rcx, qword [rsi]
mov r8d, r9d
mov qword [rsp + 0x38], r13
mov r13d, r9d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
mov edi, eax
jne 0x413c56
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x30], r14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rbp]
mov r8, qword [rsi]
lea rdx, str.CFileHelper::CopyFileWithRetry_failed_to_copy__s_to__s._GetLastError_returned_0x_x._Trying_again...
lea ecx, [rdi + 1]
mov dword [rsp + 0x20], eax
call fcn.004139f0
xor r14d, r14d
mov r12b, 1
mov ebx, r14d
cmp ebx, 0x1e
jge 0x413c25
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rdx, qword [rbp]
mov rcx, qword [rsi]
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
movzx r12d, r12b
test eax, eax
mov edi, eax
cmovne r12d, r14d
add ebx, 1
cmp r12b, 1
je 0x413bf0
mov r14, qword [rsp + 0x30]
test r12b, r12b
mov r12, qword [rsp + 0x68]
je 0x413c56
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rbp]
mov r8, qword [rsi]
lea rdx, str.CFileHelper::CopyFileWithRetry_failed_to_copy__s_to__s._GetLastError_returned_0x_x
mov ecx, 1
mov dword [rsp + 0x20], eax
call fcn.004139f0
mov rdx, qword [rsi]
sub rdx, 0x18
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
mov r13, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x60]
add eax, ebx
test eax, eax
jg 0x413c80
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rbp]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], ebx
mov rbp, qword [rsp + 0x58]
add ebx, 0xffffffff
test ebx, ebx
mov rbx, qword [rsp + 0x50]
jg 0x413ca7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
add rsp, 0x40
pop rdi
ret
Function at 0x413cb0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rdi
sub rsp, 0x20
mov rcx, qword [rdx]
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x413d33
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rdi]
lea rdx, str.CFileHelper::CheckIsWriteable_GetFileAttributes_failed_for_file__s._GetLastError_returned_0x_x
mov r9d, eax
mov ecx, 2
mov ebx, eax
call fcn.004139f0
cmp ebx, 2
mov rbx, qword [rsp + 0x30]
jne 0x413d09
mov r8, qword [rdi]
lea rdx, str.CFileHelper::CheckIsWriteable__s_File_not_found
mov ecx, 2
call fcn.004139f0
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x413d28
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 0x80004005
add rsp, 0x20
pop rdi
ret
test al, 1
je 0x413d75
mov r8, qword [rdi]
lea rdx, str.CFileHelper::CheckIsWriteable__s_is_read_only.
mov ecx, 2
call fcn.004139f0
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x413d28
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 0x80004005
add rsp, 0x20
pop rdi
ret
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x413d94
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x4141f0
Capabilities:
Query environment variable

Disassembly:
push rdi
push r12
push r13
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x68], rsi
mov r12, rdx
mov r13, rcx
xor esi, esi
mov dword [rsp + 0x60], esi
lea rcx, [0x004428e0]
mov rax, qword [0x004428e0]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x60], rbx
lea rdx, [0x0042f09c]
or rbp, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x414274
movzx edi, dx
xor edx, edx
mov ecx, edi
call fcn.00401020
test rax, rax
je 0x414295
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.00401880
mov rbx, qword [rsp + 0x60]
jmp 0x414295
xor eax, eax
mov rcx, rbp
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x60]
call fcn.00401720
mov rbx, qword [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x414306
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x41436e
cmp dword [rdx + 0x10], eax
jge 0x4142db
cmp dword [rbx - 0xc], eax
jge 0x4142ce
mov ecx, 0x80070057
call fcn.00401000
int3
mov dword [rbx - 0x10], esi
mov word [rbx], 0
jmp 0x41436e
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x4142f2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x60], rbx
jmp 0x41436e
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x414328
mov edx, edi
lea rcx, [rsp + 0x60]
call fcn.00401420
mov rbx, qword [rsp + 0x60]
mov r8d, edi
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test rbx, rbx
je 0x414359
xor eax, eax
mov rcx, rbp
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rsi, rcx
test ecx, ecx
js 0x4143f7
cmp esi, dword [rbx - 0xc]
jg 0x4143f7
mov dword [rbx - 0x10], esi
movsxd rax, esi
mov word [rbx + rax*2], 0
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rbx - 8], 0
jl 0x414392
cmp rax, qword [rbx - 0x18]
jne 0x414392
lea rdi, [rbx - 0x18]
lock add dword [rbx - 8], 1
jmp 0x4143d0
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rbx - 0x10]
call qword [rax]
mov rdi, rax
test rax, rax
jne 0x4143ae
call fcn.0040dab0
int3
mov eax, dword [rbx - 0x10]
mov dword [rdi + 8], eax
mov eax, dword [rbx - 0x10]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
mov r8, rbx
add rdx, rdx
lea rcx, [rdi + 0x18]
call fcn.00416460
lea rax, [rdi + 0x18]
mov qword [r13], rax
lock xadd dword [rbx - 8], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x4143f2
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r13
jmp 0x414402
mov ecx, 0x80070057
call fcn.00401000
nop
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r13
pop r12
pop rdi
ret