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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x248
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 0x402b5a
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x402a46
mov ebx, eax
lea ecx, [eax - 1]
mov al, byte [ebp - 0x22d]
test al, al
jns 0x402719
mov edx, dword [ebp - 0x234]
mov edi, ecx
sub edi, edx
ja 0x402ca2
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x234], ecx
lea eax, [eax + ecx*2]
mov word [eax], 0
mov al, byte [ebp - 0x22d]
test al, al
js 0x40274d
lea eax, [ebp - 0x238]
jmp 0x402753
movzx edx, al
mov edi, ecx
sub edi, edx
ja 0x402c8f
mov edx, ecx
and dl, 0x7f
lea eax, [ebp - 0x238]
mov byte [eax + 0xb], dl
jmp 0x4026ff
mov eax, dword [ebp - 0x210]
mov dword [ebx + 8], eax
movsd xmm0, qword [ebp - 0x218]
movsd qword [ebx], xmm0
jmp 0x4027b8
mov eax, dword [ebp - 0x238]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x402a32
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.00402db0
add esp, 0xc
cmp ebx, edi
je 0x4027b8
cmp byte [esi + 0xf], 0
movzx eax, byte [ebp - 0x20d]
js 0x402d70
test al, al
jns 0x402736
mov ecx, ebx
push dword [ebp - 0x214]
push dword [ebp - 0x218]
call fcn.00409e50
cmp byte [ebp - 0x20d], 0
js 0x40283e
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 0x40281f
test al, al
jns 0x4027f4
mov edi, dword [ebp - 0x218]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebp - 0x20d], 0
jns 0x402831
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
mov al, byte [ebp - 0x20d]
test al, al
jns 0x402831
push dword [ebp - 0x218]
call fcn.0040b630
add esp, 4
movzx eax, byte [esi + 0xf]
test al, al
js 0x402878
and eax, 0x7f
jmp 0x40287b
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
xor ecx, ecx
mov al, byte [ebp - 0x20d]
jmp 0x4027d9
cmp dword [ebp - 0x220], 0
je 0x402964
mov eax, dword [ebp - 0x224]
jmp 0x402936
mov eax, dword [esi + 8]
test eax, eax
je 0x4029de
xor edi, edi
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x240], edi
push 0x44e4ec
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x24c], eax
test eax, eax
je 0x402ab8
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
movaps xmm0, xmmword [0x44e070]
movups xmmword [ebp - 0x228], xmm0
test eax, eax
je 0x4028fa
mov ecx, eax
call dword [section..00cfg]
push 0x800
call ecx
test eax, eax
je 0x402b13
push str.version.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test eax, eax
je 0x402aff
cmp byte [esi + 0xf], 0
jns 0x402903
mov ebx, dword [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi], eax
test edi, edi
je 0x402917
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x228], 0
cmp byte [ebp - 0x219], 0
js 0x402860
je 0x402972
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebp - 0x219], 0
jns 0x402972
mov eax, dword [ebp - 0x224]
mov word [eax], 0
mov dword [ebp - 0x220], 0
cmp byte [ebp - 0x219], 0
jns 0x402972
push dword [ebp - 0x224]
call fcn.0040b630
add esp, 4
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x402983
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x24c], 0
cmp byte [ebp - 0x23d], 0
js 0x402a1e
je 0x4029de
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebp - 0x23d], 0
jns 0x4029de
mov eax, dword [ebp - 0x248]
mov word [eax], 0
mov dword [ebp - 0x244], 0
cmp byte [ebp - 0x23d], 0
jns 0x4029de
push dword [ebp - 0x248]
call fcn.0040b630
add esp, 4
cmp dword [esi], 0
jne 0x402a8a
movaps xmm0, xmmword [0x44e080]
lea edi, [ebp - 0x218]
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004024a0
cmp byte [edi + 0x13], 0
jns 0x402a8a
push dword [ebp - 0x210]
call fcn.0040b630
add esp, 4
jmp 0x402a8a
cmp dword [ebp - 0x244], 0
je 0x4029d0
mov eax, dword [ebp - 0x248]
jmp 0x4029a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0xf4
jmp 0x402a58
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.004024a0
cmp byte [edi + 0x13], 0
jns 0x402a84
push dword [ebp - 0x210]
call fcn.0040b630
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [ebp - 0x22d], 0
jns 0x402aa1
push dword [ebp - 0x238]
call fcn.0040b630
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040bf69
mov eax, esi
add esp, 0x248
pop esi
pop edi
pop ebx
pop ebp
ret
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.004024a0
cmp byte [edi + 0x13], 0
jns 0x402983
push dword [ebp - 0x210]
call fcn.0040b630
add esp, 4
jmp 0x402983
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x93
jmp 0x402b25
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.004024a0
cmp byte [edi + 0x13], 0
jns 0x402917
push dword [ebp - 0x210]
call fcn.0040b630
add esp, 4
jmp 0x402917
lea ebx, [ebp - 0x218]
push 0x208
push 0xff
push ebx
call fcn.0040f190
add esp, 0xc
push 0x104
push ebx
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 ebx
call fcn.00431620
movzx eax, byte [edi + 0xb]
test al, al
js 0x402ba7
and eax, 0x7f
jmp 0x402bb3
mov eax, dword [ebp - 0x224]
mov edi, dword [ebp - 0x228]
test eax, eax
je 0x402bcf
add eax, eax
test eax, eax
je 0x402bcf
lea edx, [eax - 2]
cmp word [edi + eax - 2], 0x5c
mov eax, edx
jne 0x402bb9
cmp edx, 0xfffffffe
jne 0x402c39
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.004024a0
cmp byte [edi + 0x13], 0
jns 0x402c0d
push dword [ebp - 0x244]
call fcn.0040b630
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov bl, 1
cmp byte [ebp - 0x21d], 0
jns 0x402c2c
push dword [ebp - 0x228]
call fcn.0040b630
add esp, 4
test bl, bl
je 0x402763
jmp 0x402a8a
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.00409c40
cmp byte [ebp - 0x22d], 0
jns 0x402c6f
push dword [ebp - 0x238]
call fcn.0040b630
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 0x402c15
je 0x40270d
mov dword [ebp - 0x250], edx
mov edx, 4
jmp 0x402cc0
je 0x40270d
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x230]
mov edx, eax
and edx, 0x7fffffff
dec edx
shr eax, 0x18
mov ecx, edx
sub ecx, dword [ebp - 0x250]
cmp ecx, edi
jae 0x402d12
mov eax, edi
sub eax, edx
add eax, dword [ebp - 0x250]
mov dword [ebp - 0x254], eax
lea ecx, [ebp - 0x238]
xor eax, eax
push eax
xor eax, eax
push eax
push dword [ebp - 0x250]
push dword [ebp - 0x250]
push dword [ebp - 0x254]
push edx
call fcn.0040a330
mov eax, dword [ebp - 0x250]
lea ecx, [ebp - 0x238]
mov dword [ecx + 4], eax
mov al, byte [ecx + 0xb]
test al, al
jns 0x402d1e
mov ecx, dword [ebp - 0x238]
jmp 0x402d24
lea ecx, [ebp - 0x238]
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x254], ecx
lea eax, [ecx + eax*2]
lea ecx, [edi + edi]
push ecx
push 0
push eax
call fcn.0040f190
mov ecx, dword [ebp - 0x250]
add esp, 0xc
add ecx, edi
cmp byte [ebp - 0x22d], 0
jns 0x402d64
mov dword [ebp - 0x234], ecx
mov eax, dword [ebp - 0x254]
jmp 0x4026ff
mov eax, ecx
and al, 0x7f
mov byte [ebp - 0x22d], al
jmp 0x402d59
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.00409d70
jmp 0x4027b8