Function at 0x403840
Capabilities:
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4dc298
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esi + 0x80]
test ecx, ecx
je 0x403874
mov eax, dword [ecx + 4]
test eax, eax
je 0x403874
call fcn.004bf0dd
lea edi, [esi + 0x88]
test edi, edi
je 0x40388c
mov eax, dword [edi + 4]
test eax, eax
je 0x40388c
mov ecx, edi
call fcn.004bf0dd
lea ecx, [esi + 0x90]
test ecx, ecx
je 0x4038a2
mov eax, dword [ecx + 4]
test eax, eax
je 0x4038a2
call fcn.004bf0dd
mov ecx, esi
call fcn.004c4cb1
mov ebp, eax
mov eax, dword [0x52251c]
not ebp
shr ebp, 1
and ebp, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], 0
mov eax, str.TabNormal.bmp
jne 0x4038cf
mov eax, str.TabNormalBottom.bmp
push eax
lea ecx, [esp + 0x18]
call fcn.004c5910
test ebp, ebp
jne 0x403992
mov ecx, dword [0x52790c]
lea edx, [esp + 0x18]
add ecx, 0x6f4
push ecx
push 0x527044
push edx
call fcn.004c59b6
push ecx
mov byte [esp + 0x30], 1
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x51c2e4
push eax
push ecx
call fcn.004c5a1c
call fcn.004156a0
add esp, 4
lea ecx, [esp + 0x18]
test eax, eax
sete bl
mov byte [esp + 0x2c], 0
call fcn.004c5787
test bl, bl
je 0x403992
mov edx, dword [0x52790c]
lea eax, [esp + 0x18]
add edx, 0x6f4
push edx
push 0x527044
push eax
call fcn.004c59b6
push ecx
mov byte [esp + 0x30], 2
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x51c2d4
push eax
push ecx
call fcn.004c5a1c
call fcn.004156a0
add esp, 4
lea ecx, [esp + 0x18]
mov ebx, eax
mov byte [esp + 0x2c], 0
call fcn.004c5787
test ebx, ebx
je 0x403992
push str.TabNormal.bmp
lea ecx, [esp + 0x18]
call fcn.004c5910
push 1
push 3
push 0x21
push 0x14
push 0x1e
mov ecx, edi
call fcn.004bf126
mov edx, dword [esp + 0x14]
mov ecx, dword [0x52790c]
push 0
push edx
call fcn.0046e1d0
mov edi, eax
test edi, edi
jne 0x4039df
call fcn.004d72f1
mov ecx, ebp
mov eax, dword [eax + 8]
neg ecx
sbb ecx, ecx
add ecx, 0x151
and ecx, 0xffff
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
mov edi, eax
lea eax, [esi + 0x88]
test eax, eax
je 0x4039ec
mov eax, dword [eax + 4]
mov ebx, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
push 0xff00ff
push edi
push eax
call ebx
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push 1
push 2
push 0x21
push 0x10
push 0x10
lea ecx, [esi + 0x90]
call fcn.004bf126
mov ecx, dword [0x52790c]
push 0
push str.TabClose.bmp
call fcn.0046e1d0
mov edi, eax
test edi, edi
jne 0x403a45
call fcn.004d72f1
mov eax, dword [eax + 8]
push 0x154
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
mov edi, eax
lea eax, [esi + 0x90]
test eax, eax
je 0x403a52
mov eax, dword [eax + 4]
push 0xff00ff
push edi
push eax
call ebx
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
test ebp, ebp
mov eax, str.TabActive.bmp
jne 0x403a70
mov eax, str.TabActiveBottom.bmp
push eax
lea ecx, [esp + 0x18]
call fcn.004c5910
test ebp, ebp
jne 0x403b39
mov edx, dword [0x52790c]
lea eax, [esp + 0x18]
add edx, 0x6f4
push edx
push 0x527044
push eax
call fcn.004c59b6
push ecx
mov byte [esp + 0x30], 3
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x51c288
push eax
push ecx
call fcn.004c5a1c
call fcn.004156a0
add esp, 4
lea ecx, [esp + 0x18]
test eax, eax
sete byte [esp + 0x13]
mov byte [esp + 0x2c], 0
call fcn.004c5787
mov al, byte [esp + 0x13]
test al, al
je 0x403b39
mov edx, dword [0x52790c]
lea eax, [esp + 0x18]
add edx, 0x6f4
push edx
push 0x527044
push eax
call fcn.004c59b6
push ecx
mov byte [esp + 0x30], 4
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x51c278
push eax
push ecx
call fcn.004c5a1c
call fcn.004156a0
add esp, 4
lea ecx, [esp + 0x18]
mov edi, eax
mov byte [esp + 0x2c], 0
call fcn.004c5787
test edi, edi
je 0x403b39
push str.TabActive.bmp
lea ecx, [esp + 0x18]
call fcn.004c5910
push 1
push 3
push 0x21
push 0x14
push 0x1e
lea ecx, [esi + 0x80]
call fcn.004bf126
mov edx, dword [esp + 0x14]
mov ecx, dword [0x52790c]
push 0
push edx
call fcn.0046e1d0
mov edi, eax
test edi, edi
jne 0x403b8a
call fcn.004d72f1
mov ecx, ebp
mov eax, dword [eax + 8]
neg ecx
sbb ecx, ecx
add ecx, 0x153
and ecx, 0xffff
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
mov edi, eax
lea eax, [esi + 0x80]
test eax, eax
je 0x403b97
mov eax, dword [eax + 4]
push 0xff00ff
push edi
push eax
call ebx
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push 3
push str.IconLeftOffset
push 0x51c264
mov ecx, 0x526f48
call fcn.004d7819
push 1
push str.TextRightOffset
push 0x51c264
mov ecx, 0x526f48
mov dword [esi + 0x40], eax
call fcn.004d7819
test ebp, ebp
mov dword [esi + 0x44], eax
mov ebx, 5
je 0x403c03
push 3
push str.IconTopOffset
push 0x51c264
mov ecx, 0x526f48
call fcn.004d7819
push ebx
mov dword [esi + 0x48], eax
push str.TextTopOffset
jmp 0x403c23
push 1
push str.IconTopOffsetBottom
push 0x51c264
mov ecx, 0x526f48
call fcn.004d7819
push 4
mov dword [esi + 0x48], eax
push str.TextTopOffsetBottom
push 0x51c264
mov ecx, 0x526f48
call fcn.004d7819
push 0x804000
push str.ActiveTextColor
push 0x51c264
mov ecx, 0x526f48
mov dword [esi + 0x4c], eax
call fcn.004d7819
push 0x11
mov dword [esi + 0x50], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push str.NormalTextColor
push 0x51c264
mov ecx, 0x526f48
call fcn.004d7819
push 0xbe6a32
push str.UnReadTextColor
push 0x51c264
mov ecx, 0x526f48
mov dword [esi + 0x54], eax
call fcn.004d7819
push 0
push str.ActiveTextBold
push 0x51c264
mov ecx, 0x526f48
mov dword [esi + 0x58], eax
call fcn.004d7819
mov dword [esi + 0x3c], eax
mov edx, dword [0x52790c]
add edx, 0x6f4
lea eax, [esp + 0x1c]
push edx
push 0x527044
push eax
call fcn.004c59b6
push str.Skin.ini
lea ecx, [esp + 0x1c]
push eax
push ecx
mov byte [esp + 0x38], bl
call fcn.004c5a1c
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 6
call fcn.004c58c0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], bl
call fcn.004c5787
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 0
call fcn.004c5787
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call fcn.004c54fc
call fcn.004156a0
add esp, 4
test eax, eax
je 0x403e13
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
push ecx
push str.IconLeftOffset
push 0x51c264
call edi
mov edx, dword [esp + 0x14]
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x44]
push edx
push eax
push str.TextRightOffset
push 0x51c264
call edi
test ebp, ebp
mov dword [esi + 0x44], eax
je 0x403d83
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x48]
push ecx
push edx
push str.IconTopOffset
push 0x51c264
call edi
mov ecx, dword [esi + 0x4c]
mov dword [esi + 0x48], eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.TextTopOffset
jmp 0x403da9
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x48]
push edx
push eax
push str.IconTopOffsetBottom
push 0x51c264
call edi
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x4c]
push ecx
push edx
mov dword [esi + 0x48], eax
push str.TextTopOffsetBottom
push 0x51c264
call edi
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.ActiveTextColor
push 0x51c264
call edi
mov edx, dword [esp + 0x14]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x54]
push edx
push eax
push str.NormalTextColor
push 0x51c264
call edi
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x58]
push ecx
push edx
push str.UnReadTextColor
push 0x51c264
mov dword [esi + 0x54], eax
call edi
mov ecx, dword [esi + 0x3c]
mov dword [esi + 0x58], eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.ActiveTextBold
push 0x51c264
call edi
mov dword [esi + 0x3c], eax
mov eax, dword [0x52790c]
cmp dword [eax + 0x258], 3
jl 0x403e2f
mov ecx, dword [eax + 0x100]
test ecx, ecx
je 0x403e2f
add dword [esi + 0x4c], 0xfffffffe
mov edx, dword [esi + 0x3c]
push 0
neg edx
sbb edx, edx
push 0
and edx, 0xc8
push 0x190
push 0
add edx, 0x190
push 0
push edx
mov ecx, esi
call fcn.00404b70
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004c5787
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret