Function at 0x4c4960
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x511c68
mov eax, dword fs:[0]
push eax
sub esp, 0x634
mov eax, dword [0x556754]
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 ebx, dword [ebp + 8]
mov dword [ebp - 0x62c], ebx
call fcn.0040b050
mov ecx, eax
test ecx, ecx
je 0x4c4e72
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x630], eax
push 0x515448
lea ecx, [ebp - 0x630]
mov dword [ebp - 4], 0
call fcn.0040f500
test al, al
jne 0x4c49e1
push 0
push 0x515448
lea ecx, [ebp - 0x630]
call fcn.0040b860
mov dword [ebp - 4], 1
call fcn.0040b050
mov ecx, eax
test ecx, ecx
je 0x4c4e7c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x634], eax
push 0x515448
lea ecx, [ebp - 0x634]
mov byte [ebp - 4], 2
call fcn.0040f500
test al, al
jne 0x4c4a2f
push 0
push 0x515448
lea ecx, [ebp - 0x634]
call fcn.0040b860
mov esi, dword [ebp + 0xc]
push esi
mov byte [ebp - 4], 3
call fcn.004c5620
mov edx, dword [0x55ddd4]
mov edi, eax
add esp, 4
mov dword [ebp - 0x62c], edi
mov eax, edx
mov ecx, dword [edx + 4]
cmp byte [ecx + 0xd], 0
jne 0x4c4a75
cmp dword [ecx + 0x10], edi
jge 0x4c4a62
mov ecx, dword [ecx + 8]
jmp 0x4c4a66
mov eax, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x4c4a58
cmp eax, edx
je 0x4c4a75
cmp edi, dword [eax + 0x10]
jge 0x4c4a77
mov eax, edx
cmp edx, eax
je 0x4c4aac
mov edx, dword [eax + 0x14]
test edx, edx
jne 0x4c4a86
xor ecx, ecx
jmp 0x4c4a9f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c4a90
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x634]
call fcn.0040b860
mov edi, dword [ebp - 0x634]
cmp dword [edi - 0xc], 0
jne 0x4c4b1b
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x62c], eax
call fcn.0040f630
add eax, 0x10
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov dword [ebx], eax
add esp, 4
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4c4af3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x62c]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4c4e54
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4c4e54
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d5900
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004d5900
add esp, 0x18
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test esi, esi
jle 0x4c4b82
nop dword [eax]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
sub esi, 1
jne 0x4c4b70
push edi
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4c4c6a
call fcn.0040b050
mov ecx, eax
test ecx, ecx
je 0x4c4e86
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x62c], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x62c]
call fcn.0040f500
test al, al
jne 0x4c4c12
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c4bf0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x62c]
call fcn.0040b860
lea eax, [ebp - 0x630]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x62c]
push eax
call fcn.00439ba0
mov edx, dword [ebp - 0x62c]
or esi, 0xffffffff
add esp, 8
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4c4c50
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x62c], eax
call fcn.0040f630
jmp 0x4c4e12
cmp dword [ebp - 0x62c], 8
jne 0x4c4dfa
mov ecx, dword [0x55ddc4]
mov esi, ecx
mov eax, dword [ecx + 4]
cmp byte [eax + 0xd], 0
jne 0x4c4ca7
cmp dword [eax + 0x10], 8
jge 0x4c4c93
mov eax, dword [eax + 8]
jmp 0x4c4c97
mov esi, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x4c4c88
cmp esi, ecx
je 0x4c4ca7
cmp dword [esi + 0x10], 8
jle 0x4c4ca9
mov esi, ecx
cmp ecx, esi
je 0x4c4dfa
mov dword [ebp - 0x640], 0
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
push 0x20219
push dword [esi + 0x14]
lea ecx, [ebp - 0x640]
mov byte [ebp - 4], 6
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004c57d0
test eax, eax
je 0x4c4d25
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x62c], eax
call fcn.0040f630
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x4c4d1d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or esi, 0xffffffff
jmp 0x4c4e1a
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.004d5900
add esp, 0xc
mov dword [ebp - 0x62c], 0x104
lea eax, [ebp - 0x62c]
lea ecx, [ebp - 0x640]
push eax
lea eax, [ebp - 0x628]
push eax
push dword [esi + 0x14]
call fcn.004c5880
test eax, eax
jne 0x4c4cef
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4c4deb
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x62c]
call fcn.004076c0
lea eax, [ebp - 0x630]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x62c]
push eax
call fcn.00439ba0
add esp, 8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x62c]
call fcn.00408570
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
push eax
call fcn.0040f630
add esp, 4
lea ecx, [ebp - 0x640]
add eax, 0x10
mov dword [ebx], eax
call fcn.004041c0
lea ecx, [ebp - 0x634]
call fcn.00408570
lea ecx, [ebp - 0x630]
call fcn.00408570
jmp 0x4c4e54
lea ecx, [ebp - 0x640]
mov byte [ebp - 4], 3
call fcn.004041c0
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x62c], eax
call fcn.0040f630
or esi, 0xffffffff
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov byte [ebp - 4], 1
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4c4e35
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x62c]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4c4e54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
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.004b5d96
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404b30
push 0x80004005
call fcn.00404b30
push 0x80004005
call fcn.00404b30
int3