Function at 0x405140
Capabilities:
Check if file exists
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x45c93b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x844
mov eax, dword [0x479a50]
push ebx
push ebp
lea ecx, [esp + 8]
mov dword [esp + 0x848], eax
call fcn.004309df
mov ebx, dword [esp + 0x85c]
push ebx
mov dword [esp + 0x858], 0
mov ebp, 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4051b0
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4051a0
sub eax, edx
cmp eax, 0x208
jbe 0x4051cb
lea ecx, [esp + 8]
mov dword [esp + 0x854], 0xffffffff
call fcn.00430a03
xor eax, eax
jmp 0x40549f
lea edx, [esp + 0x28]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4051d3
push edi
mov edi, dword [esp + 0x864]
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4051f0
sub eax, edx
cmp eax, 0x208
jbe 0x40521b
lea ecx, [esp + 0xc]
mov dword [esp + 0x858], 0xffffffff
call fcn.00430a03
xor eax, eax
jmp 0x40549e
lea edx, [esp + 0x43c]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405226
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrTrimA]
push 0x460c40
lea eax, [esp + 0x34]
push eax
call esi
push 0x460c40
lea ecx, [esp + 0x444]
push ecx
call esi
lea eax, [esp + 0x30]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405260
sub eax, edx
dec eax
je 0x40527c
mov cl, byte [esp + eax + 0x30]
cmp cl, 0x5c
lea eax, [esp + eax + 0x30]
jne 0x40527c
mov byte [eax], 0
lea eax, [esp + 0x440]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405286
sub eax, edx
dec eax
je 0x4052a8
mov cl, byte [esp + eax + 0x440]
cmp cl, 0x5c
lea eax, [esp + eax + 0x440]
jne 0x4052a8
mov byte [eax], 0
lea edx, [esp + 0x440]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.004404f7
add esp, 8
test eax, eax
jne 0x4052df
lea ecx, [esp + 0x10]
mov dword [esp + 0x85c], 0xffffffff
call fcn.00430a03
mov eax, 1
jmp 0x40549d
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x405305
lea ecx, [esp + 0x10]
mov dword [esp + 0x85c], 0xffffffff
call fcn.00430a03
xor eax, eax
jmp 0x40549d
push edi
call fcn.00407720
add esp, 4
test eax, eax
jne 0x40531d
push edi
call fcn.00404ab0
add esp, 4
mov ebp, eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x23c]
push str._s.
push edx
call fcn.00438911
add esp, 0xc
push 0
lea eax, [esp + 0x23c]
push eax
lea ecx, [esp + 0x18]
call fcn.00430a57
test eax, eax
je 0x40547e
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, edi
test ebp, ebp
je 0x40547e
lea ecx, [esp + 0x10]
call fcn.00430861
lea ecx, [esp + 0x10]
mov ebx, eax
call fcn.004309a6
test eax, eax
jne 0x405476
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00430c7f
mov edx, dword [eax]
push edx
lea eax, [esp + 0x444]
push eax
lea ecx, [esp + 0x650]
push str._s_s
push ecx
call fcn.00438911
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4053d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x14]
call fcn.00430c7f
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x240]
push str._s_s
push eax
call fcn.00438911
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405419
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
push 0x10
lea ecx, [esp + 0x14]
call dword [eax + 0x38]
test eax, eax
je 0x405451
lea ecx, [esp + 0x648]
push ecx
call fcn.00404ab0
lea edx, [esp + 0x64c]
push edx
lea eax, [esp + 0x240]
push eax
call fcn.00405140
add esp, 0xc
jmp 0x405474
push 0x80
lea ecx, [esp + 0x23c]
push ecx
call esi
push 0
lea edx, [esp + 0x64c]
push edx
lea eax, [esp + 0x240]
push eax
call edi
mov ebp, eax
test ebx, ebx
jne 0x405360
lea ecx, [esp + 0x10]
call fcn.00430791
lea ecx, [esp + 0x10]
mov dword [esp + 0x85c], 0xffffffff
call fcn.00430a03
mov eax, ebp
pop esi
pop edi
mov ecx, dword [esp + 0x84c]
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x844]
pop ebx
call fcn.00438707
add esp, 0x850
ret