Function at 0x478120
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x260
mov eax, dword [0x4da6bc]
xor eax, esp
mov dword [esp + 0x25c], eax
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov eax, dword [ebx + 0xf4]
push 5
push eax
mov dword [esp + 0x20], ebx
call dword [sym.imp.USER32.dll_GetSubMenu]
mov ebp, eax
push ebp
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov edi, dword [sym.imp.USER32.dll_DeleteMenu]
mov esi, eax
dec esi
cmp esi, 8
jl 0x478173
push 0x400
push esi
push ebp
call edi
dec esi
cmp esi, 8
jge 0x478164
mov esi, dword [sym.imp.USER32.dll_GetMenuItemCount]
push ebp
call esi
dec eax
push eax
push ebp
call dword [sym.imp.USER32.dll_GetMenuItemID]
test eax, eax
jne 0x478196
push ebp
call esi
push 0x400
dec eax
push eax
push ebp
call edi
mov eax, dword [ebx + 0xf8]
push 0
push 0
push 0x431
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xe1e1e1
push eax
call dword [sym.imp.COMCTL32.dll_ImageList_SetBkColor]
call fcn.00403410
mov edx, dword [0x514540]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x514540
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov esi, 0x641
jmp 0x4781e0
push esi
mov ecx, ebx
call fcn.00470150
inc esi
cmp esi, 0x64a
jl 0x4781e0
xor ebx, ebx
push ebx
push str.Tool
lea ecx, [esp + 0x1c]
push str._s_d
push ecx
call fcn.00402950
mov esi, dword [esp + 0x24]
add esp, 0x10
push edi
push 0xbc614e
push str.Count
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esp + 0x1c], eax
cmp eax, 0xbc614e
jne 0x478232
mov dword [esp + 0x1c], ebx
mov eax, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
cmp eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
jle 0x47834c
mov edx, dword [esp + 0x10]
push edx
push 0
push str.Tool
lea eax, [esp + 0x20]
push str._s_d_d
push eax
call fcn.00402950
xor ecx, ecx
push 0x3e
push ecx
lea edx, [esp + 0x42]
push edx
mov word [esp + 0x44], cx
call fcn.0049e9f0
mov esi, dword [esp + 0x34]
add esp, 0x20
push edi
push 0x1f
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push esi
call ebx
cmp word [esp + 0x24], 0
je 0x47834c
cmp dword [esp + 0x20], 0
jne 0x4782b8
push 0
push 0
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
mov dword [esp + 0x20], 1
push edi
push 0x104
lea ecx, [esp + 0x6c]
push ecx
push 0
push str.Title
push esi
call ebx
test eax, eax
jbe 0x478329
cmp word [esp + 0x64], 0x2d
je 0x478329
mov eax, dword [esp + 0x10]
add eax, 0x641
lea edx, [esp + 0x64]
push edx
add eax, 0x6b07
push eax
push 0
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
push edi
push 0x104
lea eax, [esp + 0x6c]
push eax
push 0
push str.Icon
push esi
call ebx
test eax, eax
jbe 0x478339
mov eax, dword [esp + 0x10]
add eax, 0x641
push eax
lea ecx, [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.00470870
jmp 0x478339
push 0
push 0
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jl 0x478248
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x1fc]
cmp eax, 1
jb 0x4784ef
cmp eax, 9
ja 0x4784ef
push eax
push str.Tool
lea eax, [esp + 0x1c]
push str._s_d
push eax
call fcn.00402950
mov esi, dword [esp + 0x24]
add esp, 0x10
push edi
push 0xbc614e
push str.Count
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esp + 0x1c], eax
cmp eax, 0xbc614e
jne 0x4783ad
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
test eax, eax
jle 0x4784ef
mov dword [esp + 0x10], 0x641
jmp 0x4783d0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x1fc]
add ecx, 0xfffff9bf
push ecx
push eax
push str.Tool
lea ecx, [esp + 0x20]
push str._s_d_d
push ecx
call fcn.00402950
xor edx, edx
push 0x3e
push edx
lea eax, [esp + 0x42]
push eax
mov word [esp + 0x44], dx
call fcn.0049e9f0
mov esi, dword [esp + 0x34]
add esp, 0x20
push edi
push 0x1f
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push esi
call ebx
cmp word [esp + 0x24], 0
je 0x4784ef
cmp dword [esp + 0x20], 0
jne 0x47844f
push 0
push 0
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
mov dword [esp + 0x20], 1
push edi
push 0x104
lea edx, [esp + 0x6c]
push edx
push 0
push str.Title
push esi
call ebx
test eax, eax
jbe 0x4784c7
cmp word [esp + 0x64], 0x2d
je 0x4784c7
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x64]
push eax
add ecx, 0x6cfb
push ecx
push 0
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
push edi
push 0x104
lea edx, [esp + 0x6c]
push edx
push 0
push str.Icon
push esi
call ebx
test eax, eax
jbe 0x4784b7
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.00470870
jmp 0x4784d7
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push edx
call fcn.00470150
jmp 0x4784d7
push 0
push 0
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuW]
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
add eax, 0xfffff9bf
cmp eax, dword [esp + 0x1c]
jl 0x4783d0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0xf8]
push 0
push 0
push 0x431
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xffffffffffffffff
push eax
call dword [sym.imp.COMCTL32.dll_ImageList_SetBkColor]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0xf8]
push 1
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
add esi, 0xfffffff0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x478543
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov ecx, dword [esp + 0x26c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049e9d2
add esp, 0x260
ret