Function at 0x403f3e
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4179b1
push eax
mov dword fs:[0], esp
sub esp, 0x188
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push dword [ebp + 8]
call fcn.00408fdd
pop ecx
pop ecx
test al, al
jne 0x403fca
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0xc], ebx
call esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x403f93
call esi
mov dword [esp + 0xc], eax
push 1
push dword [ebp + 8]
call fcn.00408fdd
pop ecx
pop ecx
test al, al
jne 0x403fca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403fb3
cmp eax, 3
jne 0x403fca
mov al, 1
mov ecx, dword [esp + 0x194]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x403fb3
call fcn.0040d480
cdq
mov ecx, 0x359c846
idiv ecx
mov dword [esp + 0xc], edx
call fcn.0040d480
cdq
mov ecx, 0x15f5
idiv ecx
push 0xf
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
imul eax, ecx
pop ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
mov dword [esp + 0x19c], ebx
mov byte [esp + 0x14], bl
xor eax, eax
lea edi, [esp + 0x15]
stosb byte es:[edi], al
mov al, byte [0x41a575]
mov byte [esp + 0x14], al
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
mov byte [esp + 0x19c], 1
call fcn.0040d480
cdq
mov ecx, 0x35a1668
idiv ecx
mov dword [esp + 0xc], edx
call fcn.0040d480
cdq
mov ecx, 0x15f7
idiv ecx
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
imul eax, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
call esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40409d
call esi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x88]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4040d2
lea eax, [esp + 0x88]
push eax
call fcn.0040d2b0
pop ecx
lea ecx, [esp + 0x88]
lea esi, [esp + 0x18]
call fcn.00403470
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x404127
cmp dword [esp + 0x2c], 0x10
mov ecx, dword [esp + 0x18]
jae 0x4040e9
lea ecx, [esp + 0x18]
cmp byte [ecx + eax - 1], 0x5c
jne 0x404127
dec eax
push eax
push ebx
lea eax, [esp + 0x20]
push eax
lea esi, [esp + 0x5c]
call fcn.0040630a
mov ebx, eax
lea eax, [esp + 0x18]
mov byte [esp + 0x19c], 2
call fcn.004033e8
push 1
xor edi, edi
mov byte [esp + 0x1a0], 1
call fcn.00403438
xor ebx, ebx
cmp dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x18]
jae 0x404136
lea eax, [esp + 0x18]
push 1
push eax
call fcn.00408fdd
pop ecx
pop ecx
test al, al
je 0x4042c1
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0xc]
add eax, 0x15fb
je 0x40415b
inc dword [esp + 0xc]
call fcn.0040d480
mov esi, eax
shl esi, 0xf
call fcn.0040d480
or eax, esi
push eax
lea eax, [esp + 0x70]
push str.__tmp__08x
push eax
call fcn.00408c79
add esp, 0xc
push ebx
push eax
or eax, 0xffffffff
lea esi, [esp + 0x20]
mov byte [esp + 0x1a4], 3
call fcn.00406542
push 1
xor edi, edi
lea esi, [esp + 0x70]
mov byte [esp + 0x1a0], 1
call fcn.00403438
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0x15fc
mov dword [esp + 0xc], ebx
jmp 0x4041ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], eax
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, 2
jl 0x4041bc
mov eax, dword [esp + 0x18]
push 0x10
pop esi
cmp dword [esp + 0x2c], esi
jae 0x4041e4
lea eax, [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 1
push eax
push dword [ebp + 8]
call edi
test eax, eax
je 0x4042c1
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], esi
jae 0x404208
lea eax, [esp + 0x18]
push eax
call fcn.00403d96
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x10]
add eax, 0x15fe
pop ecx
je 0x404222
inc dword [esp + 0xc]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], esi
jae 0x404230
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
jne 0x404268
push 1
xor edi, edi
lea esi, [esp + 0x38]
mov byte [esp + 0x1a0], bl
call fcn.00403438
or dword [esp + 0x19c], 0xffffffff
push 1
lea esi, [esp + 0x1c]
call fcn.00403438
jmp 0x403fb3
call fcn.0040d480
cdq
mov ecx, 0x15ff
idiv ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x35b4ef0
mov eax, dword [esp + 0xc]
test eax, eax
mov eax, dword [esp + 0x10]
jne 0x404291
mov eax, dword [esp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], esi
jae 0x4042a3
lea eax, [esp + 0x18]
push 4
push ebx
push eax
call edi
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0xc]
add eax, 0x1600
je 0x40423c
inc dword [esp + 0xc]
jmp 0x40423c
push dword [ebp + 8]
call fcn.00403d96
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 0x1602
pop ecx
mov dword [esp + 0xc], ebx
jmp 0x4042ea
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], eax
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, 2
jl 0x4042dc
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], ebx
call esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404311
call esi
mov dword [esp + 0x10], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
jne 0x404353
mov byte [esp + 0x14], al
push 1
xor edi, edi
lea esi, [esp + 0x38]
mov byte [esp + 0x1a0], bl
call fcn.00403438
or dword [esp + 0x19c], 0xffffffff
push 1
lea esi, [esp + 0x1c]
call fcn.00403438
mov al, byte [esp + 0x14]
jmp 0x403fb5
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0xc]
test eax, eax
je 0x404376
push str.windows5636XP
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x404376
mov dword [esp + 0xc], ebx
push 4
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne byte [esp + 0x14]
jmp 0x404323