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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
mov ebx, ecx
mov dword [ebp - 8], edx
push esi
push edi
mov al, byte [ebx]
cmp al, 0x5c
jne 0x40422a
lea ecx, [ebp - 0x1c]
mov esi, ebx
sub ecx, ebx
nop dword [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4041f0
push ebx
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x404250
lea edx, [ebp - 0x1b]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x404212
sub edx, esi
lea edi, [ebx - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404220
jmp 0x40429c
cmp al, 0x2e
jne 0x4042aa
lea edx, [ebp - 0x1c]
sub edx, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x404233
push ebx
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40425c
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebx - 1]
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404260
mov eax, dword [str.kstemp]
lea edx, [ebp - 0x1c]
mov dword [ecx], eax
mov esi, edx
mov ax, word [0x4059d4]
mov word [ecx + 4], ax
mov al, byte [0x4059d6]
mov byte [ecx + 6], al
mov al, byte [edx]
inc edx
test al, al
jne 0x404288
sub edx, esi
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404294
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 8]
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4042da
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x34]
mov ecx, edi
call fcn.00404410
mov ecx, eax
test ecx, ecx
jns 0x4042ff
push edi
mov esi, 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
cmp ecx, eax
jle 0x4043f3
test eax, eax
jne 0x404316
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
jmp 0x40431c
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov dword [ebp + 8], eax
test eax, eax
je 0x4043f3
test ecx, ecx
je 0x4043f3
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push ebx
call esi
mov esi, eax
mov dword [ebp - 0xc], esi
push 0
cmp esi, 0xffffffff
jne 0x404395
push 0x80
push 3
push 0
push 3
push 0x80000000
push ebx
mov esi, 6
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4043f8
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
push edi
mov esi, 8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 8]
mov edx, edi
mov ecx, esi
call fcn.00404580
add esp, 4
test eax, eax
je 0x4043da
push dword [ebp - 0xc]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 7
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret