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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x248
mov esi, ecx
mov eax, dword [0x455014]
xor eax, ebp
mov dword [esp + 0x240], eax
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
test edx, edx
jne 0x4026ec
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40273a
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x38]
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.00402470
cmp byte [edi + 0x13], 0
jns 0x4026bb
push dword [esp + 0x40]
call fcn.0040d7e0
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [esp + 0x23], 0
jns 0x4026d4
push dword [esp + 0x18]
call fcn.0040d7e0
add esp, 4
mov ecx, dword [esp + 0x240]
xor ecx, ebp
call fcn.0040e119
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea edi, [esp + 0x38]
push 0x208
push 0xff
push edi
call fcn.00410b20
add esp, 0xc
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
dec eax
lea ebx, [esp + 0x28]
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov ecx, ebx
push edi
call fcn.00432310
movzx eax, byte [ebx + 0xb]
test al, al
jns 0x40277a
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
jmp 0x40277d
mov ebx, eax
dec eax
lea edi, [esp + 0x18]
mov ecx, edi
push 0
push eax
call fcn.0040d610
cmp byte [edi + 0xb], 0
jns 0x402755
mov edi, dword [esp + 0x18]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4027fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x38]
mov dword [edi], 0xf4
jmp 0x402691
and eax, 0x7f
test eax, eax
je 0x40279d
add eax, eax
test eax, eax
je 0x40279d
lea edx, [eax - 2]
cmp word [ebx + eax - 2], 0x5c
mov eax, edx
jne 0x402783
cmp edx, 0xfffffffe
jne 0x402afe
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 4]
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.00402470
cmp byte [edi + 0x13], 0
jns 0x4027d7
push dword [esp + 0xc]
call fcn.0040d7e0
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov bl, 1
cmp byte [esp + 0x33], 0
jns 0x4027f2
push dword [esp + 0x28]
call fcn.0040d7e0
add esp, 4
test bl, bl
jne 0x4026c1
mov eax, dword [ebp + 0xc]
lea edi, [esi + 4]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
lea ebx, [esp + 0x38]
lea edx, [esp + 0x18]
mov ecx, ebx
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00402b70
add esp, 0xc
cmp edi, ebx
je 0x402858
cmp byte [esi + 0xf], 0
movzx eax, byte [esp + 0x43]
js 0x402b45
test al, al
jns 0x402847
mov ecx, edi
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.0040bac0
jmp 0x402858
mov eax, dword [esp + 0x40]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x38]
movsd qword [edi], xmm0
cmp byte [esp + 0x43], 0
js 0x402873
mov word [esp + 0x38], 0
mov byte [esp + 0x43], 0
mov ecx, dword [esp + 0x3c]
xor eax, eax
jmp 0x40288a
mov eax, dword [esp + 0x38]
mov word [eax], 0
mov dword [esp + 0x3c], 0
xor ecx, ecx
mov al, byte [esp + 0x43]
mov edx, eax
and dl, 0x7f
test al, al
movzx edx, dl
cmovs edx, ecx
test edx, edx
je 0x4028c6
test al, al
jns 0x4028a3
mov ebx, dword [esp + 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x43], 0
jns 0x4028d6
mov eax, dword [esp + 0x38]
mov word [eax], 0
mov dword [esp + 0x3c], 0
mov al, byte [esp + 0x43]
test al, al
jns 0x4028d6
push dword [esp + 0x38]
call fcn.0040d7e0
add esp, 4
movzx eax, byte [esi + 0xf]
test al, al
jns 0x4028e3
mov eax, dword [esi + 8]
jmp 0x4028e6
and eax, 0x7f
test eax, eax
je 0x402abb
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ebx
push 0x44f5bc
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 4], eax
test eax, eax
je 0x402975
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
movaps xmm0, xmmword [0x44f140]
movups xmmword [esp + 0x28], xmm0
test eax, eax
je 0x40294f
mov ecx, eax
call dword [section..00cfg]
push 0x800
call ecx
test eax, eax
je 0x4029b8
push str.version.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test eax, eax
je 0x4029ca
cmp byte [esi + 0xf], 0
jns 0x402958
mov edi, dword [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi], eax
test ebx, ebx
je 0x402a04
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x402a04
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x38]
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.00402470
cmp byte [edi + 0x13], 0
jns 0x402a67
push dword [esp + 0x40]
call fcn.0040d7e0
add esp, 4
jmp 0x402a67
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x38]
mov dword [edi], 0x88
jmp 0x4029da
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x38]
mov dword [edi], 0x93
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.00402470
cmp byte [edi + 0x13], 0
jns 0x402a04
push dword [esp + 0x40]
call fcn.0040d7e0
add esp, 4
mov dword [esp + 0x28], 0
cmp byte [esp + 0x37], 0
js 0x402a1b
je 0x402a58
lea eax, [esp + 0x2c]
jmp 0x402a26
cmp dword [esp + 0x30], 0
je 0x402a4c
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x37], 0
jns 0x402a58
mov eax, dword [esp + 0x2c]
mov word [eax], 0
mov dword [esp + 0x30], 0
cmp byte [esp + 0x37], 0
jns 0x402a58
push dword [esp + 0x2c]
call fcn.0040d7e0
add esp, 4
mov eax, dword [esp + 4]
test eax, eax
je 0x402a67
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 4], 0
cmp byte [esp + 0x13], 0
js 0x402a7e
je 0x402abb
lea eax, [esp + 8]
jmp 0x402a89
cmp dword [esp + 0xc], 0
je 0x402aaf
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x13], 0
jns 0x402abb
mov eax, dword [esp + 8]
mov word [eax], 0
mov dword [esp + 0xc], 0
cmp byte [esp + 0x13], 0
jns 0x402abb
push dword [esp + 8]
call fcn.0040d7e0
add esp, 4
cmp dword [esi], 0
jne 0x4026c1
movaps xmm0, xmmword [0x44f150]
lea edi, [esp + 0x38]
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00402470
cmp byte [edi + 0x13], 0
jns 0x4026c1
push dword [esp + 0x40]
call fcn.0040d7e0
add esp, 4
jmp 0x4026c1
sar edx, 1
inc edx
lea eax, [esp + 0x34]
lea edi, [esp + 0x28]
lea ecx, [esp + 4]
push eax
push edx
push 0
push edi
call fcn.0040b8c0
cmp byte [esp + 0x23], 0
jns 0x402b2a
push dword [esp + 0x18]
call fcn.0040d7e0
add esp, 4
mov eax, dword [esp + 0xc]
mov dword [esp + 0x20], eax
movsd xmm0, qword [esp + 4]
movsd qword [esp + 0x18], xmm0
xor ebx, ebx
jmp 0x4027df
mov edx, eax
and edx, 0x7f
test al, al
cmovs edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
cmovns eax, ebx
mov ecx, edi
push edx
push eax
call fcn.0040b9f0
jmp 0x402858