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

Disassembly:
mov eax, 0x1254
call fcn.006ab750
mov eax, dword [esp + 0x125c]
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push 0x1a
push 0
mov word [eax], 0
mov word [esp + 0x2c], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea edx, [esp + 0x18]
push edx
push str._sThunderbird
mov esi, 0x104
lea edi, [esp + 0x228]
call fcn.004af0d0
mov eax, edi
push eax
push str._sprofiles.ini
lea edi, [esp + 0x28]
call fcn.004af0d0
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0069c0de
mov ebp, eax
add esp, 0x14
mov eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
push eax
push esi
push ebp
mov dword [esp + 0x1c], ebp
call edi
cmp eax, 0x102
jb 0x540c52
jmp 0x540c10
push ebp
add esi, 0x104
call fcn.0069c8fa
xor ecx, ecx
add esp, 4
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0069c0de
add esp, 4
lea ecx, [esp + 0x18]
push ecx
push esi
push eax
mov dword [esp + 0x1c], eax
call edi
mov ebp, dword [esp + 0x10]
lea edx, [esi - 2]
cmp eax, edx
jae 0x540c10
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov word [esp + 0x630], 0
cmp word [ebp], 0
mov ebx, ebp
je 0x540cde
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea eax, [esp + 0x18]
push eax
push 0
push str.Default
push ebx
call esi
test eax, eax
jne 0x540cac
mov eax, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x540c90
sub eax, edx
sar eax, 1
cmp word [ebx + eax*2 + 2], cx
lea ebx, [ebx + eax*2 + 2]
jne 0x540c71
jmp 0x540cd3
lea ecx, [esp + 0x18]
push ecx
push 0x104
lea edx, [esp + 0x638]
push edx
push 0x6bc0cc
push str.Path
push ebx
call edi
test eax, eax
je 0x540f98
cmp word [esp + 0x630], 0
jne 0x540d49
cmp word [ebp], 0
mov ebx, ebp
je 0x540f98
jmp 0x540cf0
lea eax, [esp + 0x18]
push eax
push 0x104
lea ecx, [esp + 0x638]
push ecx
push 0x6bc0cc
push str.Path
push ebx
call edi
test eax, eax
jne 0x540d3a
mov eax, ebx
lea edx, [eax + 2]
jmp 0x540d20
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x540d20
sub eax, edx
sar eax, 1
cmp word [ebx + eax*2 + 2], cx
lea ebx, [ebx + eax*2 + 2]
jne 0x540cf0
cmp word [esp + 0x630], 0
je 0x540f98
lea edx, [esp + 0x630]
push edx
lea eax, [esp + 0x224]
push eax
push str._s_sprefs.js
mov esi, 0x104
lea edi, [esp + 0x24]
call fcn.004af0d0
add esp, 0xc
xor eax, eax
jmp 0x540d80
movzx ecx, word [esp + eax + 0x18]
mov word [esp + eax + 0x220], cx
add eax, 2
test cx, cx
jne 0x540d80
lea ecx, [esp + 0xc48]
push ecx
push str.mail.accountmanager.defaultaccount
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
cmp word [esp + 0xc48], 0
je 0x540f98
lea esi, [esp + 0xc48]
mov word [esp + 0x838], 0
jmp 0x540dd5
mov esi, dword [esp + 0x14]
cmp word [esi], 0
je 0x540ecb
lea edx, [esp + 0xe50]
push edx
mov eax, 0x2c
mov edx, esi
call fcn.0048ac80
cmp word [esi + eax*2], 0
je 0x540dfd
add eax, 1
cmp word [esp + 0xe50], 0
lea eax, [esi + eax*2]
mov dword [esp + 0x14], eax
je 0x540f82
lea ecx, [esp + 0xe50]
push ecx
push str.mail.account._s.identities
mov esi, 0x104
lea edi, [esp + 0x430]
call fcn.004af0d0
add esp, 8
lea edx, [esp + 0x1058]
push edx
mov eax, edi
push eax
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
lea ebp, [esp + 0x1058]
cmp word [ebp], 0
je 0x540f7e
lea ecx, [esp + 0x838]
push ecx
mov eax, 0x2c
mov edx, ebp
call fcn.0048ac80
cmp word [esp + 0x838], 0
lea ebp, [ebp + eax*2]
je 0x540eba
lea edx, [esp + 0x838]
push edx
push str.mail.identity._s.useremail
mov esi, 0x104
lea edi, [esp + 0x430]
call fcn.004af0d0
mov eax, dword [esp + 0x1274]
add esp, 8
push eax
mov ecx, edi
push ecx
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
mov edx, dword [esp + 0x126c]
cmp word [edx], 0
je 0x540e53
mov ebp, dword [esp + 0x10]
lea ecx, [esp + 0xa40]
push ecx
push str.mail.smtp.defaultserver
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
cmp word [esp + 0xa40], 0
jne 0x540f29
lea edx, [esp + 0x838]
push edx
push str.mail.identity._s.smtpServer
mov esi, 0x104
lea edi, [esp + 0x430]
call fcn.004af0d0
add esp, 8
lea eax, [esp + 0xa40]
push eax
mov ecx, edi
push ecx
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
lea edx, [esp + 0xa40]
push edx
push str.mail.smtpserver._s.hostname
mov esi, 0x104
lea edi, [esp + 0x430]
call fcn.004af0d0
mov eax, dword [esp + 0x1270]
add esp, 8
push eax
mov ecx, edi
push ecx
push ebx
lea ecx, [esp + 0x22c]
call fcn.005409f0
test al, al
je 0x540f98
push ebp
call fcn.0069c8fa
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1254
ret 8
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x126c]
cmp word [eax], 0
je 0x540dd1
jmp 0x540ecb
push ebp
call fcn.0069c8fa
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1254
ret 8