Function at 0x4103c8
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov ebx, ecx
mov eax, dword [0x414064]
cmp eax, 0x414064
je 0x4103fd
test dword [eax + 0x1c], 0x20000000
je 0x4103fd
push dword [eax + 0x14]
mov edx, 0x403f74
push dword [eax + 0x10]
push 0x13
pop ecx
call fcn.00408a5f
push 1
push 0x15a
push 0x403ebc
lea ecx, [ebp - 0x48]
call fcn.0040facc
xor edi, edi
mov eax, 0x4040b8
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
test ebx, ebx
jne 0x410446
mov esi, 0x80070057
mov eax, 0x165
jmp 0x4105e6
mov eax, 0x166
mov dword [ebp - 0x48], edi
mov word [ebp - 0x44], ax
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
mov ecx, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.0040ff9a
mov esi, eax
mov eax, 0x16d
mov dword [ebp - 0x48], esi
test esi, esi
js 0x4105e9
mov word [ebp - 0x44], ax
cmp dword [ebp - 4], edi
jne 0x410490
mov esi, edi
add eax, 5
mov dword [ebp - 0x48], esi
mov word [ebp - 0x44], ax
jmp 0x4105ed
mov ecx, dword [ebp - 0xc]
push 4
pop eax
neg ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
mov edi, eax
cmp ecx, eax
jg 0x4105ed
push 5
pop eax
sub eax, dword [ebp - 4]
mov dword [ebp - 4], eax
cmp edi, eax
jl 0x410518
push 0x403f6c
push edi
push ebx
lea eax, [ebp - 0x18]
push 0x403ed0
push eax
call fcn.00411a78
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x48], esi
mov eax, 0x181
test esi, esi
js 0x4105e9
push dword [ebp - 0x18]
mov word [ebp - 0x44], ax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4105af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4105c0
mov eax, 0x185
xor esi, esi
mov word [ebp - 0x44], ax
mov dword [ebp - 0x48], esi
jmp 0x4105b2
mov ecx, 0x403ed0
test edi, edi
jns 0x410526
mov ecx, 0x403ee4
mov eax, edi
cdq
xor eax, edx
push 0x403f6c
sub eax, edx
push eax
push ebx
push ecx
lea eax, [ebp - 0x18]
push eax
call fcn.00411a78
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x48], esi
mov eax, 0x191
test esi, esi
js 0x4105e9
push 0x403f6c
push dword [ebp - 8]
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x24]
push ebx
push 0x403ed0
push eax
call fcn.00411a78
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x48], esi
mov eax, 0x196
test esi, esi
js 0x4105e9
push 1
push dword [ebp - 0x24]
mov word [ebp - 0x44], ax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4105ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4105d4
mov eax, 0x19b
jmp 0x41050a
dec dword [ebp - 8]
mov esi, dword [ebp - 0x48]
dec edi
cmp edi, dword [ebp - 0xc]
jl 0x4105ed
mov eax, dword [ebp - 4]
jmp 0x4104b1
test esi, esi
jle 0x4105cd
movzx esi, si
or esi, 0x80070000
mov eax, 0x185
jmp 0x4105e6
test esi, esi
jle 0x4105e1
movzx esi, si
or esi, 0x80070000
mov eax, 0x19b
mov dword [ebp - 0x48], esi
mov word [ebp - 0x42], ax
lea ecx, [ebp - 0x24]
call fcn.00411683
lea ecx, [ebp - 0x18]
call fcn.00411683
lea ecx, [ebp - 0x48]
call fcn.0040fbc2
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret