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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66c8b1
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x726100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
add eax, 4
mov dword [ebp - 0x10], 0
cmp dword [eax + 0x14], 8
jb 0x41217d
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x24]
call fcn.00403110
mov dword [ebp - 0x28], vtable.CISPath.0
mov eax, dword [ebp - 0x24]
or edi, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
jne 0x4121a7
xor bl, bl
jmp 0x412456
push 0x2c
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x28]
call fcn.00421410
mov byte [ebp - 4], 1
test eax, eax
je 0x4121c2
add eax, 4
jmp 0x4121c4
xor eax, eax
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00404750
add eax, 0x10
mov dword [ebp - 0x18], vtable.CISPath.0
add esp, 4
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x2c]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov dword [ebp - 0x30], vtable.CStringEx.0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412204
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x2c
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x28]
call fcn.00422300
mov byte [ebp - 4], 4
test eax, eax
je 0x41221f
add eax, 4
jmp 0x412221
xor eax, eax
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00404750
add eax, 0x10
mov dword [ebp - 0x20], vtable.CISPath.0
add esp, 4
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x34]
mov eax, edi
mov byte [ebp - 4], 6
add edx, 0xfffffff0
mov dword [ebp - 0x38], vtable.CStringEx.0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412261
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
cmp eax, 0xffffffff
je 0x412293
push dword [ebp - 0x14]
call esi
cmp eax, 0xffffffff
jne 0x412293
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00409750
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
call fcn.00409750
mov eax, dword [ebp - 0x14]
mov edx, 0x6910b0
test eax, eax
mov ecx, edx
cmovne ecx, eax
test ecx, ecx
cmovne edx, ecx
cmp word [edx], 0
jne 0x4122b1
xor ecx, ecx
jmp 0x4122c5
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4122b6
sub ecx, esi
sar ecx, 1
push ecx
mov ecx, dword [ebp + 0xc]
push edx
lea ecx, [ecx + 4]
call fcn.00406a70
sub esp, 8
mov esi, esp
mov dword [ebp + 8], esi
push dword [0x725070]
lea ecx, [esi + 4]
call fcn.00403110
lea ecx, [ebp - 0x18]
mov dword [esi], vtable.CStringEx.0
call fcn.0040fc80
mov cl, al
mov eax, dword [ebp + 0x14]
mov byte [eax], cl
test cl, cl
jne 0x41240a
sub esp, 8
mov esi, esp
mov dword [ebp + 8], esi
push dword [0x72506c]
lea ecx, [esi + 4]
call fcn.00403110
lea ecx, [ebp - 0x18]
mov dword [esi], vtable.CStringEx.0
call fcn.0040fc80
test al, al
jne 0x412384
sub esp, 8
mov esi, esp
mov dword [ebp + 8], esi
push dword [0x725068]
lea ecx, [esi + 4]
call fcn.00403110
lea ecx, [ebp - 0x18]
mov dword [esi], vtable.CStringEx.0
call fcn.0040fc80
test al, al
jne 0x412384
sub esp, 8
mov esi, esp
mov dword [ebp + 8], esi
push dword [0x725074]
lea ecx, [esi + 4]
call fcn.00403110
lea ecx, [ebp - 0x18]
mov dword [esi], vtable.CStringEx.0
call fcn.0040fc80
test al, al
jne 0x412384
xor bl, bl
jmp 0x41240c
push 0x2d
lea ecx, [ebp - 0x20]
call fcn.004212a0
test al, al
mov eax, dword [ebp + 0x18]
sete cl
mov byte [eax], cl
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
jne 0x4123ac
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffff
jmp 0x41240a
test cl, cl
je 0x4123c3
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x48]
call fcn.004118d0
mov ebx, 1
jmp 0x4123d6
push 0x2d
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x20]
call fcn.00422300
mov ebx, 2
push dword [eax + 4]
call fcn.00636815
mov ecx, dword [ebp + 0x10]
add esp, 4
mov dword [ecx], eax
test bl, 2
je 0x4123f6
lea ecx, [ebp - 0x40]
and ebx, 0xfffffffd
call fcn.00409450
mov dword [ebp - 4], 6
test bl, 1
je 0x41240a
lea ecx, [ebp - 0x48]
call fcn.00409450
mov bl, 1
mov edx, dword [ebp - 0x1c]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov dword [ebp - 0x20], vtable.CStringEx.0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412431
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
mov dword [ebp - 0x18], vtable.CStringEx.0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412456
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
mov dword [ebp - 0x28], vtable.CStringEx.0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x41247c
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret