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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f0e55
mov eax, dword fs:[0]
push eax
sub esp, 0xcc8
mov eax, dword [0x53fbb0]
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 0x4368af
xor eax, eax
jmp 0x436f7e
lea ecx, [ebp - 0x20]
call fcn.0042d5d0
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], reloc.WS2_32.dll_accept
mov ecx, dword [ebp + 8]
add ecx, 0x144
call fcn.004017c0
test eax, eax
je 0x4369d5
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x144
call fcn.00401780
push eax
call fcn.00436660
add esp, 0xc
movzx edx, al
test edx, edx
je 0x4369d5
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 0x43695b
cmp dword [ebp - 0x18], reloc.WS2_32.dll_accept
jne 0x43695b
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.004eab90
movzx edx, al
test edx, edx
je 0x436989
cmp dword [ebp - 0x2c], 0
je 0x436989
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.00490d06
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], 0
jne 0x4369d5
mov dword [ebp - 0xc94], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xc94]
jmp 0x436f7e
mov ecx, dword [ebp + 8]
add ecx, 0x160
call fcn.004017c0
test eax, eax
je 0x436ade
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x160
call fcn.00401780
push eax
call fcn.00436660
add esp, 0xc
movzx edx, al
test edx, edx
je 0x436ade
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 0x436a64
cmp dword [ebp - 0x18], reloc.WS2_32.dll_accept
jne 0x436a64
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.004eab90
movzx edx, al
test edx, edx
je 0x436a92
cmp dword [ebp - 0x34], 0
je 0x436a92
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.00490d06
add esp, 4
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x34], 0
jne 0x436ade
mov dword [ebp - 0xc9c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xc9c]
jmp 0x436f7e
mov ecx, dword [ebp + 8]
add ecx, 0x1d0
call fcn.0040ab60
movzx eax, al
test eax, eax
jne 0x436bfd
xor ecx, ecx
mov word [ebp - 0x44c], cx
push 0x206
push 0
lea edx, [ebp - 0x44a]
push edx
call fcn.00491200
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.00401780
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 0x436b7a
mov dword [ebp - 0xca0], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xca0]
jmp 0x436f7e
xor eax, eax
mov word [ebp - 0x244], ax
push 0x206
push 0
lea ecx, [ebp - 0x242]
push ecx
call fcn.00491200
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.00401780
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 0x436bfd
mov dword [ebp - 0xca4], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xca4]
jmp 0x436f7e
mov ecx, dword [ebp + 8]
add ecx, 0x1ec
call fcn.0040ab60
movzx edx, al
test edx, edx
jne 0x436c99
xor eax, eax
mov word [ebp - 0x654], ax
push 0x206
push 0
lea ecx, [ebp - 0x652]
push ecx
call fcn.00491200
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.00401780
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 0x436c99
mov dword [ebp - 0xca8], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xca8]
jmp 0x436f7e
mov ecx, dword [ebp + 8]
add ecx, 0x208
call fcn.0040ab60
movzx edx, al
test edx, edx
jne 0x436d35
xor eax, eax
mov word [ebp - 0x85c], ax
push 0x206
push 0
lea ecx, [ebp - 0x85a]
push ecx
call fcn.00491200
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.00401780
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 0x436d35
mov dword [ebp - 0xcac], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xcac]
jmp 0x436f7e
mov ecx, dword [ebp + 8]
add ecx, 0x230
call fcn.0040ab60
movzx edx, al
test edx, edx
jne 0x436f1f
lea ecx, [ebp - 0x874]
call fcn.0041a790
mov byte [ebp - 4], 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xcb0], esp
push 0x4fb25c
call fcn.004016c0
mov dword [ebp - 0xcd4], eax
lea eax, [ebp - 0x874]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x230
push ecx
call fcn.0043ef80
add esp, 0x24
lea edx, [ebp - 0x87c]
push edx
lea ecx, [ebp - 0x874]
call fcn.0040ef30
jmp 0x436db9
push 0
lea eax, [ebp - 0xcb8]
push eax
lea ecx, [ebp - 0x87c]
call fcn.0043a960
lea ecx, [ebp - 0xcc0]
push ecx
lea ecx, [ebp - 0x874]
call fcn.0040b4c0
push eax
lea ecx, [ebp - 0x87c]
call fcn.0043dde0
movzx edx, al
test edx, edx
je 0x436f10
xor eax, eax
mov word [ebp - 0xc8c], ax
push 0x206
push 0
lea ecx, [ebp - 0xc8a]
push ecx
call fcn.00491200
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.0040af60
mov ecx, eax
call fcn.00401780
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 0x436e78
mov dword [ebp - 0xcc4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.0041a800
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xcc4]
jmp 0x436f7e
xor edx, edx
mov word [ebp - 0xa84], dx
push 0x206
push 0
lea eax, [ebp - 0xa82]
push eax
call fcn.00491200
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.0040af60
mov ecx, eax
call fcn.00401780
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 0x436f0b
mov dword [ebp - 0xcc8], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.0041a800
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xcc8]
jmp 0x436f7e
jmp 0x436da5
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x874]
call fcn.0041a800
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x24c]
push edx
mov eax, dword [ebp + 8]
add eax, 0xe0
push eax
call fcn.00435110
add esp, 8
test eax, eax
jne 0x436f5f
mov dword [ebp - 0xccc], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
mov eax, dword [ebp - 0xccc]
jmp 0x436f7e
mov dword [ebp - 0xcd0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004018d0
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.0049115e
mov esp, ebp
pop ebp
ret