Function at 0x497170
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x50c0ef
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x26c
push ebp
push esi
mov esi, ecx
push edi
push esi
lea ecx, [esp + 0xbc]
call fcn.00505d9c
lea eax, [esp + 0x1b0]
xor ebp, ebp
push eax
lea ecx, [esp + 0xbc]
mov dword [esp + 0x284], ebp
call fcn.0050594d
mov ecx, esi
call fcn.00496d50
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x4c], edi
je 0x49877d
mov ecx, edi
call fcn.00494010
test eax, eax
je 0x49877d
mov ecx, edi
call fcn.00494050
test eax, eax
je 0x49877d
cmp dword [esi + 0x44c], ebp
je 0x4971fc
mov ecx, esi
call fcn.00498970
push ebx
mov ecx, esi
call fcn.00496ce0
push ebp
mov ecx, esi
mov dword [esp + 0x190], eax
call fcn.00496cf0
mov ecx, dword [esi + 0x5c]
mov edx, dword [esi + 0x58]
push ecx
lea eax, [esp + 0xc0]
push edx
push eax
call fcn.004af2f0
add esp, 0xc
lea ecx, [esp + 0xbc]
push ecx
lea ecx, [esp + 0x1ac]
call fcn.00496770
mov eax, dword [esp + 0x1b8]
mov ecx, dword [esp + 0x1bc]
mov edx, dword [esp + 0x1b4]
mov edi, dword [sym.imp.GDI32.dll_DPtoLP]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
mov ecx, dword [esp + 0xc4]
lea eax, [esp + 0x74]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x1c0]
push 2
push eax
push ecx
mov byte [esp + 0x290], 2
mov dword [esp + 0x8c], edx
call edi
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0x98]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [esp + 0xc4]
lea ecx, [esp + 0x98]
push 2
push ecx
push edx
call edi
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0xa0]
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x118], eax
mov dword [esp + 0x128], eax
lea eax, [esp + 0xb4]
mov dword [esp + 0x11c], ecx
mov dword [esp + 0x12c], ecx
push eax
mov ecx, esi
mov dword [esp + 0x124], edx
mov dword [esp + 0x128], edi
mov dword [esp + 0x134], edx
mov dword [esp + 0x138], edi
call fcn.004988c0
mov edi, dword [eax]
mov ecx, dword [esp + 0x98]
add ecx, edi
lea edx, [esp + 0x98]
mov ebx, dword [eax + 4]
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x98], ecx
add eax, ebx
lea ecx, [esp + 0x74]
mov dword [esp + 0x9c], eax
push ecx
lea eax, [esp + 0x9c]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x14]
push 2
push edx
push eax
mov dword [esp + 0x2c], ecx
call dword [sym.imp.GDI32.dll_LPtoDP]
mov dword [esp + 0x14c], ebp
mov dword [esp + 0x148], 0xdf05f0
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 3
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x14c]
call fcn.00505edc
mov eax, dword [esp + 0x118]
lea edx, [esp + 0x74]
add eax, edi
push edx
mov dword [esp + 0x11c], eax
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x11c]
push eax
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
mov eax, dword [esp + 0x11c]
mov ecx, dword [esp + 0x120]
mov edx, dword [esp + 0x118]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xc4]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x124]
push 2
push eax
push ecx
mov dword [esp + 0x2c], edx
call dword [sym.imp.GDI32.dll_LPtoDP]
mov dword [esp + 0x154], ebp
mov dword [esp + 0x150], 0xdf05f0
mov edi, dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
lea edx, [esp + 0x14]
push edx
mov byte [esp + 0x288], 4
call edi
push eax
lea ecx, [esp + 0x154]
call fcn.00505edc
mov edx, dword [esp + 0x12c]
lea eax, [esp + 0x74]
add edx, ebx
lea ecx, [esp + 0x128]
mov dword [esp + 0x12c], edx
push eax
lea edx, [esp + 0x12c]
push ecx
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x130]
mov eax, dword [esp + 0x128]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xc4]
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x134]
push 2
push ecx
push edx
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_LPtoDP]
mov dword [esp + 0x160], ebp
mov ebx, 0xdf05f0
mov dword [esp + 0x15c], ebx
lea eax, [esp + 0x14]
mov byte [esp + 0x284], 5
push eax
call edi
push eax
lea ecx, [esp + 0x160]
call fcn.00505edc
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], ebx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x48], ebx
lea ecx, [esp + 0x1b4]
mov byte [esp + 0x284], 7
push ecx
call edi
push eax
lea ecx, [esp + 0x6c]
call fcn.00505edc
mov edx, dword [esp + 0xc4]
mov edi, dword [sym.imp.GDI32.dll_GetCurrentObject]
push 6
push edx
call edi
push eax
call fcn.00505ec7
mov dword [esp + 0x190], eax
mov eax, dword [esp + 0xc4]
push 1
push eax
call edi
push eax
call fcn.00505ec7
mov ecx, dword [esp + 0xc4]
push 2
push ecx
mov dword [esp + 0x19c], eax
call edi
push eax
call fcn.00505ec7
push 1
lea ecx, [esp + 0xc0]
mov dword [esp + 0x1b4], eax
call fcn.0050560c
mov eax, dword [esi + 0x44]
mov edi, dword [esp + 0x50]
shr eax, 1
and eax, 1
mov ecx, edi
mov dword [esp + 0x144], eax
call fcn.00494010
mov ecx, edi
mov dword [esp + 0x64], eax
call fcn.004940d0
mov ebx, eax
mov ecx, edi
mov dword [esp + 0x58], ebx
call fcn.00494050
mov ecx, edi
mov dword [esp + 0x44], eax
call fcn.004940e0
mov edi, eax
push 1
mov ecx, esi
mov dword [esp + 0x3c], edi
call fcn.005023fb
add eax, ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.005023fb
lea edx, [esp + 0xb4]
add eax, edi
push edx
mov ecx, esi
mov dword [esp + 0x14], eax
call fcn.00496960
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x94], ebp
mov dword [esp + 0x40], edx
mov dword [esp + 0x90], 0xdf05e4
lea eax, [esp + 0x90]
mov ecx, esi
push eax
mov byte [esp + 0x288], 8
call fcn.00496da0
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
lea ecx, [esp + 0x178]
call fcn.00505f99
push 0xffffff
push ebp
push ebp
lea ecx, [esp + 0x144]
mov byte [esp + 0x290], 9
call fcn.00505f49
push 0x808080
push ebp
push ebp
lea ecx, [esp + 0x11c]
mov byte [esp + 0x290], 0xa
call fcn.00505f49
push ebp
push ebp
push ebp
lea ecx, [esp + 0x1d0]
mov byte [esp + 0x290], 0xb
call fcn.00505f49
mov eax, 5
mov dword [esp + 0x164], ebp
mov dword [esp + 0x16c], ebp
mov dword [esp + 0x168], ebp
mov dword [esp + 0x170], eax
mov dword [esp + 0x17c], ebp
mov dword [esp + 0x184], ebp
mov dword [esp + 0x180], ebp
mov dword [esp + 0x188], eax
lea ecx, [esp + 0x1ec]
mov byte [esp + 0x284], 0xe
call fcn.00495de0
mov ecx, dword [0xf2a8d8]
mov dword [esp + 0xb0], ecx
mov byte [esp + 0x284], 0x10
mov dword [esp + 0x54], 1
mov edi, dword [esp + 0x54]
cmp edi, 2
jne 0x497797
push 1
lea ecx, [esp + 0xc0]
call fcn.005056f3
mov edx, dword [esi + 0x40]
lea ecx, [esp + 0xb4]
push edx
call fcn.00505f99
cmp eax, ebp
jne 0x497737
xor ecx, ecx
jmp 0x49773a
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x6c]
lea eax, [esp + 0x68]
neg eax
sbb eax, eax
push ecx
and eax, edx
push eax
mov eax, dword [esp + 0xc8]
push eax
call dword [sym.imp.GDI32.dll_FillRgn]
mov dword [esp + 0xb4], 0xdf05d8
lea ecx, [esp + 0xb4]
mov byte [esp + 0x284], 0x11
call fcn.00505f33
mov ecx, dword [esi + 0x5c]
mov edx, dword [esi + 0x58]
push ecx
lea eax, [esp + 0xc0]
push edx
push eax
mov byte [esp + 0x290], 0x10
call fcn.004af2f0
add esp, 0xc
cmp dword [esp + 0x144], 1
jne 0x497f65
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x40]
cmp ecx, eax
jg 0x497c7c
cmp edi, 1
jne 0x497903
mov eax, dword [esp + 0x38]
xor edi, edi
xor ebx, ebx
cmp eax, ebp
jle 0x4977e6
push ebx
mov ecx, esi
call fcn.00496880
push eax
push edi
mov ecx, esi
call fcn.00496a40
mov edi, eax
mov eax, dword [esp + 0x38]
inc ebx
cmp ebx, eax
jl 0x4977ca
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x44]
cmp ebx, eax
jge 0x49780e
push ebx
mov ecx, esi
call fcn.00496880
push eax
push edi
mov ecx, esi
call fcn.00496a40
mov edi, eax
mov eax, dword [esp + 0x44]
inc ebx
cmp ebx, eax
jl 0x4977f2
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add edi, edx
lea ecx, [esp + 0x74]
mov dword [esp + 0x20], eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], ebp
call dword [sym.imp.USER32.dll_IntersectRect]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x497c7c
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x14]
push 2
push edx
push eax
call dword [sym.imp.GDI32.dll_LPtoDP]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x4c]
call fcn.00505edc
mov edi, dword [esp + 0x4c]
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x68]
neg eax
sbb eax, eax
push 4
and eax, edi
neg ecx
sbb ecx, ecx
push eax
and ecx, edx
push ecx
push edx
call dword [sym.imp.GDI32.dll_CombineRgn]
lea ecx, [esp + 0x48]
call fcn.00505f33
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x14]
push 2
push edx
push eax
call dword [sym.imp.GDI32.dll_DPtoLP]
lea ecx, [esp + 0x174]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00505530
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
sub eax, edx
sub ecx, edi
push 0xf00021
push eax
push ecx
push edx
mov edx, dword [esp + 0xd0]
push edi
push edx
call dword [sym.imp.GDI32.dll_PatBlt]
jmp 0x497c7c
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
sub eax, edx
xor ebx, ebx
mov dword [esp + 0x2c], eax
lea edi, [eax - 1]
cmp edi, ecx
mov dword [esp + 0x24], edi
jge 0x497c7c
jmp 0x49792c
mov eax, dword [esp + 0x2c]
cmp ebx, dword [esp + 0x7c]
jg 0x497c7c
cmp edi, eax
jl 0x497a4a
mov eax, dword [esp + 0x10]
cmp edi, eax
mov edi, dword [esp + 0x24]
jge 0x497954
mov ecx, eax
mov eax, dword [esp + 0x38]
sub edi, ecx
add edi, eax
push edi
mov ecx, esi
mov dword [esp + 0x18], ebx
call fcn.00496880
push eax
push ebx
mov ecx, esi
call fcn.00496a40
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x74]
mov dword [esp + 0x20], eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x1d0]
push edx
push eax
mov dword [esp + 0x24], ebp
call dword [sym.imp.USER32.dll_IntersectRect]
mov edx, dword [esp + 0x1d0]
mov ecx, dword [esp + 0x1cc]
mov eax, dword [esp + 0x1d4]
mov dword [esp + 0x1e0], edx
mov dword [esp + 0x1dc], ecx
mov ecx, dword [esp + 0x1d8]
lea edx, [esp + 0x1dc]
mov dword [esp + 0x1e4], eax
push edx
mov dword [esp + 0x1ec], ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x497a46
mov ecx, dword [esp + 0x50]
lea eax, [esp + 0xb0]
push eax
push edi
call fcn.00494090
lea ecx, [esp + 0x90]
test ecx, ecx
je 0x497a12
mov eax, dword [esp + 0x94]
cmp eax, ebp
je 0x497a12
mov edx, dword [esp + 0xc0]
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
lea ecx, [esp + 0xc0]
call fcn.005056c4
mov eax, dword [esp + 0xb0]
lea edx, [esp + 0x14]
push 0x825
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0xcc]
call dword [eax + 0x68]
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00505530
mov edx, dword [esp + 0x2c]
lea eax, [edx - 1]
cmp edi, eax
jne 0x497b6f
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jl 0x497b66
mov edx, dword [esp + 0xc4]
mov eax, 1
lea ecx, [esp + 0x30]
push eax
push ecx
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [sym.imp.GDI32.dll_DPtoLP]
lea eax, [esp + 0x138]
lea ecx, [esp + 0xbc]
push eax
call fcn.00505530
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
push ebx
lea edx, [esp + 0x22c]
push ecx
push edx
lea ecx, [esp + 0xc8]
call fcn.00505a21
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0xc4]
call fcn.00505a6d
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00505530
push ebx
lea edx, [esp + 0x23c]
push ebp
push edx
lea ecx, [esp + 0xc8]
call fcn.00505a21
push ebp
push ebp
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov eax, dword [esp + 0x3c]
push ebp
push eax
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov ecx, dword [esp + 0x3c]
push ebx
push ecx
lea ecx, [esp + 0xc4]
call fcn.00505a6d
push ebx
push ebp
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov ebx, dword [esp + 0x3c]
jmp 0x497c6b
mov ecx, dword [esp + 0x10]
mov eax, edi
cmp edi, ecx
jge 0x497b81
sub eax, ecx
mov ecx, dword [esp + 0x38]
add eax, ecx
push eax
mov ecx, esi
call fcn.00496880
push eax
push ebx
mov ecx, esi
call fcn.00496a40
mov edi, eax
mov eax, dword [esp + 0x74]
cmp edi, eax
jl 0x497c65
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x30]
push 1
push edx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebp
call dword [sym.imp.GDI32.dll_LPtoDP]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0xc4]
inc ecx
push 1
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.GDI32.dll_DPtoLP]
lea eax, [esp + 0x138]
lea ecx, [esp + 0xbc]
push eax
call fcn.00505530
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
push ecx
lea eax, [esp + 0x244]
push edx
push eax
lea ecx, [esp + 0xc8]
call fcn.00505a21
mov ecx, dword [esp + 0x30]
push ebp
push ecx
lea ecx, [esp + 0xc4]
call fcn.00505a6d
lea edx, [esp + 0x110]
lea ecx, [esp + 0xbc]
push edx
call fcn.00505530
push ebp
push edi
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0xbc]
push eax
push edi
call fcn.00505a6d
mov ecx, dword [esp + 0x40]
push ecx
push ebx
lea ecx, [esp + 0xc4]
call fcn.00505a6d
mov ebx, edi
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
inc edi
cmp edi, eax
mov dword [esp + 0x24], edi
jl 0x497928
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x3c]
cmp edx, eax
jg 0x497f5c
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x40]
sub ebx, ecx
cmp ebx, eax
mov dword [esp + 0x24], ebx
jge 0x497f5c
jmp 0x497cb2
mov ebx, dword [esp + 0x24]
xor ebp, ebp
cmp edi, dword [esp + 0x80]
jg 0x497f5c
mov eax, dword [esp + 0x28]
cmp ebx, eax
jge 0x497ccf
sub ebx, eax
mov eax, dword [esp + 0x58]
add ebx, eax
push ebx
mov ecx, esi
call fcn.004967a0
push eax
push edi
mov ecx, esi
call fcn.00496b70
mov ebp, eax
mov eax, dword [esp + 0x78]
cmp ebp, eax
jl 0x497f43
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
cmp eax, 1
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], ebp
jne 0x497dd9
lea ecx, [esp + 0x74]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x497f43
lea edx, [esp + 0x174]
lea ecx, [esp + 0xbc]
push edx
call fcn.00505530
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
sub eax, edx
sub ecx, edi
push 0xf00021
push eax
mov eax, dword [esp + 0xc8]
push ecx
push edx
push edi
push eax
call dword [sym.imp.GDI32.dll_PatBlt]
mov edx, dword [esp + 0xc4]
lea ecx, [esp + 0x14]
push 2
push ecx
push edx
call dword [sym.imp.GDI32.dll_LPtoDP]
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x4c]
call fcn.00505edc
mov edi, dword [esp + 0x4c]
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x68]
neg eax
sbb eax, eax
push 4
and eax, edi
neg ecx
sbb ecx, ecx
push eax
and ecx, edx
push ecx
push edx
call dword [sym.imp.GDI32.dll_CombineRgn]
lea ecx, [esp + 0x48]
call fcn.00505f33
jmp 0x497f43
mov edx, dword [esp + 0xc4]
lea ecx, [esp + 0x30]
push 1
push ecx
push edx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], edi
call dword [sym.imp.GDI32.dll_LPtoDP]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0xc4]
inc eax
push 1
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.GDI32.dll_DPtoLP]
lea edx, [esp + 0x138]
lea ecx, [esp + 0xbc]
push edx
call fcn.00505530
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x230]
push eax
push 0
push ecx
lea ecx, [esp + 0xc8]
call fcn.00505a21
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0xc4]
call fcn.00505a6d
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00505530
mov edx, dword [esp + 0x3c]
push ebp
push edx
lea ecx, [esp + 0xc4]
call fcn.00505a6d
push ebp
push 0
lea ecx, [esp + 0xc4]
call fcn.00505a6d
push edi
push 0
lea ecx, [esp + 0xc4]
call fcn.00505a6d
inc ebx
lea eax, [esp + 0x248]
push ebx
push 0xf1a450
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x9c]
add esp, 0xc
test ecx, ecx
je 0x497ede
mov eax, dword [esp + 0x94]
test eax, eax
je 0x497ede
mov edx, dword [esp + 0xc0]
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0
lea ecx, [esp + 0xc0]
call fcn.005056c4
lea eax, [esp + 0x248]
lea ecx, [esp + 0x158]
push eax
call fcn.004ff2d9
mov eax, dword [esp + 0x158]
lea edx, [esp + 0x14]
push 0x825
push edx
mov ecx, dword [eax - 8]
mov byte [esp + 0x28c], 0x12
push ecx
push eax
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0xcc]
call dword [eax + 0x68]
lea ecx, [esp + 0x158]
mov byte [esp + 0x284], 0x10
call fcn.004ff26b
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x64]
inc eax
mov edi, ebp
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x497cac
xor ebp, ebp
mov ebx, dword [esp + 0x40]
jmp 0x4980da
cmp edi, 2
jne 0x4980d8
cmp dword [esp + 0x78], 4
jg 0x498023
cmp dword [esp + 0x58], ebp
jne 0x498023
cmp dword [esp + 0x28], ebp
jle 0x498023
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x44]
sub ebx, ecx
cmp ebx, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0xac], ebp
jge 0x498023
mov eax, dword [esp + 0x10]
mov edi, ebx
cmp ebx, eax
jge 0x497fbe
mov ecx, eax
mov eax, dword [esp + 0x38]
sub edi, ecx
add edi, eax
push edi
mov ecx, esi
call fcn.00496880
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xa8], eax
push edi
lea eax, [ecx - 1]
mov ecx, dword [esp + 0x54]
push eax
call fcn.00494130
push eax
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0xac]
push 0x10
push edx
dec eax
push edi
mov edi, dword [esp + 0x3c]
push eax
push ebp
lea ecx, [esp + 0xd4]
push edi
push ecx
mov ecx, esi
call fcn.0049a460
mov edx, dword [esp + 0xa8]
mov ecx, esi
push edx
push edi
call fcn.00496a40
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
inc ebx
cmp ebx, eax
jl 0x497faa
cmp dword [esp + 0x74], 4
jg 0x4980d8
cmp dword [esp + 0x38], ebp
jne 0x4980d8
cmp dword [esp + 0x10], ebp
jle 0x4980d8
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
sub ebx, ecx
cmp ebx, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0xa8], ebp
jge 0x4980d8
mov eax, dword [esp + 0x28]
mov edi, ebx
cmp ebx, eax
jge 0x498073
mov ecx, eax
mov eax, dword [esp + 0x58]
sub edi, ecx
add edi, eax
push edi
mov ecx, esi
call fcn.004967a0
mov ecx, dword [esp + 0x50]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x10]
dec eax
push eax
push edi
call fcn.00494130
mov edx, dword [esp + 0x10]
push eax
lea ecx, [esp + 0xac]
push 8
lea eax, [edx - 1]
push ecx
push eax
push edi
mov edi, dword [esp + 0x40]
lea eax, [esp + 0xd0]
push edi
push ebp
push eax
mov ecx, esi
call fcn.0049a460
mov ecx, dword [esp + 0xac]
push ecx
push edi
mov ecx, esi
call fcn.00496b70
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x64]
inc ebx
cmp ebx, eax
jl 0x49805f
xor ebx, ebx
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x16c]
mov dword [esp + 0x90], ebx
call fcn.004825a0
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x184]
call fcn.004825a0
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
sub edi, ecx
cmp edi, eax
mov dword [esp + 0x24], edi
jge 0x49858f
jmp 0x49811d
xor ebp, ebp
cmp ebx, dword [esp + 0x80]
jg 0x49858f
mov eax, dword [esp + 0x28]
mov ebp, edi
cmp edi, eax
jge 0x49813c
sub ebp, eax
mov eax, dword [esp + 0x58]
add ebp, eax
push ebp
mov ecx, esi
mov dword [esp + 0x60], ebp
call fcn.004967a0
push eax
push ebx
mov ecx, esi
call fcn.00496b70
mov ecx, eax
mov eax, dword [esp + 0x78]
cmp ecx, eax
mov dword [esp + 0x1ac], ecx
jl 0x498573
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x44]
sub eax, ebx
cmp eax, edx
mov dword [esp + 0x2c], eax
jge 0x498573
mov ecx, dword [esp + 0x10]
jmp 0x49819d
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x5c]
mov eax, dword [esp + 0x2c]
cmp eax, ecx
jge 0x4981a9
mov edx, dword [esp + 0x38]
sub eax, ecx
add eax, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x60], eax
cmp ebp, edx
jge 0x4981c8
cmp eax, ecx
jge 0x4981bf
lea eax, [esp + 0x74]
jmp 0x4981da
lea eax, [esp + 0x118]
jmp 0x4981da
cmp eax, ecx
lea eax, [esp + 0x128]
jl 0x4981da
lea eax, [esp + 0x98]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov edi, dword [esp + 0x60]
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x198], ecx
mov ecx, dword [eax + 8]
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x1a0], ecx
push 0
mov dword [esp + 0x1a0], edx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x90]
push edi
lea ecx, [esp + 0x1f4]
push ebp
push ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x1b4], edx
mov dword [esp + 0x94], eax
call fcn.004940f0
lea ecx, [esp + 0x1ec]
call fcn.00495ec0
test eax, 0x3c0000
je 0x49839f
lea ecx, [esp + 0x1ec]
call fcn.00495ec0
test eax, 0x40000
je 0x4982ab
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x50]
dec edi
push 0
push edi
lea eax, [esp + 0x1f4]
push edx
push eax
call fcn.004940f0
push edi
mov ecx, esi
call fcn.00496880
mov ecx, dword [esp + 0x84]
neg eax
push eax
push ecx
mov ecx, esi
call fcn.00496a40
lea ecx, [esp + 0x1ec]
mov dword [esp + 0x84], eax
call fcn.00495ec0
test eax, 0x40000
jne 0x49825d
lea ecx, [esp + 0x1ec]
call fcn.00495ec0
test eax, 0x80000
je 0x4982fc
mov ecx, dword [esp + 0x50]
dec ebp
push 0
push edi
lea edx, [esp + 0x1f4]
push ebp
push edx
call fcn.004940f0
push ebp
mov ecx, esi
call fcn.004967a0
neg eax
push eax
push ebx
mov ecx, esi
call fcn.00496b70
lea ecx, [esp + 0x1ec]
mov ebx, eax
call fcn.00495ec0
test eax, 0x80000
jne 0x4982be
mov edx, dword [esp + 0x168]
mov dword [esp + 0x140], 0
test edx, edx
jle 0x49834f
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x164]
sub ecx, eax
mov dword [esp + 0x70], ecx
jmp 0x49832c
mov ecx, dword [esp + 0x70]
cmp dword [ecx + eax], ebp
jne 0x498339
cmp dword [eax], edi
je 0x4983cd
mov ecx, dword [esp + 0x140]
add eax, 4
inc ecx
cmp ecx, edx
mov dword [esp + 0x140], ecx
jl 0x498328
cmp ebp, 0xffffffff
je 0x49839f
mov dword [esp + 0x70], edx
inc edx
push 0xffffffffffffffff
push edx
lea ecx, [esp + 0x16c]
call fcn.004825a0
mov eax, dword [esp + 0x164]
mov ecx, dword [esp + 0x70]
push 0xffffffffffffffff
mov dword [eax + ecx*4], ebp
mov eax, dword [esp + 0x184]
mov dword [esp + 0x74], eax
inc eax
push eax
lea ecx, [esp + 0x184]
call fcn.004825a0
mov edx, dword [esp + 0x17c]
mov eax, dword [esp + 0x70]
mov dword [edx + eax*4], edi
cmp dword [esp + 0x54], 2
jne 0x4983f9
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x5c]
cmp eax, ecx
jge 0x4983d2
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x60]
xor eax, eax
cmp ecx, edx
setl al
dec eax
lea ecx, [esp + 0x150]
and eax, ecx
jmp 0x4983ec
or ebp, 0xffffffff
jmp 0x49839f
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x60]
cmp eax, edx
lea eax, [esp + 0x15c]
jl 0x4983ec
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0xc0]
call fcn.0050595d
cmp ebp, 0xffffffff
je 0x4984e3
cmp dword [esp + 0x54], 1
jne 0x4984bd
mov edx, dword [esp + 0x84]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x198]
push eax
push ecx
push 0x20
push edi
push ebp
push ebx
lea eax, [esp + 0xd4]
push edx
push eax
mov ecx, esi
call fcn.00499b20
lea ecx, [esp + 0x198]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x498530
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x14]
push 2
push edx
push eax
call dword [sym.imp.GDI32.dll_LPtoDP]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x4c]
call fcn.00505edc
mov ebp, dword [esp + 0x4c]
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x68]
neg eax
sbb eax, eax
push 4
and eax, ebp
neg ecx
sbb ecx, ecx
push eax
and ecx, edx
push ecx
push edx
call dword [sym.imp.GDI32.dll_CombineRgn]
lea ecx, [esp + 0x48]
call fcn.00505f33
jmp 0x498530
mov eax, dword [esp + 0x84]
lea edx, [esp + 0x198]
push 0
push edx
push 1
push edi
push ebp
push ebx
lea ecx, [esp + 0xd4]
push eax
push ecx
mov ecx, esi
call fcn.00499b20
cmp dword [esp + 0x54], 2
jne 0x498530
mov eax, dword [esp + 0x144]
mov ecx, dword [esp + 0x60]
dec eax
lea edx, [esp + 0x198]
neg eax
sbb eax, eax
push 0
and eax, 6
push edx
mov edx, dword [esp + 0x64]
add eax, 0x18
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x9c]
push edx
push eax
lea edx, [esp + 0xd4]
push ecx
push edx
mov ecx, esi
call fcn.00499b20
mov eax, dword [esp + 0x60]
mov ecx, esi
push eax
call fcn.00496880
mov ecx, dword [esp + 0x8c]
push eax
push ecx
mov ecx, esi
call fcn.00496a40
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x498191
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1ac]
mov eax, dword [esp + 0x64]
inc edi
mov ebx, ecx
cmp edi, eax
mov dword [esp + 0x88], ebx
mov dword [esp + 0x24], edi
jl 0x49811b
xor ebp, ebp
push ebp
lea ecx, [esp + 0xc0]
call fcn.0050595d
mov eax, dword [esp + 0x54]
inc eax
cmp eax, 2
mov dword [esp + 0x54], eax
jle 0x497704
mov eax, dword [esi + 0x44c]
pop ebx
cmp eax, ebp
je 0x4985c0
mov ecx, esi
call fcn.00498970
push ebp
lea ecx, [esp + 0xbc]
call fcn.0050595d
mov edx, dword [esp + 0x18c]
lea ecx, [esp + 0xb8]
push edx
call fcn.00505530
mov eax, dword [esp + 0x190]
lea ecx, [esp + 0xb8]
push eax
call fcn.00505530
mov ecx, dword [esp + 0x1ac]
push ecx
lea ecx, [esp + 0xbc]
call fcn.00505530
mov edx, dword [esp + 0x188]
mov ecx, esi
push edx
call fcn.00496cf0
lea ecx, [esp + 0xac]
mov byte [esp + 0x280], 0xf
call fcn.004ff26b
lea ecx, [esp + 0x1e8]
mov byte [esp + 0x280], 0xe
call fcn.00495e10
mov eax, dword [esp + 0x178]
cmp eax, ebp
je 0x498654
push eax
call fcn.004fefd5
add esp, 4
mov eax, dword [esp + 0x160]
cmp eax, ebp
je 0x498668
push eax
call fcn.004fefd5
add esp, 4
mov esi, 0xdf05d8
mov dword [esp + 0x1c0], esi
lea ecx, [esp + 0x1c0]
mov byte [esp + 0x280], 0x13
call fcn.00505f33
mov dword [esp + 0x10c], esi
lea ecx, [esp + 0x10c]
mov byte [esp + 0x280], 0x14
call fcn.00505f33
mov dword [esp + 0x134], esi
lea ecx, [esp + 0x134]
mov byte [esp + 0x280], 0x15
call fcn.00505f33
mov dword [esp + 0x170], esi
lea ecx, [esp + 0x170]
mov byte [esp + 0x280], 0x16
call fcn.00505f33
mov dword [esp + 0x8c], esi
lea ecx, [esp + 0x8c]
mov byte [esp + 0x280], 0x17
call fcn.00505f33
mov dword [esp + 0x44], esi
lea ecx, [esp + 0x44]
mov byte [esp + 0x280], 0x18
call fcn.00505f33
mov dword [esp + 0x64], esi
lea ecx, [esp + 0x64]
mov byte [esp + 0x280], 0x19
call fcn.00505f33
mov dword [esp + 0x158], esi
lea ecx, [esp + 0x158]
mov byte [esp + 0x280], 0x1a
call fcn.00505f33
mov dword [esp + 0x14c], esi
lea ecx, [esp + 0x14c]
mov byte [esp + 0x280], 0x1b
call fcn.00505f33
mov dword [esp + 0x144], esi
lea ecx, [esp + 0x144]
mov byte [esp + 0x280], 0x1c
call fcn.00505f33
lea ecx, [esp + 0x1a4]
call fcn.00496790
jmp 0x4987ce
mov eax, dword [esi + 0x40]
lea ecx, [esp + 0xb0]
push eax
call fcn.00505f99
cmp eax, ebp
jne 0x498795
xor eax, eax
jmp 0x498798
mov eax, dword [eax + 4]
mov edx, dword [esp + 0xbc]
lea ecx, [esp + 0x1b0]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_FillRect]
mov dword [esp + 0xb0], 0xdf05d8
lea ecx, [esp + 0xb0]
mov byte [esp + 0x280], 1
call fcn.00505f33
lea ecx, [esp + 0xb8]
mov dword [esp + 0x280], 0xffffffff
call fcn.00505e0e
mov ecx, dword [esp + 0x278]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x278
ret