Function at 0x4f6a30
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a2f3
mov eax, dword fs:[0]
push eax
sub esp, 0x65c
mov eax, dword [0x59a0a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
or esi, 0xffffffff
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x648], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x634], eax
mov dword [ebp - 0x64c], ecx
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x4f6b06
push 0x20a
lea eax, [ebp - 0x62c]
push 0
push eax
call fcn.0049e130
add esp, 0xc
lea eax, [ebp - 0x62c]
push 0x104
push eax
push 0x90
push dword [edi + 0x3f0]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x63c]
call fcn.00401ff0
mov ecx, dword [ebp - 0x63c]
mov eax, esi
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4f6b06
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f6b02
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4f6b06
mov ecx, edx
call edi
mov dword [ebp - 0x65c], 0
mov dword [ebp - 0x658], 0
mov dword [ebp - 0x654], 0
lea eax, [ebp - 0x63c]
mov dword [ebp - 4], 0
push eax
push 0x2001f
push 0
push 0x56eb98
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x63c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4f6ec2
mov eax, dword [ebp - 0x63c]
push 0x208
mov dword [ebp - 0x65c], eax
lea eax, [ebp - 0x420]
push 0
push eax
mov dword [ebp - 0x658], 0
call fcn.0049e130
add esp, 0xc
mov dword [ebp - 0x630], 0x104
lea eax, [ebp - 0x630]
lea ecx, [ebp - 0x65c]
push eax
lea eax, [ebp - 0x420]
push eax
push 0x56eb64
call fcn.00406fe0
test eax, eax
jne 0x4f6eb1
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4f6bd3
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov edi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f6be8
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4f6bec
mov ecx, edx
call edi
add eax, 0x10
mov dword [ebp - 0x640], eax
push 0x56ebdc
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x640]
push 0x56e9dc
push eax
call fcn.004023f0
add esp, 0x10
mov dword [ebp - 0x668], 0
mov dword [ebp - 0x664], 0
mov dword [ebp - 0x660], 0
push 0x2001f
push 0x56ed28
push reloc.WS2_32.dll_bind
lea ecx, [ebp - 0x668]
call fcn.00404f00
mov edi, dword [ebp - 0x640]
test eax, eax
jne 0x4f6e6e
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0049e130
add esp, 0xc
mov dword [ebp - 0x630], 0x104
lea eax, [ebp - 0x630]
lea ecx, [ebp - 0x668]
push eax
lea eax, [ebp - 0x218]
push eax
push 0x56ec8c
call fcn.00406fe0
test eax, eax
jne 0x4f6e6e
lea ecx, [ebp - 0x644]
call fcn.00402e50
push 0x56eb7c
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x644]
push 0x56ea3c
push eax
call fcn.004023f0
add esp, 0x10
lea ecx, [ebp - 0x630]
call fcn.00402e50
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x634]
mov eax, dword [ecx]
cmp dword [eax - 0xc], 0
jne 0x4f6d09
push dword [ebx]
lea eax, [ebp - 0x630]
push 0x56ea9c
push eax
call fcn.004023f0
add esp, 0xc
jmp 0x4f6d20
push eax
push dword [ebx]
lea eax, [ebp - 0x630]
push 0x56ed88
push eax
call fcn.004023f0
add esp, 0x10
lea ecx, [ebp - 0x638]
call fcn.00402e50
lea ecx, [ebp - 0x634]
call fcn.00402e50
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 6
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f6d43
sub ecx, edx
sar ecx, 1
je 0x4f6d71
push dword [ebx]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x638]
push 0x56eca4
push eax
call fcn.004023f0
add esp, 0x10
mov esi, dword [ebp - 0x638]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4f6daa
cmp dword [edi - 0xc], eax
je 0x4f6daa
push dword [ebx]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x638]
push 0x56ec04
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x638]
add esp, 0x10
lea ecx, [ebp - 0x634]
mov byte [ebp - 4], 5
call fcn.00402ed0
lea ecx, [esi - 0x10]
call fcn.004021e0
add eax, 0x10
mov dword [ebp - 0x650], eax
lea ecx, [ebp - 0x634]
call fcn.00402e50
mov ebx, dword [ebp - 0x648]
lea eax, [ebp - 0x634]
mov byte [ebp - 4], 8
push dword [ebx]
push 0x56ed78
push eax
call fcn.004023f0
add esp, 0xc
lea ecx, [ebp - 0x630]
push 0x56eda8
call fcn.00401f40
cmp dword [ebp - 0x64c], 0
lea ecx, [ebp - 0x640]
mov edx, dword [ebp - 0x634]
lea eax, [ebp - 0x644]
push esi
push dword [ebx]
cmove eax, ecx
push dword [ebp - 0x630]
mov ecx, dword [eax]
call fcn.004df0e0
add esp, 0xc
lea ecx, [ebp - 0x634]
call fcn.00402ed0
lea ecx, [ebp - 0x650]
call fcn.00402ed0
lea ecx, [ebp - 0x638]
call fcn.00402ed0
lea ecx, [ebp - 0x630]
call fcn.00402ed0
lea ecx, [ebp - 0x644]
call fcn.00402ed0
or esi, 0xffffffff
mov eax, dword [ebp - 0x668]
test eax, eax
je 0x4f6e7f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x4f6eb1
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f6eaf
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4f6eb1
call edx
mov eax, dword [ebp - 0x63c]
test eax, eax
je 0x4f6ec2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049aa22
mov esp, ebp
pop ebp
ret 0x10