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

Disassembly:
sub esp, 0x618
push ebx
mov ebx, ecx
push esi
push edi
mov ecx, dword [ebx + 8]
mov dword [ebx + 0x14], 0
test ecx, ecx
je 0x401722
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x401722
call fcn.0041fe20
mov ecx, dword [eax]
mov edx, dword [ecx - 0xc]
test edx, edx
jl 0x401656
mov dword [esp + 0xc], ecx
add ecx, 0xfffffff4
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40167c
mov ecx, dword [0x4881a0]
mov dword [esp + 0xc], ecx
mov esi, dword [eax]
test esi, esi
jne 0x40166a
xor eax, eax
jmp 0x401671
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push eax
lea ecx, [esp + 0x14]
call fcn.00403710
lea edx, [esp + 0x21c]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x21c]
push edx
push 0x104
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x21c]
push ecx
push eax
push str.__tmpini_
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x14]
push eax
call edi
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x14]
push 0xea60
push ecx
mov ecx, dword [ebx + 0xc]
push edx
call fcn.0040b9e0
test eax, eax
jne 0x40172e
mov eax, dword [esp + 0xc]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401722
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401722
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x618
ret
lea eax, [esp + 0x14]
push 0x104
lea ecx, [esp + 0x220]
push eax
push ecx
call fcn.0044aebd
push 0x104
lea edx, [esp + 0x22c]
push str..dir
push edx
call fcn.0044aefa
add esp, 0x18
lea eax, [esp + 0x21c]
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebx
call fcn.004015e0
lea edx, [esp + 0x14]
mov esi, eax
push edx
call edi
test esi, esi
je 0x4016f3
mov eax, dword [0x4881a0]
mov ecx, dword [0x4917e0]
lea edx, [esp + 0x424]
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 8]
push 0x100
push edx
push 0xa1
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x4017bb
mov word [esp + 0x424], ax
mov ecx, 0x100
sub ecx, eax
cmp ecx, 1
jle 0x4017da
lea edx, [esp + 0x424]
lea ecx, [esp + 0x10]
push edx
call fcn.00402c90
jmp 0x401828
push 0x1ff
lea ecx, [esp + 0x14]
mov esi, 0x200
call fcn.004034f0
test eax, eax
je 0x40181d
push esi
push eax
push 0xa1
call fcn.00403a10
mov ecx, esi
sub ecx, eax
cmp ecx, 1
jg 0x40181d
add esi, 0x100
lea ecx, [esp + 0x10]
lea edx, [esi - 1]
push edx
call fcn.004034f0
test eax, eax
jne 0x4017f1
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.004035b0
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x21c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x14]
push eax
call fcn.0041ef70
test eax, eax
jne 0x4018a2
mov eax, dword [esp + 0x10]
mov edx, dword [0x4881a4]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401882
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x401882
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
mov eax, dword [esp + 0xc]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401722
add eax, 0xfffffff4
push eax
call esi
jmp 0x40170e
lea eax, [esp + 0x21c]
mov ecx, ebx
push eax
call fcn.00401f40
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [ebx + 0x14], 1
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4018e9
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4018e9
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
mov eax, dword [esp + 0xc]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401914
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x401914
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x618
ret