Function at 0x405300
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d821d
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x5021c0]
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
lea eax, [ebp - 0x6c]
mov dword [0x50847c], 0
push eax
mov dword [0x508480], 0
mov dword [0x508484], 0
mov dword [0x508488], 0
mov dword [0x50848c], 0
mov dword [0x508490], 0
mov dword [0x508494], 0
mov dword [0x508498], 0
mov dword [0x50849c], 0
mov dword [0x5084a0], 0
mov dword [0x5084a4], 0
mov dword [0x5084a8], 0
mov byte [0x5084ac], 0
mov dword [ebp - 0x6c], 8
mov dword [ebp - 0x68], 0x4404
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
xor eax, eax
mov byte [0x5084ac], 0
xor ebx, ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x4c]
push eax
push ebx
push ebx
push 0x4e2740
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x4055dd
mov edx, dword [ebp - 0x4c]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405415
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00403a40
push dword [ebp - 0x4c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push 0x4eb85c
lea ecx, [ebp - 0x28]
call fcn.00405930
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x40]
call fcn.00415a80
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
push ecx
push 0x4eb878
push 0
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c]
call fcn.004059a0
mov ebx, dword [ebp - 0x58]
add esp, 0xc
mov edi, dword [ebp - 0x5c]
mov eax, ebx
sub eax, edi
sub eax, 0x60
cmp eax, 0x18
jae 0x405573
call fcn.004b45d2
mov esi, edi
mov dword [ebp - 0x48], eax
mov ecx, esi
cmp dword [ecx + 0x14], 7
jbe 0x4054a8
mov esi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0x44]
push 0xa
push eax
push esi
call fcn.004b44a3
add esp, 0xc
mov dword [ebp - 0x60], eax
cmp esi, dword [ebp - 0x44]
je 0x405858
mov eax, dword [ebp - 0x48]
cmp dword [eax], 0x22
je 0x405862
call fcn.004b45d2
mov esi, edi
mov dword [ebp - 0x44], eax
add esi, 0x18
cmp dword [esi + 0x14], 7
jbe 0x4054ea
mov esi, dword [esi]
mov dword [eax], 0
lea eax, [ebp - 0x48]
push 0xa
push eax
push esi
call fcn.004b44a3
add esp, 0xc
mov dword [ebp - 0x64], eax
cmp esi, dword [ebp - 0x48]
je 0x40586c
mov eax, dword [ebp - 0x44]
cmp dword [eax], 0x22
je 0x405876
call fcn.004b45d2
cmp dword [edi + 0x44], 7
lea esi, [edi + 0x30]
mov dword [ebp - 0x48], eax
jbe 0x40552a
mov esi, dword [esi]
mov dword [eax], 0
lea eax, [ebp - 0x50]
push 0xa
push eax
push esi
call fcn.004b44a3
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp esi, dword [ebp - 0x50]
je 0x405880
mov ecx, dword [ebp - 0x48]
cmp dword [ecx], 0x22
je 0x40588a
cmp dword [ebp - 0x60], 0xa
jg 0x40556c
jne 0x405573
cmp dword [ebp - 0x64], 0
jg 0x40556c
cmp eax, 0x4562
jle 0x405573
mov byte [0x5084ac], 1
test edi, edi
je 0x4055d2
mov esi, edi
cmp esi, ebx
je 0x40558e
lea ecx, [ecx]
mov ecx, esi
call fcn.004027a0
add esi, 0x18
cmp esi, ebx
jne 0x405580
mov ecx, dword [ebp - 0x54]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 3
cmp ecx, 0x1000
jb 0x4055c8
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405894
push ecx
push edi
call fcn.004accfd
add esp, 8
lea ecx, [ebp - 0x40]
call fcn.004027a0
mov ebx, dword [ebp - 0x44]
cmp dword [ebp - 0x18], 0
jne 0x4055ea
push str.uxtheme.dll
jmp 0x4055f7
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
jbe 0x4055f6
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x5084a8], eax
test eax, eax
je 0x405801
cmp byte [0x5084ac], 0
je 0x405801
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp ebx, 0x47ba
jge 0x405634
push str.AllowDarkModeForApp
push eax
call esi
mov dword [0x50847c], eax
jmp 0x405641
push str.SetPreferredAppMode
push eax
call esi
mov dword [0x508480], eax
push str.AllowDarkModeForWindow
push dword [0x5084a8]
call esi
push str.ShouldAppsUseDarkMode
push dword [0x5084a8]
mov dword [0x508484], eax
call esi
push str.IsDarkModeAllowedForWindow
push dword [0x5084a8]
mov dword [0x508488], eax
call esi
push str.IsDarkModeAllowedForApp
push dword [0x5084a8]
mov dword [0x50848c], eax
call esi
push str.ShouldSystemUseDarkMode
push dword [0x5084a8]
mov dword [0x508490], eax
call esi
push str.RefreshImmersiveColorPolicyState
push dword [0x5084a8]
mov dword [0x508494], eax
call esi
push str.GetIsImmersiveColorUsingHighContrast
push dword [0x5084a8]
mov dword [0x508498], eax
call esi
push str.FlushMenuThemes
push dword [0x5084a8]
mov dword [0x50849c], eax
call esi
push str.SetWindowCompositionAttribute
push 0x4eb51c
mov dword [0x5084a0], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call esi
cmp dword [0x50847c], 0
mov dword [0x5084a4], eax
jne 0x40570c
cmp ebx, 0x47ba
jge 0x40570c
push 0x87
push dword [0x5084a8]
call esi
mov dword [0x50847c], eax
cmp dword [0x508480], 0
jne 0x40572f
cmp ebx, 0x47ba
jl 0x40572f
push 0x87
push dword [0x5084a8]
call esi
mov dword [0x508480], eax
cmp dword [0x508484], 0
jne 0x40574a
push 0x85
push dword [0x5084a8]
call esi
mov dword [0x508484], eax
cmp dword [0x508488], 0
jne 0x405765
push 0x84
push dword [0x5084a8]
call esi
mov dword [0x508488], eax
cmp dword [0x50848c], 0
jne 0x405780
push 0x89
push dword [0x5084a8]
call esi
mov dword [0x50848c], eax
cmp dword [0x508490], 0
jne 0x40579b
push 0x8b
push dword [0x5084a8]
call esi
mov dword [0x508490], eax
cmp dword [0x508494], 0
jne 0x4057b6
push 0x8a
push dword [0x5084a8]
call esi
mov dword [0x508494], eax
cmp dword [0x508498], 0
jne 0x4057ce
push 0x68
push dword [0x5084a8]
call esi
mov dword [0x508498], eax
cmp dword [0x50849c], 0
jne 0x4057e6
push 0x6a
push dword [0x5084a8]
call esi
mov dword [0x50849c], eax
cmp dword [0x5084a0], 0
jne 0x405801
push 0x88
push dword [0x5084a8]
call esi
mov dword [0x5084a0], eax
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x405837
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40582d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405899
push ecx
push edx
call fcn.004accfd
add esp, 8
mov eax, 0x50847c
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.004accbf
mov esp, ebp
pop ebp
ret
push str.invalid_stol_argument
call fcn.00494df1
push str.stol_argument_out_of_range
call fcn.00494e31
push str.invalid_stol_argument
call fcn.00494df1
push str.stol_argument_out_of_range
call fcn.00494e31
push str.invalid_stol_argument
call fcn.00494df1
push str.stol_argument_out_of_range
call fcn.00494e31
call fcn.004b306f
call fcn.004b306f
int3