Function at 0x40d5c0
Capabilities:
Check if file exists
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41d5a0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x424084]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x424084]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x5c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [esi + 0xc]
jb 0x40d76b
mov ecx, dword [esi + 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x42501c]
mov eax, dword [edx + 0xc]
mov ecx, 0x42501c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], 0
mov edx, dword [0x42501c]
mov eax, dword [edx + 0xc]
mov ecx, 0x42501c
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esi + 0x2c]
mov edx, 8
mov byte [esp + 0x40], 1
cmp dword [eax + 0x14], edx
jb 0x40d662
mov eax, dword [eax]
cmp dword [esi + 0x24], edx
lea ecx, [esi + 0x10]
jb 0x40d66c
mov ecx, dword [ecx]
movzx edx, word [esi + 0x50]
push edx
movzx edx, word [esi + 0x4c]
push edx
movzx edx, word [esi + 0x4a]
push edx
push eax
push ecx
push str._s_s_02d__02d__02d
lea edi, [esp + 0x2c]
call fcn.0040e900
mov eax, dword [esp + 0x2c]
mov ebx, 1
push ebx
push eax
push str._s__d_.log
lea edi, [esp + 0x3c]
call fcn.0040e900
mov edi, dword [esp + 0x3c]
add esp, 0x24
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d6dd
mov ecx, dword [esp + 0x14]
inc ebx
push ebx
push ecx
push str._s__d_.log
lea edi, [esp + 0x24]
call fcn.0040e900
mov edi, dword [esp + 0x24]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d6b6
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
mov ebx, 0x4210c8
call fcn.0040e3f0
mov eax, dword [eax]
add esp, 8
push 1
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d720
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d745
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d7a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40d7a1
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov dx, word [esi + 0x4a]
cmp dx, word [esp + 0x20]
jne 0x40d797
mov ax, word [esi + 0x4c]
cmp ax, word [esp + 0x22]
jne 0x40d797
mov cx, word [esi + 0x50]
cmp cx, word [esp + 0x26]
je 0x40d7b1
mov edx, dword [esi + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.0040da00
mov byte [esi + 0x48], 0
call fcn.0040de20
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0040ecd0
mov esp, ebp
pop ebp
ret