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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419892
mov eax, dword fs:[0]
push eax
sub esp, 0x628
mov eax, dword [0x4210a0]
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 eax, dword [0x423964]
mov eax, dword [eax - 0xc]
mov esi, ecx
mov ecx, dword [esi]
mov dword [ebp - 0x634], esi
cmp dword [ecx - 0xc], eax
jle 0x408210
mov ecx, dword [ecx - 0xc]
lea edx, [ebp - 0x624]
push edx
sub ecx, eax
mov edx, esi
call fcn.00408620
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x624]
add eax, 0xfffffff0
call fcn.00404f70
add eax, 0x10
mov dword [ebp - 0x620], eax
mov byte [ebp - 4], 2
push 0x1fe
lea edx, [ebp - 0x216]
xor eax, eax
xor ecx, ecx
push edi
push edx
mov word [ebp - 0x18], ax
mov dword [ebp - 0x16], edi
mov word [ebp - 0x218], cx
call fcn.0040c8a0
push 0x1fe
lea ecx, [ebp - 0x616]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x618], ax
call fcn.0040c8a0
push 0x1fe
lea eax, [ebp - 0x416]
xor edx, edx
push edi
push eax
mov word [ebp - 0x418], dx
call fcn.0040c8a0
push 0x100
lea ecx, [ebp - 0x418]
push ecx
push 0x100
lea edx, [ebp - 0x618]
push edx
mov edx, dword [ebp - 0x624]
push 0x100
lea eax, [ebp - 0x218]
push eax
push 3
lea ecx, [ebp - 0x18]
push ecx
push edx
call fcn.0040c292
add esp, 0x48
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x618]
call fcn.00402d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x61c]
push ecx
lea ecx, [ebp - 0x418]
call fcn.00402d60
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x61c]
push 0x28
push edx
call fcn.0040c264
add esp, 8
cmp eax, edi
je 0x407f26
sub eax, dword [ebp - 0x61c]
sar eax, 1
cmp eax, 0xffffffff
je 0x407f26
lea ecx, [ebp - 0x628]
push ecx
mov ecx, eax
lea edx, [ebp - 0x61c]
call fcn.00408620
mov byte [ebp - 4], 5
lea edi, [ebp - 0x61c]
call fcn.00402e70
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x628]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407f26
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x61c]
mov edx, dword [ebp - 0x62c]
push ecx
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x18]
push ecx
push str._s_s_s_s
lea edi, [ebp - 0x620]
call fcn.00408890
mov edx, dword [ebp - 0x620]
add esp, 0x14
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408060
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x628], eax
mov byte [ebp - 4], 8
mov ebx, 1
jmp 0x407f90
mov eax, dword [ebp - 0x61c]
mov ecx, dword [ebp - 0x62c]
push eax
push ebx
push ecx
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x18]
push eax
push str._s_s_s__d__s
lea edi, [ebp - 0x628]
call fcn.00408890
mov esi, dword [ebp - 0x628]
add esp, 0x18
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407fd9
inc ebx
cmp ebx, 0x100
jl 0x407f90
jmp 0x40803a
mov edi, dword [ebp - 0x620]
lea eax, [esi - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x40803a
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x40802a
mov ecx, dword [eax]
cmp ecx, dword [edi]
jne 0x40802a
call fcn.00404f70
mov dword [ebp - 0x630], eax
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x408019
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [ebp - 0x630]
add eax, 0x10
mov dword [ebp - 0x620], eax
jmp 0x40803a
mov ebx, dword [esi - 0xc]
push esi
lea ecx, [ebp - 0x620]
push ecx
call fcn.00404ec0
mov byte [ebp - 4], 4
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40805a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x634]
mov ecx, dword [ebp - 0x620]
mov eax, dword [esi]
push 8
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x408175
mov ecx, dword [ebp - 0x624]
mov edi, dword [esi]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x4080d3
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4080c9
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4080c9
call fcn.00404f70
mov dword [ebp - 0x630], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4080bc
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x630]
add ecx, 0x10
mov dword [esi], ecx
jmp 0x4080d3
mov ebx, dword [ecx - 0xc]
push ecx
push esi
call fcn.00404ec0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x61c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4080f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40811f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x620]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408145
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x624]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40816e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x408212
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x61c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40819b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4081c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x620]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4081e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x624]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408210
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
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.0040bbb3
mov esp, ebp
pop ebp
ret