Function at 0x402070
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 0x402117
lea edi, [esp + 0x60]
push 0x208
push 0xff
push edi
call fcn.0040f8a0
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.0041ce88
add esp, 4
cmp eax, 0x7ffffff0
jae 0x4026e5
mov ebx, eax
cmp eax, 5
jae 0x402167
lea edi, [esp + 0x50]
mov byte [edi + 0xb], bl
cmp ebx, 3
jne 0x4026d4
movzx eax, word [esp + 0x64]
mov word [esp + 0x54], ax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x50], eax
jmp 0x4021a8
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4022af
mov edi, eax
dec eax
lea ebx, [esp + 0x40]
mov ecx, ebx
push 0
push eax
call fcn.0040baf0
cmp byte [ebx + 0xb], 0
jns 0x402142
mov ebx, dword [esp + 0x40]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40225e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0xfd
jmp 0x4022bf
mov dword [esp + 8], esi
lea esi, [ebx + 8]
and esi, 0xfffffff8
lea eax, [esi + esi]
push eax
call fcn.0040bcf2
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.0040eda0
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.0040baa0
mov edi, eax
cmp eax, 0xffffffff
je 0x402202
lea eax, [edi + 1]
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x20]
push edx
push eax
push 0
push ebx
call fcn.004098a0
cmp byte [esp + 0x4b], 0
jns 0x4021ec
push dword [esp + 0x40]
call fcn.0040bd22
add esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp + 0x48], eax
movsd xmm0, qword [esp + 0x20]
movsd qword [esp + 0x40], xmm0
jmp 0x402242
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.00401ed0
cmp byte [ebx + 0x13], 0
jns 0x40223c
push dword [esp + 0x28]
call fcn.0040bd22
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [esp + 0x5b], 0
jns 0x402255
push dword [esp + 0x50]
call fcn.0040bd22
add esp, 4
cmp edi, 0xffffffff
je 0x40268d
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.004026f0
add esp, 0xc
mov dword [esp + 0xc], ebx
cmp byte [ebx + 0xb], 0
movzx eax, byte [edi + 0xb]
js 0x40230b
test al, al
jns 0x4022f4
lea ecx, [esp + 0x14]
push dword [esp + 0x64]
push dword [esp + 0x64]
call fcn.00409a70
jmp 0x402323
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.00401ed0
cmp byte [edi + 0x13], 0
jns 0x4022e9
push dword [esp + 0x68]
call fcn.0040bd22
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
jmp 0x40268d
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x14]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp + 0x60]
movsd qword [ecx], xmm0
jmp 0x402323
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.00409960
mov esi, dword [esp + 8]
cmp byte [esp + 0x6b], 0
js 0x402342
mov word [esp + 0x60], 0
mov byte [esp + 0x6b], 0
mov ecx, dword [esp + 0x64]
xor eax, eax
jmp 0x402359
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 0x402390
test al, al
jns 0x40236d
mov edi, dword [esp + 0x60]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x6b], 0
jns 0x4023a0
mov eax, dword [esp + 0x60]
mov word [eax], 0
mov dword [esp + 0x64], 0
mov al, byte [esp + 0x6b]
test al, al
jns 0x4023a0
push dword [esp + 0x60]
call fcn.0040bd22
add esp, 4
movzx eax, byte [esp + 0x1f]
test al, al
jns 0x4023ad
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4025ad
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 0x40243a
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
test eax, eax
je 0x40241b
push 0x800
call eax
test eax, eax
je 0x40247d
push str.version.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov eax, dword [esp + 0x50]
test eax, eax
je 0x402413
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 0x50], edi
test edi, edi
je 0x40248f
cmp byte [esp + 0x1f], 0
lea eax, [esp + 0x14]
jns 0x40242a
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x10], eax
jmp 0x4024c9
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.00401ed0
cmp byte [edi + 0x13], 0
jns 0x40254a
push dword [esp + 0x68]
call fcn.0040bd22
add esp, 4
jmp 0x40254a
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x60]
mov dword [edi], 0x91
jmp 0x40249f
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.00401ed0
cmp byte [edi + 0x13], 0
jns 0x4024c9
push dword [esp + 0x68]
call fcn.0040bd22
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
je 0x4024d8
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 0x4024ef
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x40252b
test al, al
jns 0x4024fd
mov eax, dword [esp + 0x54]
jmp 0x402501
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x5f], 0
js 0x402516
mov byte [esp + 0x5f], 0
jmp 0x40253b
mov eax, dword [esp + 0x54]
mov word [eax], 0
mov dword [esp + 0x58], 0
mov al, byte [esp + 0x5f]
test al, al
jns 0x40253b
push dword [esp + 0x54]
call fcn.0040bd22
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40254a
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 0x402561
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x40259d
test al, al
jns 0x40256f
mov eax, dword [esp + 0x24]
jmp 0x402573
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x2f], 0
js 0x402588
mov byte [esp + 0x2f], 0
jmp 0x4025ad
mov eax, dword [esp + 0x24]
mov word [eax], 0
mov dword [esp + 0x28], 0
mov al, byte [esp + 0x2f]
test al, al
jns 0x4025ad
push dword [esp + 0x24]
call fcn.0040bd22
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4025e6
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.00401ed0
cmp byte [edi + 0x13], 0
jns 0x4025e2
push dword [esp + 0x68]
call fcn.0040bd22
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esi], eax
lea ecx, [esi + 4]
cmp byte [esp + 0x1f], 0
js 0x402606
lea edx, [esp + 0x14]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
movsd xmm0, qword [edx]
movsd qword [ecx], xmm0
jmp 0x40261e
push dword [esp + 0x18]
push dword [esp + 0x18]
call fcn.0040b510
cmp byte [esp + 0x1f], 0
js 0x4026b8
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 0x40267d
test al, al
jns 0x402650
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 0x402668
mov byte [esp + 0x1f], 0
jmp 0x40268d
mov eax, dword [esp + 0x14]
mov word [eax], 0
mov dword [esp + 0x18], 0
mov al, byte [esp + 0x1f]
test al, al
jns 0x40268d
push dword [esp + 0x14]
call fcn.0040bd22
add esp, 4
cmp byte [esp + 0x4b], 0
jns 0x4026a0
push dword [esp + 0x40]
call fcn.0040bd22
add esp, 4
mov ecx, dword [esp + 0x268]
xor ecx, ebp
call fcn.0040c228
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 0x402630
test ebx, ebx
je 0x4021a8
mov dword [esp + 8], esi
jmp 0x402191
lea ecx, [esp + 0x50]
call fcn.0043f9e0
int3