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

Disassembly:
push 0xffffffffffffffff
push 0x4f7499
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x448
mov eax, dword [0x52bd18]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x468]
mov dword [esp + 0x454], eax
lea eax, [esp + 0x20]
push edi
xor ebx, ebx
push eax
mov esi, ecx
mov dword [esp + 0x1c], ebx
call fcn.00477e00
add esp, 8
cmp dword [esi + 0x154], ebx
mov dword [esp + 0x460], ebx
je 0x475dd9
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x460], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47724f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x47724f
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push 0x503064
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x475e6d
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x478], 1
mov dword [esp + 0x2c], 1
call fcn.00409450
add esp, 0x18
mov ebp, dword [eax]
lea ebx, [esi + 0x30]
mov ecx, ebx
mov dword [esp + 0x460], 2
mov dword [esp + 0x14], 3
call fcn.004e72e3
push 0
push ebp
mov ecx, ebx
call fcn.00461210
test eax, eax
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x13], 0
jne 0x475e72
mov byte [esp + 0x13], 1
test bl, 2
mov dword [esp + 0x460], 1
je 0x475ea7
mov eax, dword [esp + 0x2c]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475ea7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, 1
mov dword [esp + 0x460], 0
je 0x475edc
mov eax, dword [esp + 0x30]
and ebx, 0xfffffffe
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475edc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, byte [esp + 0x13]
test al, al
jne 0x476adb
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.Left
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x475f7e
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x44]
or ebx, 4
push edx
mov byte [esp + 0x478], 3
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
lea ebp, [esi + 0x78]
or ebx, 8
mov ecx, ebp
mov dword [esp + 0x460], 4
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], eax
call fcn.004e72e3
mov ecx, dword [esp + 0x2c]
push 0
push ecx
mov ecx, ebp
call fcn.00461210
test eax, eax
mov byte [esp + 0x13], 0
jne 0x475f83
mov byte [esp + 0x13], 1
test bl, 8
mov dword [esp + 0x460], 3
je 0x475fb8
mov eax, dword [esp + 0x30]
and ebx, 0xfffffff7
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x475fb8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, 4
mov dword [esp + 0x460], 0
je 0x475fed
mov eax, dword [esp + 0x44]
and ebx, 0xfffffffb
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475fed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, byte [esp + 0x13]
test al, al
jne 0x476adb
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.Right
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x476092
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x44]
or ebx, 0x10
push edx
mov byte [esp + 0x478], 5
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
lea ebp, [esi + 0x80]
or ebx, 0x20
mov ecx, ebp
mov dword [esp + 0x460], 6
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], eax
call fcn.004e72e3
mov ecx, dword [esp + 0x2c]
push 0
push ecx
mov ecx, ebp
call fcn.00461210
test eax, eax
mov byte [esp + 0x13], 0
jne 0x476097
mov byte [esp + 0x13], 1
test bl, 0x20
mov dword [esp + 0x460], 5
je 0x4760cc
mov eax, dword [esp + 0x30]
and ebx, 0xffffffdf
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4760cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, 0x10
mov dword [esp + 0x460], 0
je 0x476101
mov eax, dword [esp + 0x44]
and ebx, 0xffffffef
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476101
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, byte [esp + 0x13]
test al, al
jne 0x476adb
mov ecx, dword [str.Personality]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.Bottom
push ecx
call ebp
mov al, byte [esp + 0x6c]
test al, al
je 0x476198
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x40]
or ebx, 0x40
push edx
mov byte [esp + 0x478], 7
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
or ebx, 0x80
push eax
lea ecx, [esi + 0x88]
mov dword [esp + 0x464], 8
mov dword [esp + 0x18], ebx
call fcn.0040fd40
test eax, eax
mov byte [esp + 0x13], 0
jne 0x47619d
mov byte [esp + 0x13], 1
test bl, bl
jns 0x4761b4
and ebx, 0xffffff7f
lea ecx, [esp + 0x2c]
mov dword [esp + 0x14], ebx
call fcn.00401580
test bl, 0x40
mov dword [esp + 0x460], 0
je 0x4761d4
and ebx, 0xffffffbf
lea ecx, [esp + 0x30]
mov dword [esp + 0x14], ebx
call fcn.00401580
mov al, byte [esp + 0x13]
test al, al
jne 0x4770ec
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.Background
push ecx
call ebp
mov al, byte [esp + 0x6c]
test al, al
je 0x47625f
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x478], 9
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
push eax
lea ecx, [esi + 0x20]
mov byte [esp + 0x464], 0xa
call fcn.0040fd40
lea ecx, [esp + 0x2c]
call fcn.00401580
lea ecx, [esp + 0x30]
mov byte [esp + 0x460], 0
call fcn.00401580
lea ebx, [esi + 0x30]
mov ecx, ebx
call fcn.0041e3b0
cdq
sub eax, edx
sar eax, 1
lea ecx, [esi + 0x78]
mov dword [esi + 0x12c], eax
call fcn.0041e360
cdq
sub eax, edx
sar eax, 1
lea ecx, [esi + 0x80]
mov dword [esi + 0x130], eax
call fcn.0041e360
cdq
sub eax, edx
sar eax, 1
lea ecx, [esi + 0x88]
mov dword [esi + 0x134], eax
call fcn.0041e3b0
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cdq
sub eax, edx
push edi
sar eax, 1
push 0
mov dword [esi + 0x138], eax
mov eax, dword [str.Personality]
push str.TitleLeft
push eax
call ebp
mov ecx, dword [str.Personality]
push edi
push 0
push str.TitleRight
push ecx
mov dword [esi + 0x9c], eax
call ebp
mov ecx, ebx
mov dword [esp + 0x2c], eax
call fcn.0041e360
mov ecx, dword [esp + 0x2c]
sub eax, ecx
mov ecx, dword [esi + 0x9c]
cmp eax, ecx
mov dword [esi + 0xa0], eax
jg 0x476308
inc ecx
mov dword [esi + 0xa0], ecx
mov edx, dword [str.Personality]
push edi
push 0
push str.LeftTopHeight
push edx
call ebp
push edi
push 0
mov dword [esi + 0xa4], eax
mov eax, dword [str.Personality]
push str.LeftBotHeight
push eax
call ebp
lea ecx, [esi + 0x78]
mov ebx, eax
call fcn.0041e3b0
mov ecx, dword [esi + 0xa4]
sub eax, ebx
cmp eax, ecx
mov dword [esi + 0xa8], eax
jg 0x476352
inc ecx
mov dword [esi + 0xa8], ecx
mov ecx, dword [str.Personality]
push edi
push 0
push str.RightTopHeight
push ecx
call ebp
mov edx, dword [str.Personality]
push edi
push 0
push str.RightBotHeight
push edx
mov dword [esi + 0xac], eax
call ebp
lea ecx, [esi + 0x80]
mov ebx, eax
call fcn.0041e3b0
mov ecx, dword [esi + 0xac]
sub eax, ebx
cmp eax, ecx
mov dword [esi + 0xb0], eax
jg 0x4763a0
inc ecx
mov dword [esi + 0xb0], ecx
mov eax, dword [str.Personality]
push edi
push 0
push str.BottomLeft
push eax
call ebp
mov ecx, dword [str.Personality]
push edi
push 0
push str.BottomRight
push ecx
mov dword [esi + 0xb4], eax
call ebp
lea ecx, [esi + 0x88]
mov ebx, eax
call fcn.0041e360
mov ecx, dword [esi + 0xb4]
sub eax, ebx
cmp eax, ecx
mov dword [esi + 0xb8], eax
jg 0x4763ed
inc ecx
mov dword [esi + 0xb8], ecx
mov edx, dword [str.Personality]
push edi
push 0
push str.ButtonCount
push edx
call ebp
push edi
push 3
mov ebx, eax
mov eax, dword [str.Personality]
push str.ButtonImgCount
push eax
mov dword [esp + 0x44], ebx
call ebp
test ebx, ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x2c], 0
jle 0x4767f5
call fcn.004df219
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push str.Button_d
push ecx
mov byte [esp + 0x46c], 0xb
call fcn.00401c40
mov ebx, dword [esp + 0x48]
add esp, 0xc
push edi
push 0x3e8
lea edx, [esp + 0x74]
push edx
push 0x4fca4e
push str.ButtonImage
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push 0
push str.Action
push ebx
call ebp
push edi
push 0
mov ebx, eax
mov eax, dword [esp + 0x44]
push str.XCoord
push eax
call ebp
mov ecx, dword [esp + 0x3c]
push edi
push 0
push str.YCoord
push ecx
mov dword [esp + 0x40], eax
call ebp
test ebx, ebx
mov dword [esp + 0x40], eax
jne 0x476596
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x74]
push edx
mov byte [esp + 0x478], 0xc
call fcn.00409450
add esp, 0x18
mov ebx, dword [eax]
lea ecx, [esi + 0xcc]
mov byte [esp + 0x460], 0xd
call fcn.004e72e3
push 0
push ebx
lea ecx, [esi + 0xcc]
call fcn.00461210
mov ebx, eax
mov eax, dword [esp + 0x60]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
mov byte [esp + 0x460], 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476532
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
mov byte [esp + 0x460], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476558
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
jne 0x476b0b
lea ecx, [esi + 0xcc]
call fcn.0041e3b0
mov ebx, eax
mov eax, dword [esp + 0x40]
lea ecx, [esi + 0xcc]
add ebx, eax
call fcn.0041e360
cdq
idiv dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov ecx, edx
sub ecx, eax
lea eax, [esi + 0xfc]
jmp 0x4767ab
cmp ebx, 2
jne 0x47664e
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x478], 0xe
call fcn.00409450
add esp, 0x18
mov ebx, dword [eax]
lea ecx, [esi + 0xbc]
mov byte [esp + 0x460], 0xf
call fcn.004e72e3
push 0
push ebx
lea ecx, [esi + 0xbc]
call fcn.00461210
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [esp + 0x4c]
inc bl
call fcn.00401580
lea ecx, [esp + 0x5c]
mov byte [esp + 0x460], 0xb
call fcn.00401580
test bl, bl
jne 0x476b0b
lea ecx, [esi + 0xbc]
call fcn.0041e3b0
mov ebx, eax
mov eax, dword [esp + 0x40]
lea ecx, [esi + 0xbc]
add ebx, eax
call fcn.0041e360
cdq
idiv dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov ecx, edx
sub ecx, eax
lea eax, [esi + 0xdc]
jmp 0x4767ab
cmp ebx, 1
jne 0x4767ba
lea eax, [esi + 0xc4]
test eax, eax
je 0x47666c
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x47670e
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x60]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x478], 0x10
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
push eax
lea ecx, [esi + 0xc4]
mov byte [esp + 0x464], 0x11
call fcn.0040fd40
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [esp + 0x50]
inc bl
call fcn.00401580
lea ecx, [esp + 0x58]
mov byte [esp + 0x460], 0xb
call fcn.00401580
test bl, bl
jne 0x476b0b
lea ecx, [esi + 0xc4]
call fcn.0041e3b0
mov ebx, eax
mov eax, dword [esp + 0x40]
lea ecx, [esi + 0xc4]
add ebx, eax
call fcn.0041e360
cdq
idiv dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov ecx, edx
sub ecx, eax
lea eax, [esi + 0xec]
jmp 0x4767ab
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x5c]
push edx
mov byte [esp + 0x478], 0x12
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
lea ecx, [esi + 0xd4]
push eax
mov byte [esp + 0x464], 0x13
call fcn.0040fd40
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [esp + 0x48]
inc bl
call fcn.00401580
lea ecx, [esp + 0x38]
mov byte [esp + 0x460], 0xb
call fcn.00401580
test bl, bl
jne 0x476b0b
lea ecx, [esi + 0xd4]
call fcn.0041e3b0
mov ebx, eax
mov eax, dword [esp + 0x40]
lea ecx, [esi + 0xd4]
add ebx, eax
call fcn.0041e360
cdq
idiv dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov ecx, edx
sub ecx, eax
lea eax, [esi + 0x10c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x460], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4767e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x476428
mov eax, dword [str.Personality]
mov ebx, dword [esp + 0x14]
push edi
push 0
push str.TextShift
push eax
call ebp
mov ecx, dword [str.Personality]
push edi
push 0
push str.TextShiftVert
push ecx
mov dword [esi + 0x13c], eax
call ebp
push 9
mov dword [esi + 0x140], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push str.TitleText
mov byte [esp + 0x470], 0x14
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push str.Colours
mov byte [esp + 0x474], 0x15
call fcn.00401fd0
mov byte [esp + 0x470], 0
call fcn.004750e0
add esp, 0x10
push 9
mov dword [esi + 0x144], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push str.InactiveTitleText
mov byte [esp + 0x470], 0x16
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push str.Colours
mov byte [esp + 0x474], 0x17
call fcn.00401fd0
mov byte [esp + 0x470], 0
call fcn.004750e0
mov edx, dword [str.Personality]
add esp, 0x10
push edi
push 0
push str.UsesTran
push edx
mov dword [esi + 0x148], eax
call ebp
test eax, eax
mov dword [esi + 0x150], eax
je 0x476957
push 0xff00ff
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push str.TransColor
mov byte [esp + 0x470], 0x18
call fcn.00401fd0
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push str.Colours
mov byte [esp + 0x474], 0x19
call fcn.00401fd0
mov byte [esp + 0x470], 0
call fcn.004750e0
add esp, 0x10
mov dword [esi + 0x14c], eax
lea ecx, [esp + 0x64]
mov dword [esi + 0x154], 1
call fcn.004630c0
xor ecx, ecx
mov eax, vtable.CRgn.0
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.LeftMask
push ecx
mov byte [esp + 0x478], 0x1c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x476a1e
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x48]
or ebx, 0x100
push edx
mov byte [esp + 0x478], 0x1d
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov ebp, dword [eax]
or ebx, 0x200
lea ecx, [esp + 0x64]
mov dword [esp + 0x460], 0x1e
mov dword [esp + 0x14], ebx
call fcn.004e72e3
push 0
push ebp
lea ecx, [esp + 0x6c]
call fcn.00461210
test eax, eax
mov byte [esp + 0x13], 0
jne 0x476a23
mov byte [esp + 0x13], 1
test bh, 2
mov dword [esp + 0x460], 0x1d
je 0x476a5b
mov eax, dword [esp + 0x34]
and ebx, 0xfffffdff
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476a5b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bh, 1
mov dword [esp + 0x460], 0x1c
je 0x476a8f
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
and ebx, 0xfffffeff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476a8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, byte [esp + 0x13]
test al, al
je 0x476b24
mov esi, vtable.CGdiObject.0
lea ecx, [esp + 0x24]
mov byte [esp + 0x460], 0x1b
mov dword [esp + 0x24], esi
call fcn.004e72e3
lea ecx, [esp + 0x18]
mov byte [esp + 0x460], 0x1a
mov dword [esp + 0x18], esi
call fcn.004e72e3
lea ecx, [esp + 0x64]
mov byte [esp + 0x460], 0
call fcn.004630e0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x460], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x476b04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x477254
lea ecx, [esp + 0x3c]
call fcn.00401580
lea ecx, [esp + 0x20]
call fcn.00401580
xor eax, eax
jmp 0x477254
lea ecx, [esp + 0x64]
call fcn.0041e3b0
lea ecx, [esp + 0x64]
mov ebp, eax
call fcn.0041e360
mov ecx, dword [esi + 0xa4]
push ebp
push eax
push ecx
push 0
call dword [sym.imp.GDI32.dll_CreateRectRgn]
push eax
lea ecx, [esp + 0x28]
call fcn.004e728c
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
mov eax, dword [esp + 0x28]
mov ebp, dword [sym.imp.GDI32.dll_CombineRgn]
push 2
push eax
mov eax, dword [esp + 0x24]
push eax
push eax
call ebp
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
push 3
push ecx
push eax
push eax
call ebp
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x38]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov edx, dword [esi + 0xa8]
lea ecx, [esp + 0x64]
mov dword [esp + 0x34], edx
call fcn.0041e360
mov ecx, dword [esp + 0x34]
push ecx
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateRectRgn]
push eax
lea ecx, [esp + 0x28]
call fcn.004e728c
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
push 2
push edx
push eax
push eax
call ebp
mov eax, dword [esp + 0x28]
push 3
push eax
mov eax, dword [esp + 0x24]
push eax
push eax
call ebp
mov eax, dword [esi + 0xa8]
mov ecx, dword [esp + 0x1c]
neg eax
push eax
push 0
push ecx
mov ebp, dword [sym.imp.GDI32.dll_OffsetRgn]
call ebp
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x40]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov eax, dword [str.Personality]
push edi
push 0x3e8
lea edx, [esp + 0x74]
push edx
push 0x4fca4e
push str.RightMask
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x476cc3
push 1
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00477eb0
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x48]
or ebx, 0x400
push ecx
mov byte [esp + 0x478], 0x1f
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
or ebx, 0x800
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x464], 0x20
mov dword [esp + 0x18], ebx
call fcn.0040fd40
test eax, eax
mov byte [esp + 0x13], 0
jne 0x476cc8
mov byte [esp + 0x13], 1
test bh, 8
je 0x476cdc
lea ecx, [esp + 0x34]
and ebx, 0xfffff7ff
call fcn.00401580
test bh, 4
mov dword [esp + 0x460], 0x1c
je 0x476cfb
lea ecx, [esp + 0x38]
and ebx, 0xfffffbff
call fcn.00401580
mov al, byte [esp + 0x13]
test al, al
jne 0x4770ac
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
lea ecx, [esp + 0x64]
call fcn.0041e3b0
push eax
lea ecx, [esp + 0x68]
call fcn.0041e360
mov edx, dword [esi + 0xac]
push eax
push edx
push 0
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 2
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x24]
call fcn.0043edf0
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x48]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov ecx, dword [esi + 0xb0]
push ecx
lea ecx, [esp + 0x68]
call fcn.0041e360
push eax
push 0
push 0
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
push 2
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x24]
call fcn.0043edf0
mov eax, dword [esi + 0xb0]
neg eax
push eax
mov eax, dword [esp + 0x20]
push 0
push eax
call ebp
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x50]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov edx, dword [str.Personality]
push edi
push 0x3e8
lea ecx, [esp + 0x74]
push ecx
push 0x4fca4e
push str.TopMask
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x476e9b
push 1
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00477eb0
push eax
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x48]
or ebx, 0x1000
push eax
mov byte [esp + 0x478], 0x21
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
or ebx, 0x2000
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x464], 0x22
mov dword [esp + 0x18], ebx
call fcn.0040fd40
test eax, eax
mov byte [esp + 0x13], 0
jne 0x476ea0
mov byte [esp + 0x13], 1
test bh, 0x20
je 0x476eb4
lea ecx, [esp + 0x34]
and ebx, 0xffffdfff
call fcn.00401580
test bh, 0x10
mov dword [esp + 0x460], 0x1c
je 0x476ed3
lea ecx, [esp + 0x38]
and ebx, 0xffffefff
call fcn.00401580
mov al, byte [esp + 0x13]
test al, al
jne 0x4770ac
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
lea ecx, [esp + 0x64]
call fcn.0041e3b0
push eax
lea ecx, [esp + 0x68]
call fcn.0041e360
mov ecx, dword [esi + 0x9c]
push eax
push 0
push ecx
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 2
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x24]
call fcn.0043edf0
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x58]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
lea ecx, [esp + 0x64]
call fcn.0041e3b0
push eax
mov eax, dword [esi + 0xa0]
push eax
push 0
push 0
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
push 2
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x24]
call fcn.0043edf0
mov eax, dword [esi + 0xa0]
mov edx, dword [esp + 0x1c]
push 0
neg eax
push eax
push edx
call ebp
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x60]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov ecx, dword [str.Personality]
push edi
push 0x3e8
lea eax, [esp + 0x74]
push eax
push 0x4fca4e
push str.BottomMask
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0x6c]
test al, al
je 0x477073
push 1
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00477eb0
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x48]
or ebx, 0x4000
push edx
mov byte [esp + 0x478], 0x23
mov dword [esp + 0x2c], ebx
call fcn.00409450
add esp, 0x18
mov eax, dword [eax]
or ebx, 0x8000
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x464], 0x24
mov dword [esp + 0x18], ebx
call fcn.0040fd40
test eax, eax
mov byte [esp + 0x13], 0
jne 0x477078
mov byte [esp + 0x13], 1
test bh, bh
jns 0x47708b
lea ecx, [esp + 0x34]
and ebx, 0xffff7fff
call fcn.00401580
test bh, 0x40
mov dword [esp + 0x460], 0x1c
je 0x4770a4
lea ecx, [esp + 0x38]
call fcn.00401580
mov al, byte [esp + 0x13]
test al, al
je 0x4770fc
mov esi, vtable.CGdiObject.0
lea ecx, [esp + 0x24]
mov byte [esp + 0x460], 0x1b
mov dword [esp + 0x24], esi
call fcn.004e72e3
lea ecx, [esp + 0x18]
mov byte [esp + 0x460], 0x1a
mov dword [esp + 0x18], esi
call fcn.004e72e3
lea ecx, [esp + 0x64]
mov byte [esp + 0x460], 0
call fcn.004630e0
lea ecx, [esp + 0x20]
call fcn.00401580
xor eax, eax
jmp 0x477254
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
lea ecx, [esp + 0x64]
call fcn.0041e3b0
push eax
lea ecx, [esp + 0x68]
call fcn.0041e360
push eax
mov eax, dword [esi + 0xb4]
push 0
push eax
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 2
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x24]
call fcn.0043edf0
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x68]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
lea ecx, [esp + 0x64]
call fcn.0041e3b0
mov edx, dword [esi + 0xb8]
push eax
push edx
push 0
push 0
lea ecx, [esp + 0x34]
call fcn.0043edc0
push 0
lea ecx, [esp + 0x68]
call fcn.004635d0
push eax
lea ecx, [esp + 0x1c]
call fcn.004e728c
push 2
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x24]
call fcn.0043edf0
push 3
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x24]
call fcn.0043edf0
mov eax, dword [esi + 0xb8]
mov ecx, dword [esp + 0x1c]
push 0
neg eax
push eax
push ecx
call ebp
lea ecx, [esp + 0x18]
call fcn.004e72b9
push eax
lea ecx, [esi + 0x70]
call fcn.004e728c
lea ecx, [esp + 0x24]
call fcn.004e72e3
mov esi, vtable.CGdiObject.0
lea ecx, [esp + 0x24]
mov byte [esp + 0x460], 0x1b
mov dword [esp + 0x24], esi
call fcn.004e72e3
lea ecx, [esp + 0x18]
mov byte [esp + 0x460], 0x1a
mov dword [esp + 0x18], esi
call fcn.004e72e3
lea ecx, [esp + 0x64]
mov byte [esp + 0x460], 0
call fcn.004630e0
lea ecx, [esp + 0x20]
call fcn.00401580
mov eax, 1
mov ecx, dword [esp + 0x458]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x454]
call fcn.004ce183
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x454
ret 4