Function at 0x40f290
Capabilities:
Create directory
Get common file path
Read .ini file

Disassembly:
sub esp, 0x86c
mov eax, dword [0x492afc]
xor eax, esp
mov dword [esp + 0x864], eax
mov eax, dword [esp + 0x874]
push ebx
push ebp
mov ebp, dword [esp + 0x878]
push esi
push edi
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x672]
push edx
mov dword [esp + 0x20], eax
mov word [esp + 0x674], cx
call fcn.00443d20
xor eax, eax
push 0x62
push eax
lea ecx, [esp + 0x27e]
push ecx
mov word [esp + 0x280], ax
call fcn.00443d20
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x2f2]
push eax
mov word [esp + 0x2f4], dx
call fcn.00443d20
xor ecx, ecx
push 0x18e
push ecx
lea edx, [esp + 0x506]
push edx
mov word [esp + 0x508], cx
call fcn.00443d20
push 0xc8
lea eax, [esp + 0x50c]
push 0
push eax
call fcn.00443d20
add esp, 0x3c
push 0
push 0x1a
lea ecx, [esp + 0x670]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.MozillaFirefox
lea edx, [esp + 0x66c]
push 0x104
push edx
call fcn.00442acd
add esp, 0xc
xor eax, eax
jmp 0x40f380
movzx ecx, word [esp + eax + 0x668]
mov word [esp + eax + 0x2d0], cx
add eax, 2
test cx, cx
jne 0x40f380
push str.profiles.ini
lea eax, [esp + 0x2d4]
push 0x104
push eax
call fcn.00442acd
add esp, 0xc
lea ecx, [esp + 0x2d0]
push ecx
push 0xc8
lea edx, [esp + 0x4e0]
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
lea esi, [esp + 0x4d8]
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f3e0
sub eax, edx
sar eax, 1
je 0x40f4c6
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push str.Profile
push esi
call fcn.00442621
add esp, 8
cmp eax, esi
jne 0x40f469
lea eax, [esp + 0x268]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f420
sub eax, edx
sar eax, 1
jne 0x40f452
lea eax, [esp + 0x2d0]
push eax
push 0x32
lea ecx, [esp + 0x270]
push ecx
push 0x4826e0
push str.Path
push esi
call edi
jmp 0x40f469
lea edx, [esp + 0x2d0]
push edx
push 0
push str.Default
push esi
call ebx
cmp eax, 1
je 0x40f4a7
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f470
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2 + 2]
mov eax, esi
lea edx, [eax + 2]
jmp 0x40f490
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f490
sub eax, edx
sar eax, 1
jne 0x40f401
jmp 0x40f4c6
lea eax, [esp + 0x2d0]
push eax
push 0x32
lea ecx, [esp + 0x270]
push ecx
push 0x4826e0
push str.Path
push esi
call edi
lea eax, [esp + 0x268]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f4d0
sub eax, edx
sar eax, 1
lea ecx, [esp + eax*2 + 0x268]
lea eax, [esp + 0x268]
mov edx, eax
cmp edx, ecx
je 0x40f508
cmp word [eax], 0x2f
jne 0x40f501
mov edx, 0x5c
mov word [eax], dx
add eax, 2
cmp eax, ecx
jne 0x40f4f3
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x668]
mov word [esp + eax + 0x2d0], cx
add eax, 2
test cx, cx
jne 0x40f510
push 0x482c58
lea eax, [esp + 0x2d4]
push 0x104
push eax
call fcn.00442acd
lea eax, [esp + 0x274]
add esp, 0xc
mov edx, eax
jmp 0x40f550
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f550
lea edi, [esp + 0x2d0]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40f570
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40f570
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push str.extensions_
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2d4]
push 0x104
push ecx
call fcn.00442acd
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x40f5ce
push 0
lea ecx, [esp + 0x2d4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea esi, [esp + 0x10]
mov eax, ebp
call fcn.0040c490
mov eax, dword [eax]
test eax, eax
je 0x40f5e3
mov eax, dword [eax]
jmp 0x40f5e5
xor eax, eax
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f5e7
lea edi, [esp + 0x2d0]
sub eax, edx
add edi, 0xfffffffe
mov edi, edi
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40f600
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40f65c
lea edx, [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40f65c
test esi, esi
je 0x40f65c
mov eax, dword [esi]
test eax, eax
je 0x40f643
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
test eax, eax
je 0x40f653
push eax
call fcn.00422bf7
add esp, 4
push esi
call fcn.00422bf7
add esp, 4
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x2d0]
push eax
call fcn.00402410
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004424e7
add esp, 0x86c
ret 8