Function at 0x10039770
Capabilities:
Check if file exists
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c9ff1
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x101063e4]
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 ebx, dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
mov dword [ebp - 0x42c], ebx
call fcn.1009c500
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.MozillaFirefox
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x10039a9d
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x428], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov dword [ebp - 4], 0
jge 0x10039830
push 0x104
lea ecx, [ebp - 0x428]
call fcn.10004430
mov esi, dword [ebp - 0x428]
cmp dword [esi - 8], 0x104
jl 0x10039aa7
xor eax, eax
mov dword [esi - 0xc], 0x104
mov word [esi + 0x208], ax
lea eax, [ebp - 0x218]
push str.profiles.ini
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.100a0806
add esp, 8
test eax, eax
js 0x10039aa7
cmp eax, dword [esi - 8]
jg 0x10039aa7
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10039a23
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x10039a23
push 0x208
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.1009c500
add esp, 0xc
lea eax, [ebp - 0x420]
push esi
push 0x104
push eax
push 0x100d2904
push str.Path
push str.Profile0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x420], 0
jne 0x10039919
push 0x100d2904
mov ecx, ebx
call fcn.10003c90
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10039a7d
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x10039a7d
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x10039ab1
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x424], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 2
jge 0x10039964
push 0x104
lea ecx, [ebp - 0x424]
call fcn.10004430
mov edi, dword [ebp - 0x424]
cmp dword [edi - 8], 0x104
jl 0x10039abb
xor eax, eax
mov dword [edi - 0xc], 0x104
mov word [edi + 0x208], ax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [edi - 8]
push edi
call fcn.100a0806
add esp, 8
test eax, eax
js 0x10039aa7
cmp eax, dword [edi - 8]
jg 0x10039aa7
xor ecx, ecx
mov dword [edi - 0xc], eax
push 0x100d5ee0
mov word [edi + eax*2], cx
lea ecx, [ebp - 0x424]
push 0x100da950
call fcn.1002b940
mov eax, dword [ebp - 0x424]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x42c], eax
call fcn.100041c0
mov edx, dword [ebp - 0x42c]
add eax, 0x10
or edi, 0xffffffff
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10039a0f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jmp 0x10039a73
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x10039ac5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push 0x100d2904
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.10004090
test al, al
jne 0x10039a5e
push 0
push 0x100d2904
mov ecx, ebx
call fcn.100044d0
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10039a7d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
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.10075b61
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.10003f10
push 0x80070057
call fcn.10003f10
push 0x80004005
call fcn.10003f10
push 0x80070057
call fcn.10003f10
push 0x80004005
call fcn.10003f10
int3