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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x43e030]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x224], ecx
cdq
mov ecx, 0x420
idiv ecx
push edi
mov dword [ebp - 0x228], esi
mov dword [ebp - 0x220], 1
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x40a202
and dword [ebp - 0x214], 0
mov edi, 0x103
test eax, eax
jbe 0x409e7c
push dword [ebp - 0x214]
mov esi, dword [ebp - 0x224]
call fcn.0040b95f
mov ebx, eax
xor eax, eax
push 0x206
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
xor esi, esi
lea eax, [ebp - 0x20e]
push esi
push eax
call fcn.00421bc0
add esp, 0xc
push 0x437098
lea eax, [ebx + 0x208]
push eax
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
lea ecx, [ebp - 0x210]
call fcn.0040e8bd
cmp dword [ebx + 0x410], esi
je 0x409e40
lea esi, [ebp - 0x210]
call fcn.0040e816
test eax, eax
jne 0x409e54
push 1
push ebx
mov ecx, esi
call fcn.0040e5e1
pop ecx
pop ecx
test eax, eax
jne 0x409e54
and dword [ebp - 0x220], eax
jmp 0x409ea7
push 1
push ebx
lea ecx, [ebp - 0x210]
call fcn.0040e5e1
pop ecx
pop ecx
test eax, eax
je 0x409ea1
inc dword [ebp - 0x214]
mov eax, dword [ebp - 0x214]
mov dword [ebx + 0x418], 1
cmp eax, dword [ebp - 0x21c]
jb 0x409db2
mov esi, dword [ebp - 0x228]
lea eax, [esi + 0xa8]
cmp dword [eax + 0x18], 8
mov dword [ebp - 0x218], 0x435690
mov dword [ebp - 0x214], 0x435650
jb 0x409ebe
mov eax, dword [eax + 4]
jmp 0x409ec1
mov dword [ebp - 0x220], esi
call fcn.004065a1
mov dword [eax + 0xc], 0x6c
mov ebx, dword [ebp - 0x21c]
jmp 0x40a1c5
add eax, 4
lea ecx, [ebp - 0x218]
push ecx
mov ecx, eax
call fcn.004097ae
test eax, eax
je 0x409eed
lea eax, [ebp - 0x218]
push eax
mov eax, esi
call fcn.004097fd
call fcn.004065a1
mov dword [eax + 0xc], SetHandleCount
mov eax, dword [ebp - 0x21c]
dec eax
mov dword [ebp - 0x214], eax
test eax, eax
jl 0x409fb1
push dword [ebp - 0x214]
mov esi, dword [ebp - 0x224]
call fcn.0040b95f
mov ebx, eax
lea esi, [ebx + 0x208]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409fa5
xor eax, eax
push 0x206
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00421bc0
add esp, 0xc
push 0x4370bc
push esi
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409f83
lea ecx, [ebp - 0x210]
call fcn.0040e8bd
test eax, eax
je 0x40a0bb
push 1
lea eax, [ebp - 0x210]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x40a0bb
mov dword [ebx + 0x414], 1
dec dword [ebp - 0x214]
jns 0x409f02
mov eax, dword [ebp - 0x21c]
dec eax
mov dword [ebp - 0x214], eax
test eax, eax
jl 0x40a03e
push dword [ebp - 0x214]
mov esi, dword [ebp - 0x224]
call fcn.0040b95f
mov ebx, eax
xor eax, eax
push 0x206
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00421bc0
add esp, 0xc
push 0x437098
lea esi, [ebx + 0x208]
push esi
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
push 1
push esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x40a0d3
dec dword [ebp - 0x214]
mov dword [ebx + 0x41c], 1
jns 0x409fc2
xor ebx, ebx
cmp dword [ebp - 0x21c], ebx
jbe 0x40a1fc
mov esi, dword [ebp - 0x224]
push ebx
call fcn.0040b95f
mov esi, eax
cmp dword [esi + 0x414], 0
je 0x40a0ad
xor eax, eax
push 0x206
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00421bc0
add esp, 0xc
push 0x4370bc
add esi, 0x208
push esi
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
lea ecx, [ebp - 0x210]
call fcn.0040e8bd
inc ebx
cmp ebx, dword [ebp - 0x21c]
jb 0x40a04c
jmp 0x40a1fc
and dword [ebp - 0x220], 0
call fcn.004065a1
mov dword [eax + 0xc], 0x65
jmp 0x409eb3
and dword [ebp - 0x220], 0
call fcn.004065a1
mov dword [eax + 0xc], SetHandleCount
jmp 0x409eb3
mov esi, dword [ebp - 0x224]
push ebx
call fcn.0040b95f
mov esi, eax
xor eax, eax
cmp dword [esi + 0x41c], eax
je 0x40a10b
lea ecx, [esi + 0x208]
jmp 0x40a158
cmp dword [esi + 0x418], eax
je 0x40a15d
push 0x206
push eax
lea eax, [ebp - 0x20e]
xor ecx, ecx
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], cx
call fcn.00421bc0
add esp, 0xc
push 0x437098
lea eax, [esi + 0x208]
push eax
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
lea ecx, [ebp - 0x210]
call fcn.0040e8bd
cmp dword [esi + 0x414], 0
je 0x40a1c5
xor eax, eax
push 0x206
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00421bc0
add esp, 0xc
push 0x4370bc
add esi, 0x208
push esi
push 0x4370b0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0041fb89
add esp, 0x14
push 1
push esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40a1c5
call fcn.004065a1
mov dword [eax + 0xc], 0x6d
dec ebx
jns 0x40a0eb
mov eax, dword [ebp - 0x228]
add eax, 0xc4
cmp dword [eax + 0x18], 8
jb 0x40a1e2
mov eax, dword [eax + 4]
jmp 0x40a1e5
add eax, 4
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a1fc
call fcn.004065a1
mov dword [eax + 0xc], SetHandleCount
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041f23c
leave
ret