Function at 0x406a90
Capabilities:
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fc82
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x4282d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [esi + 0xc]
sub eax, 0x10
call fcn.00403c40
add eax, 0x10
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x244]
xor edi, edi
push ecx
mov ebx, str.crt.dll
mov dword [ebp - 4], edi
call fcn.00403ae0
add esp, 8
mov byte [ebp - 4], 1
mov eax, dword [eax]
xor edx, edx
mov ecx, eax
mov word [ebp - 0x234], dx
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], edi
lea edx, [ecx + 2]
mov di, word [ecx]
add ecx, 2
test di, di
jne 0x406b15
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x234]
call fcn.00403240
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406b56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x220], 8
mov eax, dword [ebp - 0x234]
jae 0x406b6b
lea eax, [ebp - 0x234]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
mov dword [ebp - 0x248], ebx
test ebx, ebx
je 0x406c29
push str.GetUserId
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
mov dword [ebp - 0x238], edx
test edx, edx
je 0x406bd6
mov eax, dword [esi + 0x24]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x406bc8
mov eax, 0x104
lea ecx, [esi + 0x24]
call fcn.00402a90
mov edx, dword [ebp - 0x238]
mov edi, dword [esi + 0x24]
push 0x104
push edi
call edx
add esp, 8
push str.GetProductVersionString
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x406c1c
mov eax, dword [esi + 0x28]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x406c0c
mov eax, 0x104
lea ecx, [esi + 0x28]
call fcn.00402a90
mov edi, dword [esi + 0x28]
push 1
push 0x104
push edi
call ebx
add esp, 0xc
mov ecx, dword [ebp - 0x248]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
push 0x23
lea edx, [ebp - 0x218]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x238], eax
mov eax, str.BaofengStormPlayerProfilesConfig.ini
mov byte [ebp - 4], 4
test eax, 0xffff0000
jne 0x406c86
mov ecx, eax
movzx edi, cx
push edi
call fcn.00402bb0
add esp, 4
test eax, eax
je 0x406c96
push eax
mov eax, edi
lea edi, [ebp - 0x238]
call fcn.00402790
jmp 0x406c96
mov ebx, str.BaofengStormPlayerProfilesConfig.ini
lea eax, [ebp - 0x238]
call fcn.00402650
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 5
call fcn.0040a0e0
add esp, 8
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406cdc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0x2c]
mov ebx, dword [ebp - 0x240]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x406d06
mov eax, 0x104
lea ecx, [esi + 0x2c]
call fcn.00402a90
mov edi, dword [esi + 0x2c]
push ebx
push 0x104
push edi
push 0
push 0x423d68
push str.Product
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x220], 8
jb 0x406d60
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0040d581
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x23c]
xor edx, edx
add eax, 0xfffffff0
mov word [ebp - 0x234], dx
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406da6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d58c
mov esp, ebp
pop ebp
ret