Function at 0x4ebae0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579403
mov eax, dword fs:[0]
push eax
sub esp, 0xcc8
mov eax, dword [0x5e5e08]
xor eax, ebp
mov dword [ebp - 0x38], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 8], 0
jne 0x4ebb1f
xor eax, eax
jmp 0x4ec1e7
lea ecx, [ebp - 0x20]
call fcn.0043cc40
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], reloc.WS2_32.dll_accept
mov ecx, dword [ebp + 8]
add ecx, 0x144
call fcn.00401870
test eax, eax
je 0x4ebc3e
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x144
call fcn.00401830
push eax
call fcn.004eb8d0
add esp, 0xc
movzx edx, al
test edx, edx
je 0x4ebc3e
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push eax
push 0x20019
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4ebbc4
cmp dword [ebp - 0x18], reloc.WS2_32.dll_accept
jne 0x4ebbc4
lea eax, [ebp - 0x28]
push eax
push 0x20019
push 0
mov ecx, dword [ebp - 0x24]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x2c], eax
call fcn.00567ea0
movzx edx, al
test edx, edx
je 0x4ebbf2
cmp dword [ebp - 0x2c], 0
je 0x4ebbf2
lea eax, [ebp - 0x28]
push eax
push 0x20119
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc90], eax
mov ecx, dword [ebp - 0xc90]
push ecx
call fcn.004b5f6c
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], 0
jne 0x4ebc3e
mov dword [ebp - 0xc94], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xc94]
jmp 0x4ec1e7
mov ecx, dword [ebp + 8]
add ecx, 0x160
call fcn.00401870
test eax, eax
je 0x4ebd47
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x160
call fcn.00401830
push eax
call fcn.004eb8d0
add esp, 0xc
movzx edx, al
test edx, edx
je 0x4ebd47
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x30]
push eax
push 0x20019
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x4ebccd
cmp dword [ebp - 0x18], reloc.WS2_32.dll_accept
jne 0x4ebccd
lea eax, [ebp - 0x30]
push eax
push 0x20019
push 0
mov ecx, dword [ebp - 0x24]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x34], eax
call fcn.00567ea0
movzx edx, al
test edx, edx
je 0x4ebcfb
cmp dword [ebp - 0x34], 0
je 0x4ebcfb
lea eax, [ebp - 0x30]
push eax
push 0x20119
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc98], eax
mov ecx, dword [ebp - 0xc98]
push ecx
call fcn.004b5f6c
add esp, 4
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x34], 0
jne 0x4ebd47
mov dword [ebp - 0xc9c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xc9c]
jmp 0x4ec1e7
mov ecx, dword [ebp + 8]
add ecx, 0x1d0
call fcn.0043d4c0
movzx eax, al
test eax, eax
jne 0x4ebe66
xor ecx, ecx
mov word [ebp - 0x44c], cx
push 0x206
push 0
lea edx, [ebp - 0x44a]
push edx
call fcn.004b6500
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x44c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 8]
add ecx, 0x1d0
call fcn.00401830
push eax
lea ecx, [ebp - 0x44c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x44c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ebde3
mov dword [ebp - 0xca0], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xca0]
jmp 0x4ec1e7
xor eax, eax
mov word [ebp - 0x244], ax
push 0x206
push 0
lea ecx, [ebp - 0x242]
push ecx
call fcn.004b6500
add esp, 0xc
push 0
push 0x19
lea edx, [ebp - 0x244]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 8]
add ecx, 0x1d0
call fcn.00401830
push eax
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x244]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ebe66
mov dword [ebp - 0xca4], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xca4]
jmp 0x4ec1e7
mov ecx, dword [ebp + 8]
add ecx, 0x1ec
call fcn.0043d4c0
movzx edx, al
test edx, edx
jne 0x4ebf02
xor eax, eax
mov word [ebp - 0x654], ax
push 0x206
push 0
lea ecx, [ebp - 0x652]
push ecx
call fcn.004b6500
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x654]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 8]
add ecx, 0x1ec
call fcn.00401830
push eax
lea eax, [ebp - 0x654]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x654]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ebf02
mov dword [ebp - 0xca8], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xca8]
jmp 0x4ec1e7
mov ecx, dword [ebp + 8]
add ecx, 0x208
call fcn.0043d4c0
movzx edx, al
test edx, edx
jne 0x4ebf9e
xor eax, eax
mov word [ebp - 0x85c], ax
push 0x206
push 0
lea ecx, [ebp - 0x85a]
push ecx
call fcn.004b6500
add esp, 0xc
push 0
push 0x1c
lea edx, [ebp - 0x85c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 8]
add ecx, 0x208
call fcn.00401830
push eax
lea eax, [ebp - 0x85c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x85c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ebf9e
mov dword [ebp - 0xcac], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xcac]
jmp 0x4ec1e7
mov ecx, dword [ebp + 8]
add ecx, 0x230
call fcn.0043d4c0
movzx edx, al
test edx, edx
jne 0x4ec188
lea ecx, [ebp - 0x874]
call fcn.00429310
mov byte [ebp - 4], 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xcb0], esp
push 0x59bcd4
call fcn.00401770
mov dword [ebp - 0xcd4], eax
lea eax, [ebp - 0x874]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x230
push ecx
call fcn.00451100
add esp, 0x24
lea edx, [ebp - 0x87c]
push edx
lea ecx, [ebp - 0x874]
call fcn.00429870
jmp 0x4ec022
push 0
lea eax, [ebp - 0xcb8]
push eax
lea ecx, [ebp - 0x87c]
call fcn.0044b6d0
lea ecx, [ebp - 0xcc0]
push ecx
lea ecx, [ebp - 0x874]
call fcn.004297a0
push eax
lea ecx, [ebp - 0x87c]
call fcn.0044fe10
movzx edx, al
test edx, edx
je 0x4ec179
xor eax, eax
mov word [ebp - 0xc8c], ax
push 0x206
push 0
lea ecx, [ebp - 0xc8a]
push ecx
call fcn.004b6500
add esp, 0xc
push 0
push 0
lea edx, [ebp - 0xc8c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x87c]
call fcn.0044b6b0
mov ecx, eax
call fcn.00401830
push eax
lea eax, [ebp - 0xc8c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0xc8c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ec0e1
mov dword [ebp - 0xcc4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.00429380
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xcc4]
jmp 0x4ec1e7
xor edx, edx
mov word [ebp - 0xa84], dx
push 0x206
push 0
lea eax, [ebp - 0xa82]
push eax
call fcn.004b6500
add esp, 0xc
push 0
push 0x19
lea ecx, [ebp - 0xa84]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x87c]
call fcn.0044b6b0
mov ecx, eax
call fcn.00401830
push eax
lea edx, [ebp - 0xa84]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0xa84]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ec174
mov dword [ebp - 0xcc8], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.00429380
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xcc8]
jmp 0x4ec1e7
jmp 0x4ec00e
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.00429380
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x24c]
push edx
mov eax, dword [ebp + 8]
add eax, 0xe0
push eax
call fcn.004f1d40
add esp, 8
test eax, eax
jne 0x4ec1c8
mov dword [ebp - 0xccc], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xccc]
jmp 0x4ec1e7
mov dword [ebp - 0xcd0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401980
mov eax, dword [ebp - 0xcd0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x38]
xor ecx, ebp
call fcn.004b645d
mov esp, ebp
pop ebp
ret