Function at 0x4018c0
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x280
mov ebx, ecx
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], 0
test edx, edx
je 0x401a03
mov dword [ebp - 0x28c], ebx
lea edi, [ebp - 0x24c]
xor ebx, ebx
push 0x104
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
lea esi, [ebp - 0x2c]
mov eax, 7
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], ebx
mov word [esi], 0
push edi
call fcn.004079d7
add esp, 4
mov ecx, esi
push eax
push edi
call fcn.004020a6
mov ecx, dword [esi + 0x10]
cmp dword [esi + 0x14], 7
jbe 0x401940
mov esi, dword [ebp - 0x2c]
test ecx, ecx
mov ebx, dword [ebp - 0x28c]
je 0x401b90
lea eax, [esi + ecx*2 - 2]
cmp word [eax], 0x5c
je 0x401976
add ecx, ecx
mov edx, 2
sub edx, ecx
test edx, edx
je 0x401b90
add edx, 2
cmp word [eax - 2], 0x5c
lea eax, [eax - 2]
jne 0x401961
sub eax, esi
mov dword [ebp - 0x274], 0xf
mov dword [ebp - 0x278], 0
mov byte [ebp - 0x288], 0
cmp eax, 0xfffffffe
je 0x401bab
sar eax, 1
inc eax
xor ebx, ebx
lea esi, [ebp - 0x26c]
mov dword [esi + 0x10], ebx
mov ecx, 7
mov dword [esi + 0x14], ecx
mov word [esi], bx
lea edx, [ebp - 0x2c]
mov ecx, esi
push eax
push ebx
push edx
call fcn.0040206e
lea edi, [ebp - 0x44]
mov ecx, edi
call fcn.00402238
mov ecx, 6
mov eax, esi
rep movsd dword es:[edi], dword [esi]
mov edi, 7
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], 7
mov word [eax], bx
mov ecx, eax
call fcn.00402238
lea ecx, [ebp - 0x288]
call fcn.00402290
lea ecx, [ebp - 0x2c]
call fcn.00402238
jmp 0x401a49
xor edi, edi
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x401c1b
mov esi, eax
mov dword [ebp - 0x28c], ebx
dec eax
lea edi, [ebp - 0x44]
mov ecx, edi
push 0
push eax
call fcn.00401e2c
cmp dword [edi + 0x14], 7
jbe 0x401a34
mov edi, dword [ebp - 0x44]
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
mov edi, 7
je 0x401c56
mov eax, dword [ebp + 0xc]
xor ebx, ebx
lea esi, [ebp - 0x284]
mov dword [esi - 4], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edi
mov word [esi], 0
lea edi, [ebp - 0x24c]
lea edx, [ebp - 0x44]
mov ecx, edi
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.004022e2
add esp, 0xc
mov ecx, esi
push edi
call fcn.00402688
cmp dword [edi + 0x10], ebx
je 0x401ac2
mov ebx, 7
cmp dword [ebp - 0x238], ebx
mov eax, edi
jbe 0x401a9e
mov eax, dword [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp dword [ebp - 0x238], ebx
jbe 0x401ab3
mov edi, dword [ebp - 0x24c]
mov dword [ebp - 0x23c], 0
mov word [edi], 0
lea ecx, [ebp - 0x24c]
call fcn.00402238
cmp dword [ebp - 0x274], 0
mov ebx, dword [ebp - 0x28c]
je 0x401d5c
mov edi, 7
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x258], 0
mov word [ebp - 0x268], 0
push 0x41327e
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [ebp - 0x26c], eax
test eax, eax
je 0x401cb4
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], 0
test eax, eax
je 0x401b6d
push 0x800
call eax
test eax, eax
je 0x401cf5
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x401b62
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x401d0a
cmp dword [ebp - 0x270], 7
mov eax, esi
jbe 0x401b7e
mov eax, dword [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [ebp - 0x288], eax
jmp 0x401d49
mov dword [ebp - 0x274], 0xf
mov dword [ebp - 0x278], 0
mov byte [ebp - 0x288], 0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea esi, [ebp - 0x264]
mov dword [esi - 8], 0xf7
mov dword [esi - 4], eax
mov eax, 7
mov dword [esi + 0x14], eax
xor edi, edi
mov dword [esi + 0x10], edi
mov word [esi], di
lea edx, [ebp - 0x26c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, esi
call fcn.00402238
mov dword [ebx + 4], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0xc], edi
mov dword [ebx + 8], edi
mov dword [ebx], edi
mov eax, 7
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], edi
mov word [ebx + 4], di
lea ecx, [ebp - 0x288]
call fcn.00402290
lea ecx, [ebp - 0x2c]
call fcn.00402238
jmp 0x401dda
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea esi, [ebp - 0x244]
mov dword [esi - 8], 0xe8
mov dword [esi - 4], eax
mov eax, 7
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], edi
mov word [esi], di
lea edx, [ebp - 0x24c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, esi
call fcn.00402238
jmp 0x401c92
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea esi, [ebp - 0x244]
mov dword [esi - 8], 0xed
mov dword [esi - 4], eax
mov dword [esi + 0x14], edi
xor edi, edi
mov dword [esi + 0x10], edi
mov word [esi], di
lea edx, [ebp - 0x24c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, esi
call fcn.00402238
mov ebx, dword [ebp - 0x28c]
mov dword [ebx + 4], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0xc], edi
mov dword [ebx + 8], edi
mov dword [ebx], edi
mov eax, 7
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], edi
mov word [ebx + 4], di
jmp 0x401dda
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, 7
lea edi, [ebp - 0x244]
mov dword [edi - 8], 0x82
mov dword [edi - 4], eax
mov dword [edi + 0x14], ecx
mov dword [edi + 0x10], 0
mov word [edi], 0
lea edx, [ebp - 0x24c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, edi
call fcn.00402238
jmp 0x401d51
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x244]
mov dword [edi - 8], 0x91
jmp 0x401d1d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x244]
mov dword [edi - 8], 0x9c
mov dword [edi - 4], eax
mov eax, 7
mov dword [edi + 0x14], eax
mov dword [edi + 0x10], 0
mov word [edi], 0
lea edx, [ebp - 0x24c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, edi
call fcn.00402238
lea ecx, [ebp - 0x2c]
call fcn.0040166e
lea ecx, [ebp - 0x26c]
call fcn.0040166e
mov eax, dword [ebp - 0x288]
test eax, eax
mov ecx, 7
jne 0x401da3
lea edi, [ebp - 0x244]
mov dword [edi - 8], 0x101
xor eax, eax
mov dword [edi - 4], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov word [edi], 0
lea edx, [ebp - 0x24c]
mov ecx, dword [ebp + 0x10]
call fcn.004016a6
mov ecx, edi
call fcn.00402238
mov eax, dword [ebp - 0x288]
mov dword [ebx], eax
lea ecx, [ebx + 4]
xor edi, edi
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x18], edi
push esi
call fcn.00402984
cmp dword [ebp - 0x270], 7
jbe 0x401dc5
mov esi, dword [ebp - 0x284]
lea ecx, [ebp - 0x288]
mov dword [ecx + 0x14], edi
mov word [esi], 0
mov dword [ecx], edi
call fcn.0040166e
lea ecx, [ebp - 0x44]
call fcn.00402238
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402c61
mov eax, ebx
add esp, 0x280
pop esi
pop edi
pop ebx
pop ebp
ret