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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x223]
mov byte [ebp - 0x224], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
push dword [0x41617c]
lea edi, [ebp - 0x11f]
mov byte [ebp - 0x120], bl
rep stosd dword es:[edi], eax
push ebx
push 0x4151e0
push dword [0x4161f4]
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push dword [0x41617c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [0x41617c]
call fcn.00401521
mov dword [esp], 0x4151dc
push dword [0x41617c]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [0x416108]
push dword [0x41617c]
push dword [ebp + 8]
call fcn.004047e1
add esp, 0xc
test eax, eax
jne 0x40413f
push 0xfffffffffffffff6
jmp 0x40432f
lea eax, [ebp - 0x224]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x100
lea eax, [ebp - 0x224]
push ebx
push eax
call fcn.004018df
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x404176
push 5
jmp 0x40432f
push 0x40000
call fcn.0040765a
push ebx
mov dword [ebp - 4], eax
push dword [0x416104]
push dword [ebp - 8]
call fcn.00401981
add esp, 0x10
cmp dword [ebp + 8], ebx
je 0x4041ba
mov eax, dword [0x416108]
shr eax, 0x12
shl eax, 0x10
push eax
push ebx
push 0x401
push 0x3f0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
xor esi, esi
cmp dword [0x41610c], ebx
jle 0x4042c6
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x1c], eax
push dword [0x41617c]
lea eax, [ebp - 0x120]
push 0x4150b8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x180
lea eax, [ebp - 0x120]
push 0x101
push eax
call fcn.004018df
add esp, 0x1c
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x4042e4
mov eax, dword [0x416110]
mov edi, esi
shl edi, 2
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ebx
mov esi, dword [edi + eax]
cmp esi, ebx
je 0x404281
cmp dword [0x4160ec], ebx
jne 0x404281
mov eax, 0x40000
cmp esi, eax
mov dword [ebp - 0xc], eax
ja 0x40423a
mov dword [ebp - 0xc], esi
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00401996
mov edi, eax
push edi
push dword [ebp - 4]
push dword [ebp - 0x18]
call fcn.004019b8
push ebx
call fcn.00403c3c
add esp, 0x1c
sub esi, dword [ebp - 0xc]
add dword [ebp - 0x10], edi
push ebx
push ebx
push 0x405
push 0x3f0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov edi, dword [ebp - 0x14]
cmp esi, ebx
jne 0x404223
push dword [ebp - 0x18]
call fcn.004019da
cmp dword [0x4160ec], ebx
pop ecx
jne 0x40429f
mov eax, dword [0x416110]
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [edi + eax]
jne 0x40430c
lea eax, [ebp - 0x120]
push eax
call fcn.004055b2
pop ecx
mov ecx, dword [0x416114]
cmp eax, dword [edi + ecx]
jne 0x40430c
mov esi, dword [ebp - 0x1c]
cmp esi, dword [0x41610c]
jl 0x4041c8
push dword [ebp - 8]
call fcn.004019da
cmp dword [ebp - 4], ebx
pop ecx
je 0x4042dd
push dword [ebp - 4]
call fcn.0040762b
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call fcn.004019da
cmp dword [ebp - 4], ebx
pop ecx
je 0x404308
push dword [ebp - 4]
call fcn.0040762b
pop ecx
push 6
jmp 0x40432f
cmp dword [ebp - 4], ebx
mov dword [0x4160f4], 1
je 0x404324
push dword [ebp - 4]
call fcn.0040762b
pop ecx
push dword [ebp - 8]
call fcn.004019da
pop ecx
push 2
pop eax
jmp 0x4042df