Function at 0x40c899
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
mov eax, 0x42346c
call fcn.00415c8c
sub esp, 0x150
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x174]
push 0
push edi
call fcn.004129fc
xor ebx, ebx
pop ecx
inc ebx
pop ecx
test al, al
jne 0x40ca3b
push ebx
push edi
call fcn.004129fc
pop ecx
pop ecx
test al, al
jne 0x40ca3b
mov eax, dword [0x4301c0]
mov esi, dword [0x4301c4]
mov ecx, eax
not ecx
mov ebp, 0x3b9
and ecx, ebp
neg ecx
sbb ecx, ecx
neg ecx
lea edx, [eax + eax]
or edx, ecx
mov dword [0x4301c0], edx
test esi, esi
jne 0x40c924
push 0x1de
mov eax, 0x431760
push eax
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [0x4301c0]
mov esi, dword [0x4301c4]
mov eax, edx
not eax
and eax, ebp
neg eax
sbb eax, eax
neg eax
add edx, edx
or edx, eax
mov ecx, edx
not ecx
and ecx, ebp
neg ecx
sbb ecx, ecx
shl esi, 0xc
neg ecx
or esi, ebx
lea eax, [edx + edx]
or eax, ecx
inc esi
mov dword [0x4301c0], eax
mov eax, 0x127
cmove esi, eax
add eax, 0xffffffd2
cmp esi, eax
cmove esi, eax
mov eax, 0x2de
cmp esi, eax
cmove esi, eax
inc esi
mov eax, 0x1b2
cmove esi, eax
or esi, 0x27
mov dword [0x4301c4], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [0x4301c4]
mov ebp, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x28], eax
test esi, esi
jne 0x40c9a0
push 0
call ebp
mov esi, dword [0x4301c4]
mov eax, dword [0x4301c0]
mov ecx, eax
not ecx
and ecx, 0x3b9
or esi, 0x179
neg ecx
sbb ecx, ecx
lea edx, [eax + eax]
neg ecx
or edx, ecx
push 0x23
pop eax
cmp esi, eax
cmove esi, eax
inc esi
mov eax, 0x225
cmove esi, eax
mov eax, edx
not eax
and eax, 0x3b9
neg eax
sbb eax, eax
mov ecx, 0x80000000
and eax, ecx
add eax, ecx
shr edx, 1
or edx, eax
mov dword [0x4301c4], esi
mov dword [0x4301c0], edx
test esi, esi
jne 0x40ca04
push esi
call ebp
mov edx, dword [0x4301c0]
mov ecx, edx
not ecx
and ecx, 0x3b9
neg ecx
sbb ecx, ecx
mov eax, 0x80000000
and ecx, eax
add ecx, eax
mov eax, dword [esp + 0x28]
shr edx, 1
or edx, ecx
mov dword [0x4301c0], edx
cmp eax, 2
je 0x40cc1b
cmp eax, 3
je 0x40cc1b
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call ebp
test eax, eax
jne 0x40cc1b
xor ecx, ecx
push 0xf
pop eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
mov byte [esp + 0x10], cl
mov dword [esp + 0x168], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x2c], cl
mov byte [esp + 0x168], bl
lea eax, [esp + 0x5c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40cac0
cmp byte [esp + 0x5c], 0
jne 0x40caa6
xor eax, eax
jmp 0x40cab1
lea eax, [esp + 0x5c]
push eax
call fcn.00415400
pop ecx
push eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
call fcn.004022e2
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x40cb13
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
cmp byte [eax + ecx - 1], 0x5c
jne 0x40cb13
lea eax, [ecx - 1]
push eax
push 0
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00406e50
mov byte [esp + 0x168], 2
push eax
lea ecx, [esp + 0x14]
call fcn.00411237
mov byte [esp + 0x168], bl
lea ecx, [esp + 0x44]
call fcn.00401530
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push ebx
push eax
call fcn.004129fc
pop ecx
pop ecx
test al, al
je 0x40cbdb
call fcn.00417fe2
mov esi, eax
shl esi, 0xf
call fcn.00417fe2
or eax, esi
push eax
lea eax, [esp + 0x48]
push str.__tmp__08x
push eax
call fcn.0040813e
add esp, 0xc
mov byte [esp + 0x168], 3
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x1c]
call fcn.0040532b
mov byte [esp + 0x168], bl
lea ecx, [esp + 0x44]
call fcn.00401530
push 0x10
pop esi
cmp dword [esp + 0x24], esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x40cbdb
cmp dword [esp + 0x24], esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call fcn.0040b861
cmp dword [esp + 0x28], esi
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
pop ecx
push eax
call ebp
cmp eax, ebx
je 0x40cbf9
cmp dword [esp + 0x24], esi
push 4
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x40cbf9
push edi
call fcn.0040b861
pop ecx
push edi
call ebp
cmp eax, ebx
je 0x40cbf9
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne bl
mov byte [esp + 0x168], 0
lea ecx, [esp + 0x2c]
call fcn.00401530
or dword [esp + 0x168], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.00401530
mov ecx, dword [esp + 0x160]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret