Function at 0x406530
Capabilities:
Check if file exists
Create directory
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e6696
mov eax, dword fs:[0]
push eax
sub esp, 0xf8
mov eax, dword [0x50b0b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x104], edi
mov dword [ebp - 0x100], edi
mov dword [ebp - 0xd4], edi
mov dword [ebp - 0xd0], 7
mov word [ebp - 0xe4], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0xe4]
push eax
call fcn.004062b0
add esp, 4
test eax, eax
jns 0x4065af
push str.Failed_to_get_program_data_n
call fcn.00406230
add esp, 4
or esi, 0xffffffff
jmp 0x406c8d
push str.ActiveBackupforBusinessAgent
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0xfc]
push eax
call fcn.00401a40
push str.log
lea eax, [ebp - 0xfc]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.00401a40
add esp, 0x18
cmp dword [ebp - 0xb8], 8
lea eax, [ebp - 0xcc]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmovae eax, dword [ebp - 0xcc]
push eax
mov byte [ebp - 4], 2
call esi
test eax, eax
jne 0x406643
cmp dword [ebp - 0xb8], 8
lea eax, [ebp - 0xcc]
push 0
cmovae eax, dword [ebp - 0xcc]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x406643
push str.Failed_to_create_log_folder_n
call fcn.00406230
add esp, 4
or esi, 0xffffffff
jmp 0x406c77
push str.ui.log
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.00401a40
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x406666
mov eax, dword [eax]
push eax
call esi
lea ecx, [ebp - 0xb4]
mov esi, eax
call fcn.00403870
test esi, esi
je 0x4066e5
push str.ui.log
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.00401a40
mov esi, eax
push str.ui.log
lea eax, [ebp - 0xfc]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.00401a40
add esp, 0x18
cmp dword [esi + 0x14], 8
jb 0x4066bb
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x4066c3
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea ecx, [ebp - 0xb4]
call fcn.00403870
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 2
call fcn.00403870
or esi, 0xffffffff
cmp esi, 0xffffffff
jne 0x40672a
push 7
xor eax, eax
mov dword [ebp - 0x74], 0
push str.log.txt
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x70], 7
mov word [ebp - 0x84], ax
call fcn.0040b650
mov eax, dword [ebp - 0x100]
lea ecx, [ebp - 0x84]
or eax, 1
jmp 0x4067e0
test esi, esi
jns 0x406749
mov eax, esi
neg eax
push eax
lea eax, [ebp - 0x12]
push eax
call fcn.004021d0
lea ecx, [eax - 2]
mov eax, 0x2d
mov word [ecx], ax
jmp 0x406755
lea eax, [ebp - 0x12]
push esi
push eax
call fcn.004021d0
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
add esp, 8
lea eax, [ebp - 0x12]
mov dword [ebp - 0x58], 7
cmp ecx, eax
je 0x406781
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x6c]
call fcn.0040b650
or edi, 0x18
push 8
push str.log.txt_
or edi, 2
mov dword [ebp - 4], 5
push 0
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x100], edi
mov dword [ebp - 0x104], edi
call fcn.0040cb40
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xb4], xmm0
movq xmm0, qword [eax + 0x10]
mov word [eax], cx
lea ecx, [ebp - 0xb4]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov eax, edi
movq qword [ebp - 0xa4], xmm0
or eax, 0x24
movups xmm0, xmmword [ecx]
xor edx, edx
mov dword [ebp - 0x100], eax
movups xmmword [ebp - 0x9c], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [ebp - 0x8c], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], dx
mov dword [ebp - 4], 6
test al, 4
je 0x40686a
mov edx, dword [ebp - 0xa0]
and eax, 0xfffffffb
mov dword [ebp - 0x100], eax
cmp edx, 8
jb 0x40686a
mov ecx, dword [ebp - 0xb4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40685a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
mov eax, dword [ebp - 0x100]
add esp, 8
mov byte [ebp - 4], 7
test al, 2
je 0x4068cf
mov edx, dword [ebp - 0x58]
and eax, 0xfffffffd
mov dword [ebp - 0x100], eax
cmp edx, 8
jb 0x4068bb
mov ecx, dword [ebp - 0x6c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4068ab
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
mov eax, dword [ebp - 0x100]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 7
mov word [ebp - 0x6c], cx
mov byte [ebp - 4], 8
test al, 1
je 0x40691d
mov edx, dword [ebp - 0x70]
and eax, 0xfffffffe
mov dword [ebp - 0x100], eax
cmp edx, 8
jb 0x40691d
mov ecx, dword [ebp - 0x84]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406913
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
push 0x4ea7dc
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.00401a40
add esp, 0xc
mov ecx, eax
cmp dword [ebp - 0x88], 8
lea eax, [ebp - 0x9c]
push dword [ebp - 0x8c]
cmovae eax, dword [ebp - 0x9c]
push eax
mov byte [ebp - 4], 9
call fcn.0040b3f0
mov edi, dword [ebp - 0x100]
xor ecx, ecx
mov dword [ebp - 0x44], 0
or edi, 0x40
mov dword [ebp - 0x40], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x54], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x44], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x70]
mov byte [ebp - 4], 0xb
cmp edx, 8
jb 0x4069da
mov ecx, dword [ebp - 0x84]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4069d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
xor eax, eax
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x40], 8
mov word [ebp - 0x84], ax
lea eax, [ebp - 0x54]
cmovae eax, dword [ebp - 0x54]
push eax
mov dword [ebp - 0x70], 7
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406bd2
push 0x4ea7dc
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.00401a40
add esp, 0xc
mov ecx, eax
cmp dword [ebp - 0x88], 8
lea eax, [ebp - 0x9c]
push dword [ebp - 0x8c]
cmovae eax, dword [ebp - 0x9c]
push eax
mov byte [ebp - 4], 0xc
call fcn.0040b3f0
xor ecx, ecx
or edi, 0x80
mov dword [ebp - 0x100], edi
mov dword [ebp - 0x104], edi
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x6c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x5c], xmm0
mov word [eax], cx
lea ecx, [ebp - 0x6c]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x58], 8
cmovae ecx, dword [ebp - 0x6c]
cmp dword [ebp - 0x40], 8
push ecx
cmovae eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov edx, dword [ebp - 0x58]
cmp edx, 8
jb 0x406ada
mov ecx, dword [ebp - 0x6c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406ad0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov edx, dword [ebp - 0xa0]
xor eax, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 7
mov word [ebp - 0x6c], ax
mov byte [ebp - 4], 0xb
cmp edx, 8
jb 0x406b32
mov ecx, dword [ebp - 0xb4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406b28
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov edx, dword [ebp - 0x40]
inc esi
mov byte [ebp - 4], 8
cmp edx, 8
jb 0x406b71
mov ecx, dword [ebp - 0x54]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406b67
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov edx, dword [ebp - 0x88]
xor eax, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 7
mov word [ebp - 0x54], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x4066e8
mov ecx, dword [ebp - 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406bc3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
jmp 0x4066e8
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
cmovae eax, dword [ebp - 0x54]
push eax
push str._s_does_not_exists_n
call fcn.00406230
mov edx, dword [ebp - 0x40]
add esp, 8
cmp edx, 8
jb 0x406c25
mov ecx, dword [ebp - 0x54]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406c1b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov edx, dword [ebp - 0x88]
xor eax, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 7
mov word [ebp - 0x54], ax
cmp edx, 8
jb 0x406c75
mov ecx, dword [ebp - 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406c6b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ce6
push edx
push ecx
call fcn.004bf27b
add esp, 8
xor esi, esi
lea ecx, [ebp - 0xcc]
call fcn.00403870
lea ecx, [ebp - 0xfc]
call fcn.00403870
mov edx, dword [ebp - 0xd0]
cmp edx, 8
jb 0x406cc9
mov ecx, dword [ebp - 0xe4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406cbf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406ceb
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bf6e8
mov esp, ebp
pop ebp
ret
call fcn.004c4b9a
call fcn.004c4b9a
int3