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

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xffffffffffffffff
push 0x509af1
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x570074]
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
lea eax, [ebp]
mov dword [ebp - 0x18], esi
push eax
push 0x104
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x47464f
call fcn.0040cc51
mov ecx, eax
test ecx, ecx
jne 0x474600
push 0x80004005
call fcn.0040d173
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x474615
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x474617
call edx
lea ecx, [eax + 0x10]
mov dword [esi], ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.004d0217
lea esp, [ebp + 0x414]
pop ebp
ret
lea eax, [ebp + 0x208]
push eax
push 0
push 0x5342f8
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4746a1
call fcn.0040cc51
mov ecx, eax
test ecx, ecx
jne 0x474680
push 0x80004005
call fcn.0040d173
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x474695
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x474697
call edx
add eax, 0x10
mov dword [esi], eax
jmp 0x47461c
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.0040cc51
mov ecx, eax
test ecx, ecx
jne 0x4746c3
push 0x80004005
call fcn.0040d173
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x4746d8
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4746da
call edx
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 3
lea eax, [ebp + 0x208]
test eax, 0xffff0000
jne 0x474703
movzx eax, ax
mov ecx, esi
push eax
call fcn.0040ceac
jmp 0x47461c
push eax
call fcn.004d5c34
mov edi, eax
add esp, 4
mov eax, dword [esi]
test edi, edi
jne 0x4747ad
cmp dword [eax - 0xc], 0
lea ecx, [eax - 0x10]
mov edi, dword [ecx]
je 0x47461c
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
jge 0x474753
cmp dword [eax - 8], 0
jge 0x474740
push 0x80070057
call fcn.0040d173
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [esi]
mov word [eax], cx
jmp 0x47461c
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x474782
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, 0x528840
jne 0x47477e
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x474782
mov ecx, edx
call ebx
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x47479f
lock inc dword [edi + 0x14]
lea eax, [edi + 8]
add eax, 0x10
mov dword [esi], eax
jmp 0x47461c
mov ecx, edi
call edx
add eax, 0x10
mov dword [esi], eax
jmp 0x47461c
mov ecx, dword [eax - 0xc]
lea ebx, [ebp + 0x208]
sub ebx, eax
mov dword [ebp - 0x14], ecx
sar ebx, 1
test edi, edi
jns 0x4747cb
push 0x80070057
call fcn.0040d173
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x4747e4
push edi
mov ecx, esi
call fcn.0040d01b
mov ecx, dword [esi]
cmp ebx, dword [ebp - 0x14]
ja 0x474837
mov eax, dword [ecx - 8]
lea edx, [ecx + ebx*2]
lea ebx, [edi + edi]
test ebx, ebx
je 0x47484f
test ecx, ecx
jne 0x47480e
call fcn.004d5d64
mov dword [eax], 0x16
call fcn.004d5bd4
jmp 0x47484f
test edx, edx
je 0x4747fc
add eax, eax
cmp eax, ebx
jae 0x47482a
call fcn.004d5d64
mov dword [eax], 0x22
call fcn.004d5bd4
jmp 0x47484f
push ebx
push edx
push ecx
call fcn.004d1e90
add esp, 0xc
jmp 0x47484f
mov edx, dword [ecx - 8]
lea ebx, [edi + edi]
lea eax, [ebp + 0x208]
add edx, edx
push ebx
push eax
call fcn.0040d0ee
add esp, 8
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x474736
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [esi]
mov word [ebx + eax], cx
jmp 0x47461c