Function at 0x4040b7
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 str.pftw
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.004047f7
add esp, 0xc
test eax, eax
jne 0x404155
push 0xfffffffffffffff6
jmp 0x404345
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 0x40418c
push 5
jmp 0x404345
push 0x40000
call fcn.0040767a
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 0x4041d0
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 0x4042dc
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x1c], eax
push dword [0x41617c]
lea eax, [ebp - 0x120]
push str._spftw_d.pkg
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 0x4042fa
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 0x404297
cmp dword [0x4160ec], ebx
jne 0x404297
mov eax, 0x40000
cmp esi, eax
mov dword [ebp - 0xc], eax
ja 0x404250
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.00403c52
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 0x404239
push dword [ebp - 0x18]
call fcn.004019da
cmp dword [0x4160ec], ebx
pop ecx
jne 0x4042b5
mov eax, dword [0x416110]
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [edi + eax]
jne 0x404322
lea eax, [ebp - 0x120]
push eax
call fcn.004055c8
pop ecx
mov ecx, dword [0x416114]
cmp eax, dword [edi + ecx]
jne 0x404322
mov esi, dword [ebp - 0x1c]
cmp esi, dword [0x41610c]
jl 0x4041de
push dword [ebp - 8]
call fcn.004019da
cmp dword [ebp - 4], ebx
pop ecx
je 0x4042f3
push dword [ebp - 4]
call fcn.0040764b
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 0x40431e
push dword [ebp - 4]
call fcn.0040764b
pop ecx
push 6
jmp 0x404345
cmp dword [ebp - 4], ebx
mov dword [0x4160f4], 1
je 0x40433a
push dword [ebp - 4]
call fcn.0040764b
pop ecx
push dword [ebp - 8]
call fcn.004019da
pop ecx
push 2
pop eax
jmp 0x4042f5