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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x270
mov esi, ecx
mov eax, dword [0x450014]
xor eax, ebp
mov dword [esp + 0x268], eax
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
test edx, edx
je 0x4021d7
lea edi, [esp + 0x60]
push 0x208
push 0xff
push edi
call fcn.0040f850
add esp, 0xc
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
xor eax, eax
dec eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
push edi
call fcn.0041ce38
add esp, 4
cmp eax, 0x7ffffff0
jae 0x4027a5
mov ebx, eax
cmp eax, 5
jae 0x402227
lea edi, [esp + 0x50]
mov byte [edi + 0xb], bl
cmp ebx, 3
jne 0x402794
movzx eax, word [esp + 0x64]
mov word [esp + 0x54], ax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x50], eax
jmp 0x402268
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x40236f
mov edi, eax
dec eax
lea ebx, [esp + 0x40]
mov ecx, ebx
push 0
push eax
call fcn.0040ba30
cmp byte [ebx + 0xb], 0
jns 0x402202
mov ebx, dword [esp + 0x40]
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x40231e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0xfd
jmp 0x40237f
mov dword [esp + 8], esi
lea esi, [ebx + 8]
and esi, 0xfffffff8
lea eax, [esi + esi]
push eax
call fcn.0040bca2
add esp, 4
mov edi, eax
mov dword [esp + 0x50], eax
or esi, 0x80000000
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov eax, ebx
add eax, ebx
push eax
lea eax, [esp + 0x64]
push eax
push edi
call fcn.0040ed50
add esp, 0xc
mov esi, dword [esp + 8]
mov word [edi + ebx*2], 0
lea ebx, [esp + 0x50]
mov ecx, ebx
push 0xffffffffffffffff
push 0x5c
call fcn.0040b9e0
mov edi, eax
cmp eax, 0xffffffff
je 0x4022c2
lea eax, [edi + 1]
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x20]
push edx
push eax
push 0
push ebx
call fcn.004095c0
cmp byte [esp + 0x4b], 0
jns 0x4022ac
push dword [esp + 0x40]
call fcn.0040bcd2
add esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp + 0x48], eax
movsd xmm0, qword [esp + 0x20]
movsd qword [esp + 0x40], xmm0
jmp 0x402302
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ebx, [esp + 0x20]
mov dword [ebx], 0x107
mov dword [ebx + 4], eax
xor eax, eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, ebx
call fcn.00401f90
cmp byte [ebx + 0x13], 0
jns 0x4022fc
push dword [esp + 0x28]
call fcn.0040bcd2
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [esp + 0x5b], 0
jns 0x402315
push dword [esp + 0x50]
call fcn.0040bcd2
add esp, 4
cmp edi, 0xffffffff
je 0x40274d
mov dword [esp + 8], esi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea ebx, [esp + 0x14]
xorps xmm0, xmm0
movaps xmmword [ebx - 4], xmm0
lea edi, [esp + 0x60]
lea edx, [esp + 0x40]
mov ecx, edi
push dword [ebp + 0x10]
push eax
push esi
call fcn.004027b0
add esp, 0xc
mov dword [esp + 0xc], ebx
cmp byte [ebx + 0xb], 0
movzx eax, byte [edi + 0xb]
js 0x4023cb
test al, al
jns 0x4023b4
lea ecx, [esp + 0x14]
push dword [esp + 0x64]
push dword [esp + 0x64]
call fcn.00409790
jmp 0x4023e3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0xf8
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.00401f90
cmp byte [edi + 0x13], 0
jns 0x4023a9
push dword [esp + 0x68]
call fcn.0040bcd2
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
jmp 0x40274d
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x14]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp + 0x60]
movsd qword [ecx], xmm0
jmp 0x4023e3
test al, al
lea edx, [esp + 0x60]
cmovs eax, dword [edx + 4]
cmovs edx, dword [edx]
lea ecx, [esp + 0x14]
push eax
push edx
call fcn.00409680
mov esi, dword [esp + 8]
cmp byte [esp + 0x6b], 0
js 0x402402
mov word [esp + 0x60], 0
mov byte [esp + 0x6b], 0
mov ecx, dword [esp + 0x64]
xor eax, eax
jmp 0x402419
mov eax, dword [esp + 0x60]
mov word [eax], 0
mov dword [esp + 0x64], 0
xor ecx, ecx
mov al, byte [esp + 0x6b]
test al, al
movzx edx, al
cmovs edx, ecx
test edx, edx
je 0x402450
test al, al
jns 0x40242d
mov edi, dword [esp + 0x60]
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [esp + 0x6b], 0
jns 0x402460
mov eax, dword [esp + 0x60]
mov word [eax], 0
mov dword [esp + 0x64], 0
mov al, byte [esp + 0x6b]
test al, al
jns 0x402460
push dword [esp + 0x60]
call fcn.0040bcd2
add esp, 4
movzx eax, byte [esp + 0x1f]
test al, al
jns 0x40246d
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40266d
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
push 0x44a426
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x20], eax
test eax, eax
je 0x4024fa
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
test eax, eax
je 0x4024db
push 0x800
call eax
test eax, eax
je 0x40253d
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
mov eax, dword [esp + 0x50]
test eax, eax
je 0x4024d3
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [esp + 0x50], edi
test edi, edi
je 0x40254f
cmp byte [esp + 0x1f], 0
lea eax, [esp + 0x14]
jns 0x4024ea
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x10], eax
jmp 0x402589
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0x82
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.00401f90
cmp byte [edi + 0x13], 0
jns 0x40260a
push dword [esp + 0x68]
call fcn.0040bcd2
add esp, 4
jmp 0x40260a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0x91
jmp 0x40255f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0x9c
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.00401f90
cmp byte [edi + 0x13], 0
jns 0x402589
push dword [esp + 0x68]
call fcn.0040bcd2
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
je 0x402598
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [esp + 0x50], 0
movzx eax, byte [esp + 0x5f]
mov ecx, eax
test al, al
jns 0x4025af
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x4025eb
test al, al
jns 0x4025bd
mov eax, dword [esp + 0x54]
jmp 0x4025c1
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [esp + 0x5f], 0
js 0x4025d6
mov byte [esp + 0x5f], 0
jmp 0x4025fb
mov eax, dword [esp + 0x54]
mov word [eax], 0
mov dword [esp + 0x58], 0
mov al, byte [esp + 0x5f]
test al, al
jns 0x4025fb
push dword [esp + 0x54]
call fcn.0040bcd2
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40260a
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [esp + 0x20], 0
movzx eax, byte [esp + 0x2f]
mov ecx, eax
test al, al
jns 0x402621
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x40265d
test al, al
jns 0x40262f
mov eax, dword [esp + 0x24]
jmp 0x402633
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [esp + 0x2f], 0
js 0x402648
mov byte [esp + 0x2f], 0
jmp 0x40266d
mov eax, dword [esp + 0x24]
mov word [eax], 0
mov dword [esp + 0x28], 0
mov al, byte [esp + 0x2f]
test al, al
jns 0x40266d
push dword [esp + 0x24]
call fcn.0040bcd2
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4026a6
lea edi, [esp + 0x60]
mov dword [edi], 0x111
xorps xmm0, xmm0
movups xmmword [edi + 4], xmm0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00401f90
cmp byte [edi + 0x13], 0
jns 0x4026a2
push dword [esp + 0x68]
call fcn.0040bcd2
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esi], eax
lea ecx, [esi + 4]
cmp byte [esp + 0x1f], 0
js 0x4026c6
lea edx, [esp + 0x14]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
movsd xmm0, qword [edx]
movsd qword [ecx], xmm0
jmp 0x4026de
push dword [esp + 0x18]
push dword [esp + 0x18]
call fcn.0040b440
cmp byte [esp + 0x1f], 0
js 0x402778
mov word [esp + 0x14], 0
mov byte [esp + 0x1f], 0
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x10], 0
test al, al
movzx edx, al
cmovs edx, ecx
test edx, edx
je 0x40273d
test al, al
jns 0x402710
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [esp + 0x1f], 0
js 0x402728
mov byte [esp + 0x1f], 0
jmp 0x40274d
mov eax, dword [esp + 0x14]
mov word [eax], 0
mov dword [esp + 0x18], 0
mov al, byte [esp + 0x1f]
test al, al
jns 0x40274d
push dword [esp + 0x14]
call fcn.0040bcd2
add esp, 4
cmp byte [esp + 0x4b], 0
jns 0x402760
push dword [esp + 0x40]
call fcn.0040bcd2
add esp, 4
mov ecx, dword [esp + 0x268]
xor ecx, ebp
call fcn.0040c1d8
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x14]
mov word [eax], 0
mov dword [esp + 0x18], 0
xor ecx, ecx
mov al, byte [esp + 0x1f]
jmp 0x4026f0
test ebx, ebx
je 0x402268
mov dword [esp + 8], esi
jmp 0x402251
lea ecx, [esp + 0x50]
call fcn.0043fe20
int3