Function at 0x401560
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
sub esp, 0x7b0
mov al, byte [0x40bd88]
push esi
push edi
mov byte [esp + 0x6b8], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x6b9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x6b8]
push ecx
push 0xff
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea edx, [esp + 0x14]
push 0x10
push edx
call fcn.00403f70
add esp, 8
lea eax, [esp + 0xb4]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x6b8]
push eax
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
mov esi, eax
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
test esi, esi
jne 0x4015e5
pop edi
xor eax, eax
pop esi
add esp, 0x7b0
ret
lea ecx, [esp + 0xb4]
push 0x2e
push ecx
call fcn.00401530
add esp, 8
test eax, eax
je 0x4015ff
mov byte [eax + 1], 0
lea edx, [esp + 0x24]
push 0x10
push edx
call fcn.00403fa0
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
add esp, 8
lea eax, [esp + 0x24]
lea ecx, [esp + 0xb4]
push eax
push ecx
call esi
lea edx, [esp + 0x1b8]
push 0xff
push edx
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push 4
lea eax, [esp + 0x1bc]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExA]
lea ecx, [esp + 0x1b8]
lea edx, [esp + 0x1b8]
push ecx
push edx
call dword [sym.imp.USER32.dll_CharToOemA]
mov ax, word [0x409070]
mov cx, word [0x40906c]
mov dl, byte [0x40906e]
mov word [esp + 0xa], ax
mov word [esp + 0xc], cx
xor eax, eax
lea ecx, [esp + 0x34]
mov dword [esp + 0xf], eax
push 0x80
push ecx
mov byte [esp + 0x16], dl
mov byte [esp + 0x1b], al
call fcn.00404810
add esp, 8
lea edx, [esp + 0x34]
lea eax, [esp + 0x2b8]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0x34]
push 0x80
push eax
call fcn.00404840
add esp, 8
lea ecx, [esp + 0x34]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0xa]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0x1b8]
lea eax, [esp + 0x2b8]
push edx
push eax
call esi
lea ecx, [esp + 0xa]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0xc]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
push 0x80
lea edx, [esp + 0x38]
push edx
call fcn.00404870
add esp, 8
lea eax, [esp + 0x34]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0xa]
lea eax, [esp + 0x2b8]
push edx
push eax
call esi
lea ecx, [esp + 0x1b8]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0xa]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0x34]
push 0x80
push edx
call fcn.004048a0
add esp, 8
lea eax, [esp + 0x34]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0xc]
lea eax, [esp + 0x2b8]
push edx
push eax
call esi
lea ecx, [esp + 0x34]
push 0x80
push ecx
call fcn.00404840
add esp, 8
lea edx, [esp + 0x34]
lea eax, [esp + 0x2b8]
push edx
push eax
call esi
lea ecx, [esp + 0xa]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0xb4]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0xa]
lea eax, [esp + 0x2b8]
push edx
push eax
call esi
lea ecx, [esp + 0xc]
lea edx, [esp + 0x2b8]
push ecx
push edx
call esi
lea eax, [esp + 0xc]
lea ecx, [esp + 0x2b8]
push eax
push ecx
call esi
lea edx, [esp + 0x2b8]
push edx
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
lea eax, [esp + 0x2bc]
push eax
lea ecx, [esp + 0xbc]
push ecx
call fcn.00404ba0
add esp, 0xc
test eax, eax
jne 0x401843
pop edi
pop esi
add esp, 0x7b0
ret
mov ecx, dword [0x40c948]
xor eax, eax
test ecx, ecx
je 0x40185a
lea edx, [esp + 0xb4]
push eax
push edx
call ecx
mov ecx, 0x1f
pop edi
cmp ecx, eax
pop esi
sbb eax, eax
neg eax
add esp, 0x7b0
ret