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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x244
mov esi, ecx
mov eax, dword [0x454010]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x230], eax
test edx, edx
jne 0x402b38
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x402a6c
mov edi, eax
mov ebx, eax
dec ebx
mov dword [ebp - 0x250], esi
jne 0x4026d2
lea esi, [ebp - 0x238]
mov byte [esi + 0xb], bl
mov word [esi + edi*2 - 2], 0
cmp byte [ebp - 0x22d], 0
js 0x40271c
lea eax, [ebp - 0x238]
jmp 0x402722
cmp ebx, 5
jae 0x402c27
lea esi, [ebp - 0x238]
lea eax, [ebx + ebx]
push eax
push 0
push esi
call fcn.0040efe0
add esp, 0xc
cmp byte [ebp - 0x22d], 0
jns 0x402cef
mov dword [ebp - 0x234], ebx
jmp 0x4026ba
mov eax, dword [ebp - 0x210]
mov dword [ebx + 8], eax
movsd xmm0, qword [ebp - 0x218]
movsd qword [ebx], xmm0
jmp 0x40278d
mov eax, dword [ebp - 0x238]
mov esi, dword [ebp - 0x250]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x402981
mov eax, dword [ebp + 0xc]
lea ebx, [esi + 4]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
lea edi, [ebp - 0x218]
lea edx, [ebp - 0x238]
mov ecx, edi
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00402d10
add esp, 0xc
cmp ebx, edi
je 0x40278d
cmp byte [esi + 0xf], 0
movzx eax, byte [ebp - 0x20d]
js 0x402c6b
test al, al
jns 0x402705
mov ecx, ebx
push dword [ebp - 0x214]
push dword [ebp - 0x218]
call fcn.00409cc0
cmp byte [ebp - 0x20d], 0
js 0x402813
mov word [ebp - 0x218], 0
mov byte [ebp - 0x20d], 0
mov ecx, dword [ebp - 0x214]
xor eax, eax
mov edx, eax
and dl, 0x7f
test al, al
movzx edx, dl
cmovs edx, ecx
test edx, edx
je 0x4027f4
test al, al
jns 0x4027c9
mov edi, dword [ebp - 0x218]
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x20d], 0
jns 0x402806
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
mov al, byte [ebp - 0x20d]
test al, al
jns 0x402806
push dword [ebp - 0x218]
call fcn.0040b480
add esp, 4
movzx eax, byte [esi + 0xf]
test al, al
jns 0x402835
mov eax, dword [esi + 8]
jmp 0x402838
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
xor ecx, ecx
mov al, byte [ebp - 0x20d]
jmp 0x4027ae
and eax, 0x7f
test eax, eax
je 0x402a16
xor edi, edi
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x240], edi
push 0x44e424
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [ebp - 0x24c], eax
test eax, eax
je 0x402929
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
xorps xmm0, xmm0
movups xmmword [ebp - 0x228], xmm0
test eax, eax
je 0x4028b3
mov ecx, eax
call dword [section..00cfg]
push 0x800
call ecx
test eax, eax
je 0x402998
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
test eax, eax
je 0x40296d
cmp byte [esi + 0xf], 0
jns 0x4028bc
mov ebx, dword [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esi], eax
test edi, edi
je 0x4029d6
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov al, byte [ebp - 0x219]
mov dword [ebp - 0x228], 0
test al, al
js 0x402914
je 0x4029d6
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x219], 0
js 0x402b0b
mov byte [ebp - 0x219], 0
jmp 0x4029d6
cmp dword [ebp - 0x220], 0
mov eax, dword [ebp - 0x224]
jne 0x4028f4
push eax
jmp 0x4029ce
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x79
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402460
cmp byte [edi + 0x13], 0
jns 0x4029e7
push dword [ebp - 0x210]
call fcn.0040b480
add esp, 4
jmp 0x4029e7
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x93
jmp 0x4029aa
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0xf4
jmp 0x402a7e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x88
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402460
cmp byte [edi + 0x13], 0
jns 0x4029d6
push dword [ebp - 0x210]
call fcn.0040b480
add esp, 4
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x4029e7
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x24c], 0
cmp byte [ebp - 0x23d], 0
js 0x402a52
je 0x402a16
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x23d], 0
js 0x402ade
cmp dword [esi], 0
jne 0x402ab0
lea edi, [ebp - 0x218]
mov dword [edi], 0x108
xorps xmm0, xmm0
movups xmmword [edi + 4], xmm0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402460
cmp byte [edi + 0x13], 0
jns 0x402ab0
push dword [ebp - 0x210]
call fcn.0040b480
add esp, 4
jmp 0x402ab0
cmp dword [ebp - 0x244], 0
mov eax, dword [ebp - 0x248]
jne 0x402a02
push eax
call fcn.0040b480
add esp, 4
jmp 0x402a16
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0xef
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402460
cmp byte [edi + 0x13], 0
jns 0x402aaa
push dword [ebp - 0x210]
call fcn.0040b480
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [ebp - 0x22d], 0
jns 0x402ac7
push dword [ebp - 0x238]
call fcn.0040b480
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040bdb9
mov eax, esi
add esp, 0x244
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x248]
mov word [eax], 0
mov dword [ebp - 0x244], 0
cmp byte [ebp - 0x23d], 0
jns 0x402a16
mov eax, dword [ebp - 0x248]
jmp 0x402a61
mov eax, dword [ebp - 0x224]
mov word [eax], 0
mov dword [ebp - 0x220], 0
cmp byte [ebp - 0x219], 0
jns 0x4029d6
mov eax, dword [ebp - 0x224]
jmp 0x402923
mov dword [ebp - 0x250], esi
lea esi, [ebp - 0x218]
push 0x208
push 0xff
push esi
call fcn.0040efe0
add esp, 0xc
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
xor eax, eax
dec eax
lea edi, [ebp - 0x228]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov ecx, edi
push esi
call fcn.004313c0
movzx eax, byte [edi + 0xb]
test al, al
js 0x402b8b
and eax, 0x7f
jmp 0x402b97
mov eax, dword [ebp - 0x224]
mov edi, dword [ebp - 0x228]
test eax, eax
mov esi, dword [ebp - 0x250]
je 0x402bbd
add eax, eax
test eax, eax
je 0x402bbd
lea edx, [eax - 2]
cmp word [edi + eax - 2], 0x5c
mov eax, edx
jne 0x402ba3
cmp edx, 0xfffffffe
jne 0x402c90
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x24c]
mov dword [edi], 0xfe
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402460
cmp byte [edi + 0x13], 0
jns 0x402bfb
push dword [ebp - 0x244]
call fcn.0040b480
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov bl, 1
cmp byte [ebp - 0x21d], 0
jns 0x402c1a
push dword [ebp - 0x228]
call fcn.0040b480
add esp, 4
test bl, bl
je 0x402738
jmp 0x402ab0
mov eax, edi
add eax, 0xfffffffb
sub esp, 0x18
xorps xmm0, xmm0
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], eax
mov dword [esp], 4
lea esi, [ebp - 0x238]
mov ecx, esi
call fcn.0040a1b0
mov dword [esi + 4], 0
cmp byte [esi + 0xb], 0
jns 0x4026e1
mov esi, dword [ebp - 0x238]
jmp 0x4026e1
mov edx, eax
and edx, 0x7f
test al, al
cmovs edx, dword [ebp - 0x214]
mov eax, dword [ebp - 0x218]
cmovns eax, edi
mov ecx, ebx
push edx
push eax
call fcn.00409be0
jmp 0x40278d
sar edx, 1
inc edx
lea eax, [ebp - 0x229]
lea esi, [ebp - 0x228]
lea ecx, [ebp - 0x24c]
push eax
push edx
push 0
push esi
call fcn.00409ab0
cmp byte [ebp - 0x22d], 0
jns 0x402cc6
push dword [ebp - 0x238]
call fcn.0040b480
add esp, 4
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x230], eax
movsd xmm0, qword [ebp - 0x24c]
movsd qword [ebp - 0x238], xmm0
xor ebx, ebx
mov esi, dword [ebp - 0x250]
jmp 0x402c03
and bl, 0x7f
mov byte [ebp - 0x22d], bl
jmp 0x4026ba