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 0x4025f4
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x402705
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.0040e180
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
cmp byte [ebp - 0x22d], 0
jns 0x4025df
push dword [ebp - 0x238]
call fcn.0040e180
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040eab9
add esp, 0x240
pop esi
pop edi
pop ebx
pop ebp
ret
lea edi, [ebp - 0x218]
push 0x208
push 0xff
push edi
call fcn.00411c30
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.004336b0
movzx eax, byte [ebx + 0xb]
test al, al
js 0x402641
and eax, 0x7f
jmp 0x40264d
mov eax, dword [ebp - 0x224]
mov ebx, dword [ebp - 0x228]
test eax, eax
je 0x40266d
add eax, eax
test eax, eax
je 0x40266d
lea edx, [eax - 2]
cmp word [ebx + eax - 2], 0x5c
mov eax, edx
jne 0x402653
cmp edx, 0xfffffffe
jne 0x402ad1
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 0x4026ab
push dword [ebp - 0x244]
call fcn.0040e180
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov bl, 1
cmp byte [ebp - 0x21d], 0
jns 0x4026ca
push dword [ebp - 0x228]
call fcn.0040e180
add esp, 4
test bl, bl
jne 0x4025c8
jmp 0x402730
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 0x402789
mov ebx, eax
dec eax
lea edi, [ebp - 0x238]
mov ecx, edi
push 0
push eax
call fcn.0040dfb0
cmp byte [edi + 0xb], 0
jns 0x402724
mov edi, dword [ebp - 0x238]
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x4026d4
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 0x402789
cmp byte [esi + 0xf], 0
movzx eax, byte [ebp - 0x20d]
js 0x402aac
test al, al
jns 0x4026eb
mov ecx, edi
push dword [ebp - 0x214]
push dword [ebp - 0x218]
call fcn.0040b8e0
cmp byte [ebp - 0x20d], 0
js 0x40280f
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 0x4027f0
test al, al
jns 0x4027c5
mov ebx, dword [ebp - 0x218]
push ebx
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x20d], 0
jns 0x402802
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
mov al, byte [ebp - 0x20d]
test al, al
jns 0x402802
push dword [ebp - 0x218]
call fcn.0040e180
add esp, 4
movzx eax, byte [esi + 0xf]
test al, al
js 0x402849
and eax, 0x7f
jmp 0x40284c
mov eax, dword [ebp - 0x218]
mov word [eax], 0
mov dword [ebp - 0x214], 0
xor ecx, ecx
mov al, byte [ebp - 0x20d]
jmp 0x4027aa
cmp dword [ebp - 0x220], 0
je 0x402935
mov eax, dword [ebp - 0x224]
jmp 0x402907
mov eax, dword [esi + 8]
test eax, eax
je 0x4029af
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 0x402a0a
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 0x4028cb
mov ecx, eax
call dword [section..00cfg]
push 0x800
call ecx
test eax, eax
je 0x402a65
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov ebx, eax
test eax, eax
je 0x402a51
cmp byte [esi + 0xf], 0
jns 0x4028d4
mov edi, dword [esi + 4]
push edi
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esi], eax
test ebx, ebx
je 0x4028e8
push ebx
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x228], 0
cmp byte [ebp - 0x219], 0
js 0x402831
je 0x402943
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x219], 0
jns 0x402943
mov eax, dword [ebp - 0x224]
mov word [eax], 0
mov dword [ebp - 0x220], 0
cmp byte [ebp - 0x219], 0
jns 0x402943
push dword [ebp - 0x224]
call fcn.0040e180
add esp, 4
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x402954
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [ebp - 0x24c], 0
cmp byte [ebp - 0x23d], 0
js 0x4029f6
je 0x4029af
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp byte [ebp - 0x23d], 0
jns 0x4029af
mov eax, dword [ebp - 0x248]
mov word [eax], 0
mov dword [ebp - 0x244], 0
cmp byte [ebp - 0x23d], 0
jns 0x4029af
push dword [ebp - 0x248]
call fcn.0040e180
add esp, 4
cmp dword [esi], 0
jne 0x4025c8
movaps xmm0, xmmword [0x44f1b0]
lea esi, [ebp - 0x218]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov ecx, dword [ebp + 0x10]
mov edx, esi
call fcn.00402360
cmp byte [esi + 0x13], 0
jns 0x4025c8
push dword [ebp - 0x210]
call fcn.0040e180
add esp, 4
jmp 0x4025c8
cmp dword [ebp - 0x244], 0
je 0x4029a1
mov eax, dword [ebp - 0x248]
jmp 0x402973
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 0x402954
push dword [ebp - 0x210]
call fcn.0040e180
add esp, 4
jmp 0x402954
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [ebp - 0x218]
mov dword [edi], 0x93
jmp 0x402a77
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 0x4028e8
push dword [ebp - 0x210]
call fcn.0040e180
add esp, 4
jmp 0x4028e8
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.0040b810
jmp 0x402789
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.0040b6e0
cmp byte [ebp - 0x22d], 0
jns 0x402b07
push dword [ebp - 0x238]
call fcn.0040e180
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 0x4026b3