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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x240
mov esi, ecx
mov eax, dword [0x455010]
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 0x4025f6
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x402707
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.00402360
cmp byte [edi + 0x13], 0
jns 0x4025c2
push dword [ebp - 0x210]
call fcn.0040e1d0
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [ebp - 0x22d], 0
jns 0x4025df
push dword [ebp - 0x238]
call fcn.0040e1d0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040eb09
mov eax, esi
add esp, 0x240
pop esi
pop edi
pop ebx
pop ebp
ret
lea edi, [ebp - 0x218]
push 0x208
push 0xff
push edi
call fcn.00411c80
add esp, 0xc
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
xor eax, eax
dec eax
lea ebx, [ebp - 0x228]
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov ecx, ebx
push edi
call fcn.00433700
movzx eax, byte [ebx + 0xb]
test al, al
js 0x402643
and eax, 0x7f
jmp 0x40264f
mov eax, dword [ebp - 0x224]
mov ebx, dword [ebp - 0x228]
test eax, eax
je 0x40266f
add eax, eax
test eax, eax
je 0x40266f
lea edx, [eax - 2]
cmp word [ebx + eax - 2], 0x5c
mov eax, edx
jne 0x402655
cmp edx, 0xfffffffe
jne 0x402ad3
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.00402360
cmp byte [edi + 0x13], 0
jns 0x4026ad
push dword [ebp - 0x244]
call fcn.0040e1d0
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov bl, 1
cmp byte [ebp - 0x21d], 0
jns 0x4026cc
push dword [ebp - 0x228]
call fcn.0040e1d0
add esp, 4
test bl, bl
jne 0x4025c8
jmp 0x402732
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0xf4
jmp 0x402596
mov eax, dword [ebp - 0x210]
mov dword [edi + 8], eax
movsd xmm0, qword [ebp - 0x218]
movsd qword [edi], xmm0
jmp 0x40278b
mov ebx, eax
dec eax
lea edi, [ebp - 0x238]
mov ecx, edi
push 0
push eax
call fcn.0040e000
cmp byte [edi + 0xb], 0
jns 0x402726
mov edi, dword [ebp - 0x238]
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x4026d6
mov eax, dword [ebp + 0xc]
lea edi, [esi + 4]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
lea ebx, [ebp - 0x218]
lea edx, [ebp - 0x238]
mov ecx, ebx
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00402b40
add esp, 0xc
cmp edi, ebx
je 0x40278b
cmp byte [esi + 0xf], 0
movzx eax, byte [ebp - 0x20d]
js 0x402aae
test al, al
jns 0x4026ed
mov ecx, edi
push dword [ebp - 0x214]
push dword [ebp - 0x218]
call fcn.0040b8f0
cmp byte [ebp - 0x20d], 0
js 0x402811
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 0x4027f2
test al, al
jns 0x4027c7
mov ebx, dword [ebp - 0x218]
push ebx
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x20d], 0
jns 0x402804
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
mov al, byte [ebp - 0x20d]
test al, al
jns 0x402804
push dword [ebp - 0x218]
call fcn.0040e1d0
add esp, 4
movzx eax, byte [esi + 0xf]
test al, al
js 0x40284b
and eax, 0x7f
jmp 0x40284e
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
xor ecx, ecx
mov al, byte [ebp - 0x20d]
jmp 0x4027ac
cmp dword [ebp - 0x220], 0
je 0x402937
mov eax, dword [ebp - 0x224]
jmp 0x402909
mov eax, dword [esi + 8]
test eax, eax
je 0x4029b1
xor ebx, ebx
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x248], ebx
mov dword [ebp - 0x240], ebx
push 0x44f6ec
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [ebp - 0x24c], eax
test eax, eax
je 0x402a0c
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
movaps xmm0, xmmword [0x44f1a0]
movups xmmword [ebp - 0x228], xmm0
test eax, eax
je 0x4028cd
mov ecx, eax
call dword [section..00cfg]
push 0x800
call ecx
test eax, eax
je 0x402a67
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov ebx, eax
test eax, eax
je 0x402a53
cmp byte [esi + 0xf], 0
jns 0x4028d6
mov edi, dword [esi + 4]
push edi
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esi], eax
test ebx, ebx
je 0x4028ea
push ebx
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x228], 0
cmp byte [ebp - 0x219], 0
js 0x402833
je 0x402945
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x219], 0
jns 0x402945
mov eax, dword [ebp - 0x224]
mov word [eax], 0
mov dword [ebp - 0x220], 0
cmp byte [ebp - 0x219], 0
jns 0x402945
push dword [ebp - 0x224]
call fcn.0040e1d0
add esp, 4
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x402956
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x24c], 0
cmp byte [ebp - 0x23d], 0
js 0x4029f8
je 0x4029b1
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x23d], 0
jns 0x4029b1
mov eax, dword [ebp - 0x248]
mov word [eax], 0
mov dword [ebp - 0x244], 0
cmp byte [ebp - 0x23d], 0
jns 0x4029b1
push dword [ebp - 0x248]
call fcn.0040e1d0
add esp, 4
cmp dword [esi], 0
jne 0x4025c8
movaps xmm0, xmmword [0x44f1b0]
lea edi, [ebp - 0x218]
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402360
cmp byte [edi + 0x13], 0
jns 0x4025c8
push dword [ebp - 0x210]
call fcn.0040e1d0
add esp, 4
jmp 0x4025c8
cmp dword [ebp - 0x244], 0
je 0x4029a3
mov eax, dword [ebp - 0x248]
jmp 0x402975
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.00402360
cmp byte [edi + 0x13], 0
jns 0x402956
push dword [ebp - 0x210]
call fcn.0040e1d0
add esp, 4
jmp 0x402956
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x93
jmp 0x402a79
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.00402360
cmp byte [edi + 0x13], 0
jns 0x4028ea
push dword [ebp - 0x210]
call fcn.0040e1d0
add esp, 4
jmp 0x4028ea
mov edx, eax
and edx, 0x7f
test al, al
cmovs edx, dword [ebp - 0x214]
mov eax, dword [ebp - 0x218]
cmovns eax, ebx
mov ecx, edi
push edx
push eax
call fcn.0040b820
jmp 0x40278b
sar edx, 1
inc edx
lea eax, [ebp - 0x229]
lea edi, [ebp - 0x228]
lea ecx, [ebp - 0x24c]
push eax
push edx
push 0
push edi
call fcn.0040b6f0
cmp byte [ebp - 0x22d], 0
jns 0x402b09
push dword [ebp - 0x238]
call fcn.0040e1d0
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
jmp 0x4026b5