Function at 0x10058150
Capabilities:
Get common file path
Get startup folder
Query environment variable
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100799cc
mov eax, dword fs:[0]
push eax
sub esp, 0x688
mov eax, dword [0x1009e034]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x679], dl
mov esi, ecx
cmp dword [esi + 0x14], 8
jb 0x10058190
mov eax, dword [esi]
jmp 0x10058192
mov eax, esi
movzx ebx, word [eax]
xor eax, eax
push eax
push 0x1007d0cc
lea ecx, [ebp - 0x660]
mov dword [ebp - 0x64c], 7
mov dword [ebp - 0x650], 0
mov word [ebp - 0x660], ax
call fcn.10003de0
mov dword [ebp - 4], 0
mov edi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
cmp ebx, 0x5e
jne 0x1005831d
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x630]
push eax
mov ecx, esi
mov dword [ebp - 0x630], 0x25
call fcn.1000bfb0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10058795
lea ecx, [ebx - 2]
push ecx
push 2
lea eax, [ebp - 0x648]
push eax
mov ecx, esi
call fcn.1000be10
lea ecx, [ebp - 0x660]
mov dword [ebp - 0x630], eax
cmp ecx, eax
je 0x10058267
cmp dword [ebp - 0x64c], 8
jb 0x1005823e
push dword [ebp - 0x660]
call edi
mov eax, dword [ebp - 0x630]
add esp, 4
xor ecx, ecx
mov word [ebp - 0x660], cx
push eax
lea ecx, [ebp - 0x660]
mov dword [ebp - 0x64c], 7
mov dword [ebp - 0x650], 0
call fcn.10001c40
cmp dword [ebp - 0x634], 8
jb 0x1005827b
push dword [ebp - 0x648]
call edi
add esp, 4
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x648]
push eax
mov ecx, esi
call fcn.1000be10
mov ebx, eax
cmp esi, ebx
je 0x100582bd
cmp dword [esi + 0x14], 8
jb 0x100582a2
push dword [esi]
call edi
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
push ebx
mov ecx, esi
mov word [esi], ax
call fcn.10001c40
cmp dword [ebp - 0x634], 8
jb 0x100582d1
push dword [ebp - 0x648]
call edi
add esp, 4
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
call dword [sym.imp.MSVCR110.dll__wtoi]
add esp, 4
sub eax, 0x101
je 0x1005830d
dec eax
jne 0x10058659
push str.ProgramFile
lea ecx, [ebp - 0x660]
jmp 0x10058654
push str.ProgramData
lea ecx, [ebp - 0x660]
jmp 0x10058654
cmp ebx, 0x25
jne 0x10058795
push 9
push 0
push str._firefox_
mov ecx, esi
call fcn.1000e380
test eax, eax
jne 0x1005860e
push 0x206
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call sub.MSVCR110.dll_memset
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x1c
push eax
push 0
call ebx
push 0
push 0x1a
lea eax, [ebp - 0x21c]
push eax
push 0
call ebx
xor eax, eax
mov dword [ebp - 0x664], 7
mov dword [ebp - 0x668], 0
mov word [ebp - 0x678], ax
mov dword [ebp - 0x634], 7
mov dword [ebp - 0x638], eax
mov word [ebp - 0x648], ax
mov byte [ebp - 4], 2
cmp word [ebp - 0x21c], ax
jne 0x100583c3
xor ecx, ecx
jmp 0x100583df
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100583d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x678]
call fcn.10003de0
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x630]
push eax
lea ecx, [ebp - 0x678]
mov dword [ebp - 0x630], 0x5c
call fcn.1000bfb0
cmp eax, dword [ebp - 0x668]
je 0x1005842a
push 0x1007d9c8
lea ecx, [ebp - 0x678]
call fcn.10008110
push 0x1c
push str.MozillaFirefoxprofiles.ini
lea ecx, [ebp - 0x678]
call fcn.10008160
cmp dword [ebp - 0x664], 8
lea eax, [ebp - 0x678]
cmovae eax, dword [ebp - 0x678]
push eax
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0x1007d0cc
push str.Path
push str.Profile0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x10058488
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x648]
call fcn.10003960
push 0
push 0x100893e4
lea ecx, [ebp - 0x648]
call fcn.10015470
cmp eax, 0xffffffff
je 0x100584c6
push 0
push 0x100893e4
lea ecx, [ebp - 0x648]
call fcn.10015470
push 1
push 0x1007d9c8
push 1
push eax
lea ecx, [ebp - 0x648]
call fcn.10002790
push 0x104
lea eax, [ebp - 0x21c]
push 0
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x1c
push eax
push 0
call ebx
cmp word [ebp - 0x21c], 0
jne 0x100584f9
xor ecx, ecx
jmp 0x10058511
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10058502
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x678]
call fcn.10003de0
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x630]
push eax
lea ecx, [ebp - 0x678]
mov dword [ebp - 0x630], 0x5c
call fcn.1000bfb0
cmp eax, dword [ebp - 0x668]
je 0x1005855c
push 0x1007d9c8
lea ecx, [ebp - 0x678]
call fcn.10008110
push 0x10
push str.MozillaFirefox_
lea ecx, [ebp - 0x678]
call fcn.10008160
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x678]
call fcn.10007f90
cmp dword [ebp - 0x638], 0
je 0x1005859d
push 0x1007d9c8
lea ecx, [ebp - 0x678]
call fcn.10008110
push 5
push str.cache
lea ecx, [ebp - 0x678]
call fcn.10008160
lea eax, [ebp - 0x678]
cmp esi, eax
je 0x100585c5
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.10001f80
cmp dword [ebp - 0x634], 8
jb 0x100585d9
push dword [ebp - 0x648]
call edi
add esp, 4
xor eax, eax
cmp dword [ebp - 0x664], 8
mov dword [ebp - 0x634], 7
mov dword [ebp - 0x638], 0
mov word [ebp - 0x648], ax
jb 0x10058795
push dword [ebp - 0x678]
jmp 0x10058790
xor eax, eax
push 0x40e
push eax
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x422]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x10058636
mov eax, dword [esi]
jmp 0x10058638
mov eax, esi
push 0x208
lea ecx, [ebp - 0x424]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x424]
push eax
mov ecx, esi
call fcn.10003960
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x62c], ax
lea eax, [ebp - 0x62a]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
push 0xb
push str.ProgramData
push dword [ebp - 0x650]
push ecx
lea ecx, [ebp - 0x660]
call fcn.10005a80
test eax, eax
jne 0x100586ca
cmp byte [ebp - 0x679], al
je 0x100586a1
push eax
push 0x23
jmp 0x100586ec
cmp dword [ebp - 0x64c], 8
push 0x104
lea ecx, [ebp - 0x62c]
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x100586fb
mov edx, str.ProgramFile
lea ecx, [ebp - 0x660]
call fcn.10006100
test al, al
je 0x100586fb
cmp byte [ebp + 8], 0
push 0
jne 0x100586ea
push 0x26
jmp 0x100586ec
push 0x2a
lea eax, [ebp - 0x62c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x694]
call fcn.10008e70
push esi
mov edx, eax
lea ecx, [ebp - 0x648]
mov byte [ebp - 4], 3
call fcn.100080e0
mov ebx, eax
add esp, 4
cmp esi, ebx
je 0x10058750
cmp dword [esi + 0x14], 8
jb 0x10058735
push dword [esi]
call edi
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
push ebx
mov ecx, esi
mov word [esi], ax
call fcn.10001c40
cmp dword [ebp - 0x634], 8
jb 0x10058764
push dword [ebp - 0x648]
call edi
add esp, 4
xor eax, eax
cmp dword [ebp - 0x680], 8
mov dword [ebp - 0x634], 7
mov dword [ebp - 0x638], 0
mov word [ebp - 0x648], ax
jb 0x10058795
push dword [ebp - 0x694]
call edi
add esp, 4
cmp dword [ebp - 0x64c], 8
jb 0x100587a9
push dword [ebp - 0x660]
call edi
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1006e4e6
mov esp, ebp
pop ebp
ret