Function at 0x4018c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4577f8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x471920]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x50], 0
call fcn.0041bc09
mov byte [esp + 0x50], 1
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x401917
push 0x80004005
call fcn.00402660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x50], 2
mov ebp, dword [esp + 0x58]
mov ecx, 0x4622b0
mov eax, ebp
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40195d
test dx, dx
je 0x401959
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40195d
add eax, 4
add ecx, 4
test dx, dx
jne 0x401937
xor eax, eax
jmp 0x401962
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x4019a9
lea edi, [ebp - 0x10]
push edi
mov dword [esp + 0x24], edi
call fcn.00402ac0
add esp, 4
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esi, 0xfffffff0
cmp eax, 0xffffffff
jne 0x401a12
lea ecx, [esi + 0xc]
or edx, eax
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019a9
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [ebx - 0x10]
mov byte [esp + 0x50], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x50], 0
call fcn.0041bc2f
lea eax, [ebp - 0x10]
mov dword [esp + 0x50], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401a2b
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
push ebp
lea ecx, [esp + 0x1c]
push str._s.
push ecx
call fcn.00402e70
mov esi, dword [esp + 0x24]
add esp, 0xc
push 0
push esi
lea ecx, [esp + 0x38]
call fcn.0041bc97
test eax, eax
je 0x401bb8
mov bl, 3
jmp 0x401a60
lea ecx, [esp + 0x30]
call fcn.0041b91e
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], eax
call fcn.0041bbcc
test eax, eax
jne 0x401ba9
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40190d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x54], bl
call fcn.0041bf27
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 4
call fcn.00402930
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401ae7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x34]
call eax
test eax, eax
je 0x401c36
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40190d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x50], 5
mov edi, dword [esp + 0x14]
push edi
push ebp
lea ecx, [esp + 0x24]
push str._s_s
push ecx
call fcn.00402e70
mov esi, dword [esp + 0x2c]
add esp, 0xc
add esi, 0xfffffff0
mov dword [esp + 0x30], esp
mov ebp, esp
push esi
call fcn.00402ac0
add eax, 0x10
add esp, 4
mov dword [ebp], eax
call fcn.004018c0
add esp, 4
mov byte [esp + 0x50], bl
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x401b80
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ebp, dword [esp + 0x58]
lea eax, [edi - 0x10]
mov byte [esp + 0x50], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401ba5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x28], 0
jne 0x401a60
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x30]
call fcn.0041b84e
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
or edx, 0xffffffff
test eax, eax
lea eax, [esi - 0x10]
mov byte [esp + 0x50], 1
lea ecx, [eax + 0xc]
jne 0x401cab
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401bf1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x50], 0
call fcn.0041bc2f
mov dword [esp + 0x50], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401c20
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
xor al, al
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40190d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x50], 6
mov edi, dword [esp + 0x14]
push edi
push ebp
lea ecx, [esp + 0x24]
push str._s_s
push ecx
call fcn.00402e70
mov esi, dword [esp + 0x2c]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esi - 0x10]
mov byte [esp + 0x50], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401b84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401b84
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401cbe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x50], 0
call fcn.0041bc2f
mov dword [esp + 0x50], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019fc
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x4019fc