Function at 0x4a5fa0
Capabilities:
Read .ini file
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x572ee7
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x5d72e0]
xor eax, esp
mov dword [esp + 0x208], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d72e0]
xor eax, esp
push eax
lea eax, [esp + 0x220]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x230]
mov esi, ecx
mov dword [esp + 0x3c], ebp
push 0xff
lea eax, [esp + 0x121]
push 0
push eax
mov dword [esp + 0x234], 0
mov byte [esp + 0x128], 0
call fcn.00530d30
mov eax, dword [ebp]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
add esp, 0xc
push eax
push 0
push str.ButtonCount
push str.Personality
call ebx
mov edi, eax
mov eax, dword [ebp]
push eax
push 3
push str.ButtonImgCount
push str.Personality
mov dword [esp + 0x44], edi
call ebx
test edi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0
jg 0x4a60ba
mov eax, dword [esp + 0x234]
add eax, 0xfffffff0
mov dword [esp + 0x228], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6080
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x220]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.0053042b
add esp, 0x218
ret 8
mov ebp, dword [esp + 0x3c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
call fcn.00518333
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4a688e
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push str.Button_d
push edx
mov byte [esp + 0x234], 1
call fcn.004020e0
mov eax, dword [ebp]
mov edi, dword [esp + 0x24]
add esp, 0xc
push eax
push 0x100
lea eax, [esp + 0x124]
push eax
push 0x57e9e8
push str.ButtonImage
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [ebp]
push eax
push 0
push str.Action
push edi
call ebx
mov ebx, eax
mov eax, dword [ebp]
push eax
push 0
push str.XCoord
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ebp, dword [ebp]
mov ecx, dword [esp + 0x18]
push ebp
push 0
push str.YCoord
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test ebx, ebx
mov ebp, eax
jne 0x4a6306
push 1
lea edx, [esp + 0x120]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.004a83c0
mov ebx, eax
push 0x58e1b8
lea ecx, [esp + 0x244]
push ecx
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x240], 2
call fcn.00402100
push ebx
push eax
lea eax, [esp + 0x68]
push eax
mov byte [esp + 0x24c], 3
call fcn.004065f0
add esp, 0x24
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
lea ebx, [esi + 0x88]
mov ecx, ebx
mov byte [esp + 0x228], 4
call fcn.0051816f
mov edx, dword [esp + 0x14]
push 0
push edx
mov ecx, ebx
call fcn.004a3260
test eax, eax
mov eax, dword [esp + 0x48]
sete bl
add eax, 0xfffffff0
mov byte [esp + 0x228], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6209
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x228], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6231
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
mov byte [esp + 0x228], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6259
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4a6898
mov edx, dword [esi + 0x8c]
xor eax, eax
lea ecx, [esp + 0x5c]
push ecx
push 0x18
push edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esi + 0x8c]
mov ebx, dword [esp + 0x64]
xor eax, eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
lea eax, [esp + 0xd4]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0xd8]
cdq
idiv dword [esp + 0x1c]
mov ecx, edi
sub ecx, eax
mov dword [esi + 0xb8], ecx
mov dword [esi + 0xbc], ebp
lea eax, [ebx + ebp]
mov dword [esi + 0xc0], edi
mov dword [esi + 0xc4], eax
jmp 0x4a684c
cmp ebx, 2
jne 0x4a64c2
push 1
lea edx, [esp + 0x120]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.004a83c0
mov ebx, eax
push 0x58e1b8
lea ecx, [esp + 0x244]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0x240], 5
call fcn.00402100
push ebx
push eax
lea eax, [esp + 0x58]
push eax
mov byte [esp + 0x24c], 6
call fcn.004065f0
add esp, 0x24
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
lea ebx, [esi + 0x78]
mov ecx, ebx
mov byte [esp + 0x228], 7
call fcn.0051816f
mov edx, dword [esp + 0x14]
push 0
push edx
mov ecx, ebx
call fcn.004a3260
test eax, eax
mov eax, dword [esp + 0x38]
sete bl
add eax, 0xfffffff0
mov byte [esp + 0x228], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a63ae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
mov byte [esp + 0x228], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a63d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
mov byte [esp + 0x228], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a63fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4a6898
mov edx, dword [esi + 0x7c]
mov ebx, dword [sym.imp.GDI32.dll_GetObjectA]
xor eax, eax
lea ecx, [esp + 0xa4]
push ecx
push 0x18
push edx
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
call ebx
mov eax, dword [esp + 0xac]
mov edx, dword [esi + 0x7c]
lea ecx, [esp + 0x104]
push ecx
mov dword [esp + 0x18], eax
xor eax, eax
push 0x18
push edx
mov dword [esp + 0x110], eax
mov dword [esp + 0x114], eax
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], eax
mov dword [esp + 0x124], eax
call ebx
mov eax, dword [esp + 0x108]
cdq
idiv dword [esp + 0x1c]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0x98], ecx
mov dword [esi + 0x9c], ebp
add eax, ebp
mov dword [esi + 0xa0], edi
mov dword [esi + 0xa4], eax
jmp 0x4a684c
cmp ebx, 1
jne 0x4a684c
lea ebx, [esi + 0x80]
test ebx, ebx
je 0x4a64df
cmp dword [ebx + 4], 0
jne 0x4a6695
push 1
lea ecx, [esp + 0x120]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.004a83c0
mov dword [esp + 0x20], eax
push 0x58e1b8
lea eax, [esp + 0x244]
push eax
lea ecx, [esp + 0x68]
push ecx
mov byte [esp + 0x240], 8
call fcn.00402100
mov edx, dword [esp + 0x2c]
push edx
push eax
lea eax, [esp + 0x64]
push eax
mov byte [esp + 0x24c], 9
call fcn.004065f0
add esp, 0x24
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov ecx, ebx
mov byte [esp + 0x228], 0xa
call fcn.0051816f
mov edx, dword [esp + 0x14]
push 0
push edx
mov ecx, ebx
call fcn.004a3260
test eax, eax
mov eax, dword [esp + 0x44]
sete bl
add eax, 0xfffffff0
mov byte [esp + 0x228], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6581
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
mov byte [esp + 0x228], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a65a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x228], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a65d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4a6898
mov edx, dword [esi + 0x84]
mov ebx, dword [sym.imp.GDI32.dll_GetObjectA]
xor eax, eax
lea ecx, [esp + 0x74]
push ecx
push 0x18
push edx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
call ebx
mov eax, dword [esp + 0x7c]
mov edx, dword [esi + 0x84]
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x18], eax
xor eax, eax
push 0x18
push edx
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
call ebx
mov eax, dword [esp + 0x90]
cdq
idiv dword [esp + 0x1c]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0xa8], ecx
mov dword [esi + 0xac], ebp
add eax, ebp
mov dword [esi + 0xb0], edi
mov dword [esi + 0xb4], eax
jmp 0x4a684c
push 1
lea ecx, [esp + 0x120]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.004a83c0
mov ebx, eax
push 0x58e1b8
lea eax, [esp + 0x244]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov byte [esp + 0x240], 0xb
call fcn.00402100
push ebx
push eax
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x24c], 0xc
call fcn.004065f0
add esp, 0x24
mov eax, dword [eax]
lea ebx, [esi + 0x90]
mov ecx, ebx
mov byte [esp + 0x228], 0xd
mov dword [esp + 0x14], eax
call fcn.0051816f
mov ecx, dword [esp + 0x14]
push 0
push ecx
mov ecx, ebx
call fcn.004a3260
test eax, eax
mov eax, dword [esp + 0x40]
sete bl
add eax, 0xfffffff0
mov byte [esp + 0x228], 0xc
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a6737
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x228], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a675f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x228], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6787
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4a6898
mov edx, dword [esi + 0x94]
mov ebx, dword [sym.imp.GDI32.dll_GetObjectA]
xor eax, eax
lea ecx, [esp + 0xbc]
push ecx
push 0x18
push edx
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
call ebx
mov eax, dword [esp + 0xc4]
mov edx, dword [esi + 0x94]
lea ecx, [esp + 0xec]
push ecx
mov dword [esp + 0x18], eax
xor eax, eax
push 0x18
push edx
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x104], eax
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
call ebx
mov eax, dword [esp + 0xf0]
cdq
idiv dword [esp + 0x1c]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc8], ecx
mov dword [esi + 0xcc], ebp
add eax, ebp
mov dword [esi + 0xd0], edi
mov dword [esi + 0xd4], eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x228], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a6874
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 1
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x20], eax
jl 0x4a60b0
jmp 0x4a6052
push 0x80004005
call fcn.00401000
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x228], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a68c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x234]
add eax, 0xfffffff0
mov dword [esp + 0x228], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a68ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x4a6085