Function at 0x504040
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push edi
lea ebx, [esi + 0x3c]
push ebx
mov ecx, 0x53b7a8
call fcn.00466b30
lea eax, [esi + 0x4c]
push str.ToolBtn_BtnWnd
call fcn.004fcf00
mov eax, dword [ebx + 0x10]
xor edi, edi
cmp eax, edi
jne 0x504071
mov eax, 0x538640
mov dword [ebp - 0x14], edi
cmp dword [ebx + 8], edi
jle 0x50409f
cmp eax, edi
je 0x50409f
cmp word [eax], di
je 0x50409f
mov ecx, dword [ebx + 4]
cmp ecx, edi
jne 0x50408e
mov ecx, 0x538640
push ecx
push edi
push str.PosiX
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x10]
cmp eax, edi
jne 0x5040b1
mov eax, 0x538640
mov dword [ebp - 0x10], edi
cmp dword [ebx + 8], edi
jle 0x5040df
cmp eax, edi
je 0x5040df
cmp word [eax], di
je 0x5040df
mov ecx, dword [ebx + 4]
cmp ecx, edi
jne 0x5040ce
mov ecx, 0x538640
push ecx
push edi
push str.PosiY
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebx + 0x10]
cmp ecx, edi
jne 0x5040eb
mov ecx, 0x538640
cmp dword [ebx + 8], edi
jle 0x504116
test ecx, ecx
je 0x504116
cmp word [ecx], di
je 0x504116
mov eax, dword [ebx + 4]
test eax, eax
jne 0x504105
mov eax, 0x538640
push eax
push 0
push str.Width
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edi, eax
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jne 0x504122
mov ecx, 0x538640
cmp dword [ebx + 8], 0
mov dword [ebp - 4], 0
jle 0x504157
test ecx, ecx
je 0x504157
cmp word [ecx], 0
je 0x504157
mov eax, dword [ebx + 4]
test eax, eax
jne 0x504145
mov eax, 0x538640
push eax
push 0
push str.Height
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 4], eax
push str.ToolBtn_BtnPict
lea eax, [esi + 0x4c]
call fcn.004fcf00
mov eax, dword [ebx + 0x10]
mov ecx, eax
test eax, eax
jne 0x504172
mov ecx, 0x538640
cmp dword [ebx + 8], 0
mov dword [ebp - 8], 0
jle 0x5041a7
test ecx, ecx
je 0x5041a7
cmp word [ecx], 0
je 0x5041a7
mov eax, dword [ebx + 4]
test eax, eax
jne 0x504195
mov eax, 0x538640
push eax
push 0
push str.PosiX
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 8], eax
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jne 0x5041b3
mov ecx, 0x538640
cmp dword [ebx + 8], 0
mov dword [ebp - 0xc], 0
jle 0x5041e8
test ecx, ecx
je 0x5041e8
cmp word [ecx], 0
je 0x5041e8
mov eax, dword [ebx + 4]
test eax, eax
jne 0x5041d6
mov eax, 0x538640
push eax
push 0
push str.PosiY
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0xc], eax
mov ebx, dword [ebx + 0x10]
mov ecx, ebx
test ebx, ebx
jne 0x5041f6
mov ecx, 0x538640
xor ebx, ebx
cmp dword [esi + 0x44], ebx
jle 0x504223
test ecx, ecx
je 0x504223
cmp word [ecx], bx
je 0x504223
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x504212
mov eax, 0x538640
push eax
push 0
push str.Width
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ebx, eax
mov ecx, dword [esi + 0x4c]
test ecx, ecx
jne 0x50422f
mov ecx, 0x538640
xor eax, eax
cmp dword [esi + 0x44], eax
jle 0x50425a
test ecx, ecx
je 0x50425a
cmp word [ecx], ax
je 0x50425a
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x50424b
mov eax, 0x538640
push eax
push 0
push str.Height
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp byte [ebp + 0xc], 0
je 0x504384
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0x184], ecx
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x188], edx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x190], ecx
mov dword [esi + 0x18c], edi
mov ecx, dword [ebp - 8]
mov dword [esi + 0x2ac], ecx
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x2b0], ecx
mov byte [esi + 0x249], 1
mov dword [esi + 0x2b4], ebx
mov dword [esi + 0x2b8], eax
mov dword [esi + 0x2c4], ebx
mov dword [esi + 0x2c8], eax
xor ecx, ecx
mov dword [esi + 0x2bc], ecx
mov dword [esi + 0x2c0], ecx
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0x430], ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x43c], ecx
mov ecx, dword [ebp - 8]
mov dword [esi + 0x434], edx
mov dword [esi + 0x438], edi
mov dword [esi + 0x558], ecx
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x55c], ecx
mov byte [esi + 0x4f5], 1
mov dword [esi + 0x560], ebx
mov dword [esi + 0x564], eax
mov dword [esi + 0x570], ebx
mov dword [esi + 0x574], eax
xor ecx, ecx
mov dword [esi + 0x568], ecx
mov dword [esi + 0x56c], ecx
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0x6e0], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x6e8], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x6e4], edi
add ecx, edi
mov dword [esi + 0x6dc], ecx
mov dword [esi + 0x804], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x808], edx
xor edx, edx
mov byte [esi + 0x7a1], 1
mov dword [esi + 0x80c], ebx
mov dword [esi + 0x810], eax
mov dword [esi + 0x814], edx
mov dword [esi + 0x818], edx
mov dword [esi + 0x81c], ebx
mov dword [esi + 0x820], eax
add ecx, edi
jmp 0x50438d
cmp byte [ebp + 0x10], 0
mov ecx, dword [ebp - 0x18]
je 0x5043ec
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x98c], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x994], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x988], ecx
mov dword [esi + 0x990], edi
mov dword [esi + 0xab0], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0xab4], edx
xor edx, edx
mov byte [esi + 0xa4d], 1
mov dword [esi + 0xab8], ebx
mov dword [esi + 0xabc], eax
mov dword [esi + 0xac0], edx
mov dword [esi + 0xac4], edx
mov dword [esi + 0xac8], ebx
mov dword [esi + 0xacc], eax
add ecx, edi
mov edx, dword [ebp - 0x10]
mov dword [esi + 0xc38], edx
mov dword [esi + 0xc34], ecx
mov edx, dword [ebp - 4]
mov dword [esi + 0xc40], edx
mov dword [esi + 0xc3c], edi
mov edx, dword [ebp - 8]
mov dword [esi + 0xd5c], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0xd60], edx
mov byte [esi + 0xcf9], 1
mov dword [esi + 0xd64], ebx
mov dword [esi + 0xd68], eax
mov dword [esi + 0xd74], ebx
mov dword [esi + 0xd78], eax
xor edx, edx
mov dword [esi + 0xd6c], edx
mov dword [esi + 0xd70], edx
mov edx, dword [ebp - 0x10]
mov dword [esi + 0xee4], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0xeec], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0xee8], edi
add ecx, edi
mov dword [esi + 0xee0], ecx
mov dword [esi + 0x1008], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x100c], edx
mov byte [esi + 0xfa5], 1
mov dword [esi + 0x1010], ebx
mov dword [esi + 0x1014], eax
mov dword [esi + 0x1020], ebx
mov dword [esi + 0x1024], eax
xor edx, edx
mov dword [esi + 0x1018], edx
mov dword [esi + 0x101c], edx
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x1190], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x1198], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x1194], edi
add ecx, edi
mov dword [esi + 0x118c], ecx
mov dword [esi + 0x12b4], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x12b8], edx
xor edx, edx
add ecx, edi
mov byte [esi + 0x1251], 1
mov dword [esi + 0x12bc], ebx
mov dword [esi + 0x12c0], eax
mov dword [esi + 0x12c4], edx
mov dword [esi + 0x12c8], edx
mov dword [esi + 0x12cc], ebx
mov dword [esi + 0x12d0], eax
cmp byte [ebp + 0x14], dl
je 0x5045d0
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x143c], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x1444], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x1438], ecx
mov dword [esi + 0x1440], edi
mov dword [esi + 0x1560], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x1564], edx
mov byte [esi + 0x14fd], 1
mov dword [esi + 0x1568], ebx
mov dword [esi + 0x156c], eax
mov dword [esi + 0x1578], ebx
mov dword [esi + 0x157c], eax
xor edx, edx
mov dword [esi + 0x1570], edx
mov dword [esi + 0x1574], edx
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x16e8], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x16f0], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x16ec], edi
add ecx, edi
mov dword [esi + 0x16e4], ecx
mov dword [esi + 0x180c], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x1810], edx
xor edx, edx
mov byte [esi + 0x17a9], 1
mov dword [esi + 0x1814], ebx
mov dword [esi + 0x1818], eax
mov dword [esi + 0x181c], edx
mov dword [esi + 0x1820], edx
mov dword [esi + 0x1824], ebx
mov dword [esi + 0x1828], eax
add ecx, edi
cmp byte [ebp + 0x10], 0
je 0x504635
mov edx, dword [ebp - 0x10]
mov dword [esi + 0x1994], edx
mov edx, dword [ebp - 4]
mov dword [esi + 0x199c], edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x1990], ecx
mov dword [esi + 0x1998], edi
mov dword [esi + 0x1ab8], edx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x1abc], edx
xor edx, edx
mov byte [esi + 0x1a55], 1
mov dword [esi + 0x1ac0], ebx
mov dword [esi + 0x1ac4], eax
mov dword [esi + 0x1ac8], edx
mov dword [esi + 0x1acc], edx
mov dword [esi + 0x1ad0], ebx
mov dword [esi + 0x1ad4], eax
add ecx, edi
mov eax, dword [ebp + 8]
push eax
lea ebx, [esi + 0x1b3c]
mov eax, ecx
call fcn.00502f60
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x10