Function at 0x477ac0
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x519132
mov eax, dword fs:[0]
push eax
sub esp, 0xbbc
mov eax, dword [0x56c3c0]
xor eax, esp
mov dword [esp + 0xbb8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56c3c0]
xor eax, esp
push eax
lea eax, [esp + 0xbd0]
mov dword fs:[0], eax
mov edx, dword [esp + 0xbfc]
mov eax, dword [esp + 0xbe4]
mov ecx, dword [esp + 0xbf8]
mov esi, dword [esp + 0xbe0]
push 0x3fe
mov dword [esp + 0x30], edx
xor ebp, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc04]
mov dword [esp + 0x2c], ecx
lea edx, [esp + 0x7d2]
xor ecx, ecx
push ebp
push edx
mov dword [esp + 0x3c], eax
mov word [esp + 0x7d8], cx
call fcn.004d5720
mov eax, dword [esp + 0xbf8]
mov ecx, dword [esp + 0xbf4]
add esp, 0xc
push ebp
push ebp
push eax
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x30], ebp
call fcn.00475ad0
push 0xa
lea ecx, [esp + 0x38]
mov dword [esp + 0xbdc], ebp
call fcn.004767c0
push 0x1fe
lea eax, [esp + 0x5d2]
xor edx, edx
push ebp
push eax
mov byte [esp + 0xbe4], 1
mov word [esp + 0x5d8], dx
call fcn.004d5720
add esp, 0xc
cmp esi, ebp
jne 0x477bd9
lea ecx, [esp + 0x34]
mov byte [esp + 0xbd8], 0
call fcn.00476c20
lea ecx, [esp + 0x50]
mov dword [esp + 0xbd8], 0xffffffff
call fcn.00475ec0
xor eax, eax
jmp 0x478003
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x477cca
test al, 0x10
je 0x477cca
push 0x3fe
lea edx, [esp + 0x1d2]
xor ecx, ecx
push ebp
push edx
mov dword [esp + 0x2c], 1
mov word [esp + 0x1d8], cx
call fcn.004d5720
add esp, 0xc
push esi
lea eax, [esp + 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x1cc]
push ecx
call edi
cmp word [esp + eax*2 + 0x1ca], 0x5c
jne 0x477c57
lea edx, [esp + 0x1cc]
push edx
call edi
xor ecx, ecx
mov word [esp + eax*2 + 0x1ca], cx
lea edx, [esp + 0x1cc]
push 0x5c
push edx
call fcn.004d659c
add esp, 8
test eax, eax
je 0x477c84
lea eax, [esp + 0x1cc]
push 0x5c
push eax
call fcn.004d659c
add esp, 8
xor ecx, ecx
mov word [eax], cx
push 1
push ecx
lea edx, [esp + 0x1d4]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.0044d470
lea eax, [esp + 0x3c]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push esi
mov byte [esp + 0xbec], 2
call fcn.0044d470
lea ecx, [esp + 0x60]
mov byte [esp + 0xbe8], 1
call fcn.00476e60
jmp 0x477d61
push esi
lea ecx, [esp + 0x1c]
call fcn.0044d470
mov bl, 3
push esi
lea ecx, [esp + 0x18]
mov byte [esp + 0xbdc], bl
call fcn.0044d470
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x34], esp
push ebp
push ebp
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0xbf8], 4
call fcn.00476ba0
lea ecx, [esp + 0x44]
call fcn.00476c80
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0xbd8], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477d39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xbd8], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477d61
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x7cc]
push ecx
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x7cc]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x477d80
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x7ca], 0x5c
je 0x477dad
push 0x53ef10
lea edx, [esp + 0x7d0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x54]
call fcn.00476160
test eax, eax
je 0x477bad
mov eax, dword [esp + 0x38]
xor esi, esi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], 1
mov ebp, eax
cmp eax, esi
je 0x477fc7
push 0x3fe
mov eax, ebp
mov ebp, dword [ebp]
lea edx, [esp + 0x1d2]
xor ecx, ecx
push esi
push edx
lea edi, [eax + 8]
mov dword [esp + 0x24], esi
mov word [esp + 0x1d8], cx
call fcn.004d5720
mov eax, dword [edi]
push 0x100
lea ecx, [esp + 0x5dc]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push eax
call fcn.004d8112
lea edx, [esp + 0x5fc]
push 0x100
push edx
call fcn.004d8d4f
add esp, 0x38
push 0x526768
lea eax, [esp + 0x5d0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x477e57
mov dword [esp + 0x18], 1
cmp dword [esp + 0x20], esi
jne 0x477f7a
cmp dword [esp + 0x18], esi
je 0x477f7a
mov ecx, dword [esp + 0x30]
cmp ecx, esi
je 0x477f7a
mov ebx, dword [esp + 0x2c]
cmp ebx, esi
je 0x477f7a
mov eax, dword [edi]
push ebx
lea edx, [esp + 0x1d0]
push edx
push eax
call ecx
add esp, 0xc
test eax, eax
je 0x477fbf
mov eax, dword [edi + 4]
mov eax, dword [eax - 0xc]
lea esi, [edi + 4]
add eax, 0xfffffffc
push eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0044cb70
push eax
mov ecx, esi
mov byte [esp + 0xbdc], 5
call fcn.0044cdc0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0xbd8], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477eed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi]
push 0x100
lea ecx, [esp + 0x5d0]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
call fcn.004d8112
add esp, 0x24
push ebx
lea edx, [esp + 0x5d0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x477f38
push 0x522388
mov ecx, esi
call fcn.00459cf0
push ebx
mov ecx, esi
call fcn.0044d430
mov eax, dword [esp + 0x28]
mov esi, dword [esi]
push 0
push 0
push 0x80
push eax
push 0
push 0
push 0
push 0
push esi
call fcn.004d8112
mov ecx, dword [esp + 0x4c]
push ebx
push 0x80
push ecx
call fcn.004db31f
add esp, 0x30
lea edx, [esp + 0x1cc]
push edx
mov ecx, edi
call fcn.0044d300
xor esi, esi
mov edx, dword [esp + 0x20]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push edx
xor edx, edx
cmp byte [edi + 8], dl
setne dl
dec edx
push edx
push eax
push ecx
lea ecx, [esp + 0x60]
call fcn.00475bc0
test eax, eax
jne 0x477fa1
mov dword [esp + 0x1c], esi
cmp dword [esp + 0x18], esi
je 0x477fb5
lea eax, [esp + 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x1c], esi
je 0x477fc7
inc dword [esp + 0x14]
cmp ebp, esi
jne 0x477ddf
lea ecx, [esp + 0x50]
call fcn.00475b20
cmp dword [esp + 0x14], esi
jne 0x477fda
mov dword [esp + 0x1c], esi
lea ecx, [esp + 0x34]
mov byte [esp + 0xbd8], 0
call fcn.00476c20
lea ecx, [esp + 0x50]
mov dword [esp + 0xbd8], 0xffffffff
call fcn.00475ec0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xbd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xbb8]
xor ecx, esp
call fcn.004d6555
add esp, 0xbc8
ret