Function at 0x475670
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a06af
mov eax, dword fs:[0]
push eax
sub esp, 0x454
mov eax, dword [0x4c4330]
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
mov edi, ecx
push 1
push 0x23
lea eax, [ebp - 0x420]
push eax
push 0
mov esi, edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x454]
push ecx
lea ecx, [ebp - 0x420]
call fcn.0045a880
lea edx, [ebp - 0x454]
push edx
lea eax, [ebp - 0x438]
push eax
mov ebx, str.BaofengStormPlayerProfilesConfig.ini
mov dword [ebp - 4], 0
call fcn.0045bec0
lea ecx, [ebp - 0x454]
push ecx
lea edx, [ebp - 0x44c]
push edx
mov ebx, str.BaofengStormPlayerProfiles
mov byte [ebp - 4], 1
call fcn.0045bec0
lea eax, [esi + 0xc]
push eax
lea ecx, [ebp - 0x460]
push ecx
mov ebx, str.crt.dll
mov byte [ebp - 4], 2
call fcn.0045bec0
add esp, 0x18
mov byte [ebp - 4], 3
cmp dword [esi + 0x68], 0
jne 0x47573c
mov edx, dword [ebp - 0x460]
push 8
push 0
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [esi + 0x68], eax
test edi, edi
jne 0x475c1b
mov eax, dword [esi + 0x68]
test eax, eax
je 0x47578f
push str.GetUserId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x47578f
mov eax, dword [esi + 0x58]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x475781
mov eax, 0x104
lea ecx, [esi + 0x58]
call fcn.00458c00
mov edi, dword [esi + 0x58]
push 0x104
push edi
call ebx
add esp, 8
mov eax, dword [ebp - 0x44c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4757af
mov ecx, dword [ebp - 0x44c]
push ecx
call fcn.0045b280
add esp, 4
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x444], eax
mov byte [ebp - 4], 4
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x45c], eax
mov byte [ebp - 4], 5
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x450], eax
mov byte [ebp - 4], 6
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x448], eax
mov byte [ebp - 4], 7
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x458], eax
push 2
push 0x4a9720
lea edi, [ebp - 0x444]
mov byte [ebp - 4], 8
call fcn.00458a90
push 0x3af
push 0x4a9720
lea edi, [ebp - 0x45c]
call fcn.00458a90
push 0x389
push 0x4a9720
lea edi, [ebp - 0x450]
call fcn.00458a90
push 2
push 0x4a9720
lea edi, [ebp - 0x458]
call fcn.00458a90
push 1
push 0x4a9720
lea edi, [ebp - 0x448]
call fcn.00458a90
mov ecx, dword [ebp - 0x438]
mov eax, dword [esi + 0x58]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 0x28
push ecx
push eax
push 0x4ae5dc
push str.Product
call ebx
test eax, eax
jne 0x4758dc
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1771
call fcn.00479ea0
mov edx, dword [ebp - 0x438]
mov eax, dword [ebp - 0x444]
push edx
push eax
push 0x4ae5f4
push str.Product
call ebx
test eax, eax
jne 0x475912
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1772
call fcn.00479ea0
mov ecx, dword [ebp - 0x438]
mov edx, dword [ebp - 0x45c]
push ecx
push edx
push 0x4ae5fc
push str.Product
call ebx
test eax, eax
jne 0x475948
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1773
call fcn.00479ea0
mov eax, dword [ebp - 0x438]
mov ecx, dword [ebp - 0x450]
push eax
push ecx
push 0x4ae604
push str.Product
call ebx
test eax, eax
jne 0x47597e
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1774
call fcn.00479ea0
mov edx, dword [ebp - 0x438]
mov eax, dword [ebp - 0x448]
push edx
push eax
push str.ShowWelcome
push str.Welcome
call ebx
test eax, eax
jne 0x4759b4
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1775
call fcn.00479ea0
cmp dword [esi + 0x5c], 0
je 0x4759f0
mov ecx, dword [ebp - 0x438]
mov edx, dword [ebp - 0x458]
push ecx
push edx
push 0x4ae634
push str.DZone
call ebx
test eax, eax
jne 0x4759f0
lea edi, [esi + 0x6c]
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x1776
call fcn.00479ea0
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x216]
push ecx
mov word [ebp - 0x218], ax
call fcn.00488d60
add esp, 0xc
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x43c]
push eax
lea ecx, [ebp - 0x218]
call fcn.0045a880
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x43c]
push 0x2e
push ecx
call fcn.00487b83
add esp, 8
test eax, eax
jne 0x475a52
or eax, 0xffffffff
jmp 0x475a5a
sub eax, dword [ebp - 0x43c]
sar eax, 1
lea ecx, [ebp - 0x434]
lea edx, [ebp - 0x43c]
call fcn.0045c980
mov byte [ebp - 4], 0xa
mov edi, dword [ebp - 0x434]
push 0x5f
push edi
call fcn.00487b83
add esp, 8
test eax, eax
jne 0x475a89
or ecx, 0xffffffff
jmp 0x475a8f
sub eax, edi
sar eax, 1
mov ecx, eax
mov eax, dword [edi - 0xc]
sub eax, ecx
lea edx, [ebp - 0x434]
dec eax
push edx
lea ecx, [ebp - 0x440]
call fcn.0045c900
lea edi, [ebp - 0x434]
mov byte [ebp - 4], 0xb
call fcn.0045bfa0
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x440]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475adc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x434]
cmp dword [edi - 0xc], 0xa
jne 0x475b2b
push ecx
mov dword [ebp - 0x440], esp
lea eax, [edi - 0x10]
mov dword [ebp - 0x440], esp
call fcn.0045c0b0
add eax, 0x10
mov ecx, esp
mov dword [ecx], eax
call fcn.00479bd0
test eax, eax
je 0x475b2b
mov edx, dword [ebp - 0x438]
push edx
push edi
push 0x4ae648
push str.Product
call ebx
mov dword [esi + 0x80], 1
add edi, 0xfffffff0
mov byte [ebp - 4], 9
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x475b4b
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x43c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475b71
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x458]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475b97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475bbd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x450]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475be3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x45c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475c09
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x444]
add eax, 0xfffffff0
jmp 0x475cdf
cmp edi, 1
jne 0x475cf8
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x43c], eax
lea ecx, [ebp - 0x430]
push ecx
mov byte [ebp - 4], 0xc
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [ebp - 0x42a]
movzx eax, word [ebp - 0x42e]
movzx ecx, word [ebp - 0x430]
push edx
push eax
push ecx
push str._4d_.2d_.2d
lea edi, [ebp - 0x43c]
call fcn.00458a90
mov edx, dword [ebp - 0x438]
mov edi, dword [ebp - 0x43c]
add esp, 0x10
push edx
push edi
push 0x4a96b0
push str.INSTALL
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, dword [esi + 0x68]
test esi, esi
je 0x475cd8
push str.CrtSetInstallDate
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x475cd8
mov ecx, dword [edi - 8]
mov eax, 1
sub eax, dword [edi - 4]
or ecx, eax
jge 0x475cd2
xor eax, eax
lea ecx, [ebp - 0x43c]
call fcn.00458c00
mov edi, dword [ebp - 0x43c]
push edi
call esi
add esp, 4
mov byte [ebp - 4], 3
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475cf8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x460]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475d1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x44c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475d44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x438]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475d6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x454]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475d93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
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.00485631
mov esp, ebp
pop ebp
ret