Function at 0x405220
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c08b
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x46706c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebx + 9], 0
lea ecx, [ebp - 0x240]
mov dword [ebx + 5], 0
mov dword [ebx + 1], 0
mov dword [ebx + 0x17866], 0
mov dword [ebx + 0x1786a], 0
mov dword [ebx + 0x1786e], 0
mov dword [ebx + 0x17872], 0
mov dword [ebx + 0x17876], 0
mov dword [ebx + 0x1787a], 0
mov dword [ebx + 0x1787e], 0xffffffff
mov dword [ebx + 0x17882], 0xffffffff
mov dword [ebx + 0x17886], 0xffffffff
call fcn.004113e0
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x4052d9
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0x228]
call fcn.004120e0
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov edx, dword [ebp - 0x22c]
cmp edx, 8
jb 0x405331
mov ecx, dword [ebp - 0x240]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405327
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4055ac
push edx
push ecx
call fcn.004154b6
add esp, 8
cmp dword [ebp - 0x214], 8
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, dword [ebp - 0x214]
cmp edx, 8
jb 0x40538c
mov ecx, dword [ebp - 0x228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405382
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4055b1
push edx
push ecx
call fcn.004154b6
add esp, 8
mov eax, dword [ebx + 1]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x4053b1
push eax
call esi
mov dword [ebx + 1], 0
mov dword [ebx + 0xd], 0
mov dword [ebx + 0x11], 0
mov eax, dword [ebx + 5]
test eax, eax
je 0x4053c2
push eax
call esi
mov dword [ebx + 5], 0
mov eax, dword [ebx + 9]
test eax, eax
je 0x4053d3
push eax
call esi
mov dword [ebx + 9], 0
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0042d530
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push str.Restore.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebx + 1], eax
test eax, eax
jne 0x40541b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405433
push str.GetPartitionTable
push eax
call edi
push str.ReadRawFile
push dword [ebx + 1]
mov dword [ebx + 0xd], eax
call edi
mov dword [ebx + 0x11], eax
push str.SSDInfo.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx + 5], eax
test eax, eax
je 0x405450
push str.GetDiskSerialNumber
push eax
call edi
mov dword [ebx + 0x15], eax
push str.MigDLL.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx + 9], eax
test eax, eax
jne 0x40546a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405475
push str.StartClone
push eax
call edi
mov dword [ebx + 0x19], eax
cmp dword [ebx + 0xd], 0
je 0x405492
cmp dword [ebx + 0x11], 0
je 0x405492
cmp dword [ebx + 0x15], 0
je 0x405492
cmp dword [ebx + 0x19], 0
je 0x405492
mov byte [ebx], 1
jmp 0x4054d6
mov eax, dword [ebx + 1]
test eax, eax
je 0x4054b1
push eax
call esi
mov dword [ebx + 1], 0
mov dword [ebx + 0xd], 0
mov dword [ebx + 0x11], 0
mov eax, dword [ebx + 5]
test eax, eax
je 0x4054c2
push eax
call esi
mov dword [ebx + 5], 0
mov eax, dword [ebx + 9]
test eax, eax
je 0x4054d3
push eax
call esi
mov dword [ebx + 9], 0
mov byte [ebx], 0
push 0
push 0x45cc3c
lea ecx, [ebx + 0x1788e]
mov dword [ebx + 0x1788a], 0
call fcn.00403ae0
lea edi, [ebx + 0x178a6]
mov dword [ebp - 4], 1
mov ecx, edi
mov esi, dword [edi]
push dword [esi + 4]
call fcn.0040ae40
mov eax, dword [edi]
mov ecx, 0x14
mov dword [eax + 4], esi
mov eax, dword [edi]
mov dword [eax], esi
mov eax, dword [edi]
mov dword [ebp - 4], 0xffffffff
mov dword [eax + 8], esi
lea eax, [ebx + 0x61aa]
mov dword [edi + 4], 0
nop dword [eax]
nop word [eax + eax]
mov dword [eax - 0x5ce8], 0
lea eax, [eax + 0x4a5]
mov dword [eax - 0x4a5], 0
mov dword [eax + 0x5843], 0
sub ecx, 1
jne 0x405540
mov dword [ebx + 0x17862], ecx
call fcn.00403470
mov ecx, ebx
call fcn.004055c0
mov ecx, ebx
call fcn.00405890
mov ecx, ebx
call fcn.00407270
mov ecx, ebx
call fcn.00407560
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00414edc
mov esp, ebp
pop ebp
ret
call fcn.004376e0
call fcn.004376e0
int3