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

Disassembly:
push 0xffffffffffffffff
push 0x457ad8
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], 1
call fcn.0041bc09
mov byte [esp + 0x50], 2
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a5b7
push 0x80004005
call fcn.00402660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x50], 3
mov ebp, dword [esp + 0x58]
mov ecx, 0x4622b0
mov eax, ebp
mov ebx, 4
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40a604
test dx, dx
je 0x40a600
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40a604
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x40a5e0
xor eax, eax
jmp 0x40a609
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x40a651
lea eax, [ebp - 0x10]
push eax
mov dword [esp + 0x2c], eax
call fcn.00402ac0
add esp, 4
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or edx, 0xffffffff
cmp eax, 0xffffffff
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
jne 0x40a6df
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a651
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x40a672
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], 1
call fcn.0041bc2f
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x50], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a6a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x50], 0xffffffff
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a6c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 8
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a6f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebp
lea ecx, [esp + 0x18]
push str._s.
push ecx
call fcn.00402e70
mov edx, dword [esp + 0x20]
add esp, 0xc
push 0
push edx
lea ecx, [esp + 0x38]
call fcn.0041bc97
test eax, eax
je 0x40a8ba
lea ecx, [ecx]
lea ecx, [esp + 0x30]
call fcn.0041b91e
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], eax
call fcn.0041bbcc
test eax, eax
jne 0x40a8af
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40a5ad
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x54], bl
call fcn.0041bf27
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 5
call fcn.00402930
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a7a7
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
mov ebp, dword [esp + 0x18]
je 0x40a88e
mov ecx, dword [esp + 0x5c]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x40a5ad
mov eax, ebp
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40a7fb
test dx, dx
je 0x40a7f7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40a7fb
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x40a7d7
xor eax, eax
jmp 0x40a800
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setl al
test al, al
je 0x40a88e
call fcn.0041c08e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40a5ad
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 ecx, dword [esp + 0x58]
push ebp
push ecx
lea edx, [esp + 0x24]
push str._s_s
push edx
call fcn.00402e70
mov esi, dword [esp + 0x2c]
add esp, 0xc
add esi, 0xfffffff0
mov dword [esp + 0x30], esp
mov edi, esp
push esi
call fcn.00402ac0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004018c0
add esp, 4
mov byte [esp + 0x50], bl
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a88e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x50], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a8af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x24], 0
jne 0x40a720
lea ecx, [esp + 0x30]
call fcn.0041b84e
mov byte [esp + 0x50], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a8e8
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], 1
call fcn.0041bc2f
mov eax, dword [esp + 0x28]
jmp 0x40a683