Function at 0x46b910
Capabilities:
Check if file exists
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x5402b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, 7
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
xor edx, edx
mov word [ebp - 0x1c], ax
mov word [ebp - 0x38], dx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
push esi
xor esi, esi
add eax, edx
cmp eax, esi
mov byte [ebp - 0x3d], 1
mov dword [ebp - 0x28], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], esi
jle 0x46bb0f
mov dword [ebp - 0x44], esi
push edi
jmp 0x46b980
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp dword [ebp - 0x48], ecx
jb 0x46b9a3
call fcn.004c237c
mov eax, dword [ebx + 0xc]
add eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x54]
push eax
mov edi, 0x51bcf8
lea esi, [ebp - 0x8c]
call fcn.0040e390
mov ecx, eax
lea edi, [ebp - 0x70]
call fcn.0040e410
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea eax, [ebp - 0x3c]
call fcn.004018f0
mov esi, 8
cmp dword [ebp - 0x58], esi
jb 0x46b9ed
mov edx, dword [ebp - 0x6c]
push edx
call fcn.004c097a
add esp, 4
xor eax, eax
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
cmp dword [ebp - 0x74], esi
jb 0x46ba15
mov ecx, dword [ebp - 0x88]
push ecx
call fcn.004c097a
add esp, 4
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x48], eax
jb 0x46ba38
call fcn.004c237c
mov eax, dword [ebx + 0xc]
add eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x4c]
push eax
mov edi, 0x51bcf8
lea esi, [ebp - 0x8c]
call fcn.0040e390
mov ecx, eax
lea edi, [ebp - 0x70]
call fcn.0040e410
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea eax, [ebp - 0x20]
call fcn.004018f0
mov esi, 8
cmp dword [ebp - 0x58], esi
jb 0x46ba82
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.004c097a
add esp, 4
xor edx, edx
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], dx
cmp dword [ebp - 0x74], esi
jb 0x46baaa
mov eax, dword [ebp - 0x88]
push eax
call fcn.004c097a
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 8], esi
jae 0x46bab5
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46bae7
mov ecx, dword [ebp - 0x38]
cmp dword [ebp - 0x24], esi
jae 0x46bacb
lea ecx, [ebp - 0x38]
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 8], esi
jae 0x46bad6
lea eax, [ebp - 0x1c]
push 3
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x46bae7
mov byte [ebp - 0x3d], al
mov eax, dword [ebp - 0x48]
add dword [ebp - 0x44], 0x1c
inc eax
cmp eax, dword [ebp - 0x50]
mov dword [ebp - 0x48], eax
jl 0x46b980
pop edi
cmp dword [ebp - 8], esi
jb 0x46bb0d
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004c097a
add esp, 4
xor esi, esi
xor edx, edx
cmp dword [ebp - 0x24], 8
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], 7
mov word [ebp - 0x1c], dx
pop esi
jb 0x46bb32
mov eax, dword [ebp - 0x38]
push eax
call fcn.004c097a
add esp, 4
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x3d]
xor ecx, ebp
call fcn.004c0985
mov esp, ebp
pop ebp
ret