Function at 0x4162b0
Capabilities:
Check if file exists
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e3e18
mov eax, dword fs:[0]
push eax
mov eax, 0x1340
call fcn.004bc030
mov eax, dword [0x530400]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea ecx, [ebp - 0x1301]
call fcn.004080e0
mov eax, dword [0x531e84]
test eax, eax
jne 0x41633e
push 0x1e0
call fcn.004bbaae
mov esi, eax
add esp, 4
mov dword [ebp - 0x21c], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x416330
push 0x1e0
push 0
push esi
call fcn.004bda10
add esp, 0xc
mov ecx, esi
call fcn.0040e1c0
jmp 0x416332
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x531e84], eax
lea ecx, [ebp - 0x238]
push ecx
mov ecx, eax
call fcn.0040eee0
push 4
push str..lnk
lea ecx, [ebp - 0x238]
mov dword [ebp - 4], 1
call fcn.004024e0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004bda10
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp dword [ebp - 0x224], 0xf
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00401c90
add esp, 8
cmp dword [eax + 0x14], 7
jbe 0x4163ba
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp - 0x254]
cmp ecx, 7
jbe 0x416408
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4163fe
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a64
push ecx
push edx
call fcn.004bbade
add esp, 8
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x416749
push 0x568
push eax
lea eax, [ebp - 0x7d0]
push eax
call fcn.004bda10
add esp, 0xc
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x7d0]
push eax
call fcn.00416cb0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x4e7d0c
mov byte [ebp - 4], 2
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [ebp - 0x7d0]
call dword [0x50b060]
lea ecx, [ebp - 0x7d0]
call dword [0x50b068]
push 1
lea ecx, [ebp - 0x7d0]
call fcn.00418030
push 0x4e9254
lea ecx, [ebp - 0x7d0]
call fcn.00418790
push 0x4e9264
lea ecx, [ebp - 0x7d0]
call fcn.00418490
lea ecx, [ebp - 0x7d0]
call dword [0x50b064]
lea eax, [ebp - 0x250]
push eax
call fcn.00401530
lea eax, [ebp - 0x268]
mov byte [ebp - 4], 3
push eax
call fcn.00401230
lea eax, [ebp - 0x131c]
mov byte [ebp - 4], 4
push eax
call fcn.00401230
add esp, 0xc
cmp dword [eax + 0x14], 0xf
mov byte [ebp - 4], 5
jbe 0x4164f4
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x134c]
push eax
call fcn.00401c90
mov esi, eax
cmp dword [ebp - 0x23c], 0xf
lea ecx, [ebp - 0x250]
lea eax, [ebp - 0x1334]
mov byte [ebp - 4], 6
cmova ecx, dword [ebp - 0x250]
push ecx
push eax
call fcn.00401c90
add esp, 0x10
cmp dword [esi + 0x14], 7
mov byte [ebp - 4], 7
jbe 0x416537
mov esi, dword [esi]
cmp dword [eax + 0x14], 7
jbe 0x41653f
mov eax, dword [eax]
push esi
push 0
lea ecx, [ebp - 0x218]
push ecx
push 0
push eax
mov ecx, edi
call fcn.00415950
lea ecx, [ebp - 0x1334]
call fcn.00403110
lea ecx, [ebp - 0x134c]
call fcn.00403110
mov ecx, dword [ebp - 0x1308]
mov byte [ebp - 4], 4
cmp ecx, 0xf
jbe 0x4165a7
mov edx, dword [ebp - 0x131c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41659d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a69
push ecx
push edx
call fcn.004bbade
add esp, 8
push str.SoftwareSNBK
push reloc.WS2_32.dll_accept
call fcn.00401ff0
add esp, 8
test al, al
jne 0x4165d6
push 0x20006
push str.SoftwareSNBK
push 0
push reloc.WS2_32.dll_accept
call fcn.00401f90
add esp, 0x10
cmp dword [ebp - 0x224], 0xf
lea edx, [ebp - 0x238]
xorps xmm0, xmm0
mov dword [ebp - 0x130c], 0
cmova edx, dword [ebp - 0x238]
mov ecx, edx
mov dword [ebp - 0x1308], 0
movups xmmword [ebp - 0x131c], xmm0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x416610
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x131c]
call fcn.00403b90
push 2
lea eax, [ebp - 0x131c]
mov byte [ebp - 4], 8
push eax
push 0x4e92a4
push str.SoftwareSNBK
push reloc.WS2_32.dll_accept
call fcn.00401f30
mov ecx, dword [ebp - 0x1308]
add esp, 0x14
mov byte [ebp - 4], 4
cmp ecx, 0xf
jbe 0x416688
mov edx, dword [ebp - 0x131c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41667e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a6e
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [ebp - 0x254]
mov byte [ebp - 4], 3
cmp ecx, 0xf
jbe 0x4166c6
mov edx, dword [ebp - 0x268]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4166bc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a73
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [ebp - 0x23c]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0xf
mov byte [ebp - 0x268], 0
mov byte [ebp - 4], 2
cmp ecx, 0xf
jbe 0x41671f
mov edx, dword [ebp - 0x250]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416715
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a73
push ecx
push edx
call fcn.004bbade
add esp, 8
lea ecx, [ebp - 0x7d0]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
mov byte [ebp - 4], 1
call fcn.00416e10
mov eax, dword [0x531e84]
test eax, eax
jne 0x416793
push 0x1e0
call fcn.004bbaae
mov esi, eax
add esp, 4
mov dword [ebp - 0x21c], esi
mov byte [ebp - 4], 9
test esi, esi
je 0x416788
push 0x1e0
push 0
push esi
call fcn.004bda10
add esp, 0xc
mov ecx, esi
call fcn.0040e1c0
jmp 0x41678a
xor eax, eax
mov byte [ebp - 4], 1
mov dword [0x531e84], eax
mov ecx, eax
call fcn.0040efe0
test al, al
je 0x4169fb
call fcn.0040ce80
mov ecx, eax
call fcn.0040ecc0
test al, al
jne 0x4169fb
call fcn.0040ce80
mov ecx, eax
call fcn.0040ef50
test al, al
jne 0x4169fb
push 1
call fcn.0040ce80
mov ecx, eax
call fcn.0040f420
mov eax, dword [edi + 0x6c0]
lea ecx, [edi + 0x6c0]
push 0x50ae7e
push 0x7eb
call dword [eax]
push 0x568
lea eax, [ebp - 0xd64]
push 0
push eax
call fcn.004bda10
add esp, 0xc
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0xd64]
push eax
call fcn.00416cb0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x4e7d0c
mov byte [ebp - 4], 0xa
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [ebp - 0xd64]
call dword [0x50b060]
lea ecx, [ebp - 0xd64]
call dword [0x50b068]
push 2
lea ecx, [ebp - 0xd64]
call fcn.00418030
push 0x4e92a8
lea ecx, [ebp - 0xd64]
call fcn.00418790
push str.FFFF6600
lea ecx, [ebp - 0xd64]
call fcn.00418900
push 0x4e92c0
lea ecx, [ebp - 0xd64]
call fcn.00418490
push str.FFFF6600
lea ecx, [ebp - 0xd64]
call fcn.00418600
lea ecx, [ebp - 0xd64]
call dword [0x50b064]
mov eax, dword [ebp - 0x220]
cmp eax, 2
je 0x4168c6
cmp eax, 3
je 0x4168c6
cmp eax, 4
jne 0x4169ee
mov esi, 1
cmp eax, 2
jne 0x4168d4
xor esi, esi
jmp 0x4168df
cmp eax, 4
mov ecx, 2
cmove esi, ecx
push 0x59c
lea eax, [ebp - 0x1300]
push 0
push eax
call fcn.004bda10
add esp, 0xc
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x1300]
push esi
push eax
call fcn.00411440
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x4e7d0c
mov byte [ebp - 4], 0xb
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov esi, dword [sym.RedAlert.exe_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::Create_struct_HWND_____wchar_t_const___unsigned_long_int__unsigned_long_int__int__int__int__int__struct_HMENU____]
lea ecx, [ebp - 0x1300]
push eax
call esi
lea ecx, [ebp - 0x1300]
call dword [0x50b068]
lea ecx, [ebp - 0x1300]
call dword [0x50b064]
mov eax, dword [edi + 0x6c0]
lea ecx, [edi + 0x6c0]
push 0x50ae7e
push 0x7eb
call dword [eax]
cmp dword [ebp - 0x21c], 0
jne 0x4169e3
push 0x594
lea eax, [ebp - 0x7fc]
push 0
push eax
call fcn.004bda10
add esp, 0xc
lea ecx, [ebp - 0x7fc]
call fcn.00409340
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x4e7d0c
mov byte [ebp - 4], 0xc
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [ebp - 0x7fc]
call esi
lea ecx, [ebp - 0x7fc]
call dword [0x50b068]
lea ecx, [ebp - 0x7fc]
call dword [0x50b064]
lea ecx, [ebp - 0x7fc]
call fcn.00409540
lea ecx, [ebp - 0x1300]
call fcn.004115f0
lea ecx, [ebp - 0xd64]
call fcn.00416e10
jmp 0x416a13
mov eax, dword [edi + 0x6c0]
lea ecx, [edi + 0x6c0]
push 0x50ae7e
push 0x7ea
call dword [eax]
mov ecx, dword [ebp - 0x224]
cmp ecx, 0xf
jbe 0x416a49
mov edx, dword [ebp - 0x238]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416a3f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416a78
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bbaec
mov esp, ebp
pop ebp
ret
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
int3