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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4924e8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
mov eax, dword [0x4c51d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
push 0x4a56b0
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00401c30
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
lea ecx, [ebp - 0x14]
mov edx, edi
mov byte [ebp - 4], 1
call fcn.0046c930
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41663c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4166ff
mov esi, dword [ebp - 0x14]
test esi, esi
setne al
test eax, eax
jne 0x416660
push 0x80004005
call fcn.00401ae0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push esi
push eax
call fcn.0046f09c
add esp, 8
test eax, eax
jne 0x4166ea
push 0x4a56b0
lea ecx, [ebp - 0x18]
call fcn.00401c30
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push ecx
push ebx
push edx
lea edx, [edi + 4]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.0046c930
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4166bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x14]
xor eax, eax
test esi, esi
setne al
test eax, eax
jne 0x4166d3
push 0x80004005
call fcn.00401ae0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push esi
push eax
call fcn.0046f09c
add esp, 8
test eax, eax
je 0x416804
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edx
push ebx
push eax
mov ebx, edi
call fcn.00416840
jmp 0x416804
lea esi, [ebp - 0x18]
mov eax, edi
call fcn.0046c900
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x416722
test al, 0x10
jne 0x416722
mov eax, 1
jmp 0x416724
xor eax, eax
test eax, eax
mov eax, dword [ebp - 0x18]
sete byte [ebp - 0xd]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416749
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0xd], 0
je 0x4167f1
lea eax, [edi + 4]
lea esi, [ebp - 0x18]
call fcn.0046c900
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x416777
test al, 0x10
jne 0x416777
mov eax, 1
jmp 0x416779
xor eax, eax
test eax, eax
mov eax, dword [ebp - 0x18]
sete byte [ebp - 0xd]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41679e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0xd], 0
je 0x4167f1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push ebx
push edx
mov ecx, edi
call fcn.00416990
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4167dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push ebx
push edx
mov ebx, edi
call fcn.00416840
mov esi, dword [ebp - 0x14]
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416827
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8