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

Disassembly:
sub esp, 0x4c
test byte [0x814898], 1
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
push esi
mov esi, eax
jne 0x40f558
or dword [0x814898], 1
push 0x7c4100
push 0x7c1f78
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x814894], eax
cmp dword [esp + 0x60], 0
je 0x41070d
mov eax, dword [esp + 0x5c]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esp + 0x60]
mov ebp, eax
push ecx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x5c]
push 4
push edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
cmp byte [esp + 0x6c], al
jne 0x40fe8b
cmp byte [esp + 0x70], 0xff
jb 0x40fe8b
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
mov edx, eax
sub edx, ecx
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
cmp edx, ecx
jne 0x40f654
mov edx, dword [edi + 0xc]
mov ecx, dword [ebx + 0xc]
sub edx, dword [edi + 4]
sub ecx, dword [ebx + 4]
cmp ecx, edx
jne 0x40f654
cmp dword [esi], 0
jne 0x40f654
cmp dword [esi + 8], 0
jne 0x40f654
cmp dword [esi + 4], 0
jne 0x40f654
cmp dword [esi + 0xc], 0
jne 0x40f654
mov edx, dword [esp + 0x68]
push ebx
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4106fa
mov ecx, dword [edi + 4]
mov eax, dword [esp + 0x4c]
sub ecx, dword [ebx + 4]
mov edx, dword [edi]
sub edx, dword [ebx]
push 0xcc0020
add ecx, eax
push ecx
mov ecx, dword [esp + 0x50]
add edx, ecx
push edx
mov edx, dword [esp + 0x60]
push ebp
sub edx, eax
push edx
mov edx, dword [esp + 0x64]
sub edx, ecx
push edx
push eax
mov eax, dword [esp + 0x78]
push ecx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
jmp 0x4106fa
cmp byte [esp + 0x74], 0
jne 0x40f991
mov edx, dword [ebx]
mov ecx, dword [esi]
sub eax, dword [esi]
add ecx, edx
mov edx, dword [ebx + 4]
sub eax, dword [ebx]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 4]
sub eax, dword [esi + 8]
add ecx, edx
add eax, dword [esp + 0x38]
mov dword [esp + 0x3c], ecx
mov ecx, dword [ebx + 0xc]
sub ecx, dword [esi + 4]
mov dword [esp + 0x40], eax
sub ecx, edx
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x68]
add ecx, dword [esp + 0x3c]
lea eax, [esp + 0x48]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40f991
cmp byte [esp + 0x78], 0
jne 0x40f729
cmp byte [esp + 0x7c], 0
jne 0x40f8ea
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
mov edx, dword [edi + 0xc]
sub edx, ecx
mov ecx, dword [edi]
sub edx, eax
sub edx, dword [esi + 0xc]
push 0xcc0020
push edx
mov edx, dword [edi + 8]
sub edx, dword [esi]
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [esi + 4]
add edx, eax
mov eax, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
add eax, ecx
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x58]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
jmp 0x40f991
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
sub ecx, dword [esi]
sub ecx, dword [esi + 8]
mov edx, ecx
sub edx, dword [esp + 0x38]
cmp byte [esp + 0x7c], 0
je 0x40f843
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
mov dword [esp + 0x1c], ecx
sub eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
lea eax, [edx + eax - 1]
cdq
idiv ecx
mov ecx, dword [esp + 0x10]
mov edx, ecx
sub edx, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
lea eax, [edx + eax - 1]
cdq
idiv ecx
test eax, eax
jle 0x40f991
mov dword [esp + 0x60], 0
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x60]
lea edx, [eax + ecx]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x28], eax
add eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jle 0x40f7b5
mov eax, ecx
cmp dword [esp + 0xc], 0
jle 0x40f82b
sub eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x38]
lea ecx, [eax + edx]
mov edx, dword [esp + 0x1c]
add eax, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], eax
add eax, edx
mov edx, dword [esp + 0x40]
cmp eax, edx
jle 0x40f7ef
mov eax, edx
mov edx, dword [edi + 4]
add edx, dword [esi + 4]
push 0xcc0020
push edx
mov edx, dword [edi]
add edx, dword [esi]
sub eax, ecx
push edx
mov edx, dword [esp + 0x2c]
push ebp
push edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x78]
add eax, edx
push eax
mov eax, dword [esp + 0x78]
push ecx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
sub dword [esp + 0x14], 1
mov eax, dword [esp + 0x24]
jne 0x40f7ce
sub dword [esp + 0x18], 1
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x60], ecx
jne 0x40f790
jmp 0x40f991
mov eax, dword [esp + 0x40]
lea eax, [edx + eax - 1]
cdq
idiv ecx
mov dword [esp + 0x28], ecx
test eax, eax
jle 0x40f991
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
lea edx, [ecx + eax]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x28]
add ecx, edx
add eax, ecx
cmp eax, dword [esp + 0x40]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x60], edx
jle 0x40f88f
mov ecx, edx
sub ecx, eax
mov eax, dword [esp + 0x40]
add ecx, eax
mov dword [esp + 0x60], ecx
mov ecx, dword [esi + 4]
mov edx, dword [edi + 0xc]
sub edx, ecx
mov ecx, dword [edi + 4]
sub edx, ecx
sub edx, dword [esi + 0xc]
push 0xcc0020
push edx
mov edx, dword [esp + 0x68]
push edx
mov edx, dword [esi + 4]
add edx, ecx
mov ecx, dword [edi]
add ecx, dword [esi]
push edx
mov edx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x38]
push ebp
push edx
sub eax, ecx
push eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x84]
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
sub dword [esp + 0x18], 1
mov ecx, dword [esp + 0x20]
jne 0x40f860
jmp 0x40f991
mov ecx, dword [edi + 0xc]
sub ecx, dword [edi + 4]
mov eax, dword [esp + 0x44]
sub ecx, dword [esi + 0xc]
sub ecx, dword [esi + 4]
mov edx, ecx
sub edx, dword [esp + 0x3c]
mov dword [esp + 0x28], ecx
lea eax, [edx + eax - 1]
cdq
idiv ecx
test eax, eax
jle 0x40f991
xor edx, edx
mov dword [esp + 0x60], eax
lea esp, [esp]
mov eax, dword [esp + 0x3c]
lea ecx, [edx + eax]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x28]
add edx, ecx
add eax, edx
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x1c], edx
jle 0x40f945
sub ecx, eax
mov eax, dword [esp + 0x44]
add ecx, eax
mov edx, dword [esi]
push 0xcc0020
push ecx
mov ecx, dword [edi + 8]
sub ecx, edx
mov edx, ecx
mov ecx, dword [edi]
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [edi + 4]
add edx, dword [esi + 4]
push edx
mov edx, dword [esi]
add edx, ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x70]
push ebp
sub eax, ecx
push eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.GDI32.dll_StretchBlt]
sub dword [esp + 0x60], 1
mov edx, dword [esp + 0x1c]
jne 0x40f920
mov edx, dword [esi]
test edx, edx
jle 0x40fa22
cmp dword [esi + 4], 0
jle 0x40fac3
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x40], edx
mov edx, dword [esi + 4]
add dword [esp + 0x40], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], edx
add dword [esp + 0x44], ecx
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x68]
push eax
push ecx
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fa22
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x40]
push 0xcc0020
push edx
mov edx, dword [esi]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [esp + 0x58]
push ebp
sub eax, ecx
push edx
push eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x84]
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi + 4], 0
jle 0x40fac3
mov ecx, dword [esi]
mov edx, dword [ebx]
lea eax, [ecx + edx]
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 8]
sub eax, ecx
mov ecx, dword [esi + 4]
add ecx, dword [esp + 0x3c]
sub eax, edx
sub eax, dword [esi + 8]
mov edx, dword [esp + 0x68]
add eax, dword [esp + 0x38]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fac3
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [edi]
push 0xcc0020
push edx
mov edx, dword [edi + 8]
sub edx, ecx
sub edx, eax
sub edx, dword [esi + 8]
add ecx, eax
mov eax, dword [esp + 0x4c]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x54]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi + 8], 0
jle 0x40fb5d
cmp dword [esi + 4], 0
jle 0x40fb5d
mov ecx, dword [esi + 8]
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
sub eax, ecx
mov dword [esp + 0x40], ecx
mov ecx, dword [esi + 4]
add dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
add dword [esp + 0x44], edx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fb5d
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov edx, dword [esi + 4]
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x38]
push 0xcc0020
push edx
mov edx, dword [edi + 4]
push eax
push edx
mov edx, dword [edi + 8]
sub edx, eax
mov eax, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x4c]
push ebp
push eax
mov eax, dword [esp + 0x78]
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi], 0
jle 0x40fc01
mov ecx, dword [ebx]
mov edx, dword [esi + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebx + 4]
lea eax, [edx + ecx]
mov dword [esp + 0x3c], eax
mov eax, dword [esi]
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xc]
sub eax, edx
sub eax, ecx
sub eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x38]
add eax, dword [esp + 0x3c]
add dword [esp + 0x40], ecx
lea edx, [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fc01
mov edx, dword [esp + 0x38]
sub dword [esp + 0x40], edx
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
mov edx, dword [edi + 0xc]
sub edx, ecx
push 0xcc0020
sub edx, eax
sub edx, dword [esi + 0xc]
add ecx, eax
mov eax, dword [edi]
push edx
mov edx, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push ebp
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi + 8], 0
jle 0x40fcac
mov eax, dword [esi + 8]
mov ecx, dword [ebx + 8]
mov edx, dword [esi + 4]
sub ecx, eax
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xc]
sub eax, dword [esi + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebx + 4]
sub eax, ecx
sub eax, dword [esi + 0xc]
add edx, ecx
mov ecx, dword [esp + 0x38]
add dword [esp + 0x40], ecx
add eax, edx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fcac
mov edx, dword [esp + 0x38]
sub dword [esp + 0x40], edx
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
mov edx, dword [edi + 0xc]
sub edx, ecx
push 0xcc0020
sub edx, eax
sub edx, dword [esi + 0xc]
add ecx, eax
mov eax, dword [edi + 8]
push edx
mov edx, dword [esi + 8]
push edx
push ecx
mov ecx, dword [esp + 0x54]
sub eax, edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
push ebp
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_StretchBlt]
mov edx, dword [esi]
test edx, edx
jle 0x40fd3e
cmp dword [esi + 0xc], 0
jle 0x40fde7
mov eax, dword [ebx]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 0xc]
add edx, dword [esp + 0x38]
sub eax, ecx
add ecx, eax
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x68]
push ecx
mov dword [esp + 0x40], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fd3e
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov eax, dword [esi + 0xc]
mov edx, dword [esi]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x38]
push 0xcc0020
push eax
push edx
mov edx, dword [edi + 0xc]
sub edx, eax
mov eax, dword [edi]
push edx
mov edx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push ebp
push edx
mov edx, dword [esp + 0x78]
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x58]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi + 0xc], 0
jle 0x40fde7
mov edx, dword [esi]
mov eax, dword [ebx]
mov ecx, dword [ebx + 0xc]
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0xc]
sub ecx, eax
mov eax, dword [ebx + 8]
sub eax, edx
sub eax, dword [ebx]
mov edx, dword [esi + 0xc]
sub eax, dword [esi + 8]
mov dword [esp + 0x44], edx
add eax, dword [esp + 0x38]
add dword [esp + 0x44], ecx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40fde7
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov ecx, dword [esi]
mov edx, dword [edi + 8]
mov eax, dword [esi + 0xc]
sub edx, ecx
mov ecx, dword [edi]
push 0xcc0020
push eax
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [edi + 0xc]
sub edx, eax
mov eax, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
add eax, ecx
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x58]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
cmp dword [esi + 8], 0
jle 0x4106fa
cmp dword [esi + 0xc], 0
jle 0x4106fa
mov eax, dword [ebx + 8]
mov edx, dword [esi + 0xc]
mov ebx, dword [ebx + 0xc]
mov ecx, dword [esi + 8]
sub ebx, edx
sub eax, ecx
add edx, ebx
add ecx, eax
mov dword [esp + 0x44], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
push edx
mov dword [esp + 0x44], ecx
push eax
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x48], ebx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4106fa
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esi + 8]
mov ebx, dword [edi + 0xc]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
push 0xcc0020
push eax
push esi
sub ebx, eax
mov eax, dword [edi + 8]
push ebx
sub eax, esi
push eax
mov eax, dword [esp + 0x58]
push ebp
sub ecx, edx
push eax
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
mov edx, dword [esp + 0x84]
push edx
call dword [sym.imp.GDI32.dll_StretchBlt]
jmp 0x4106fa
cmp byte [esp + 0x74], 0
mov al, byte [esp + 0x70]
mov byte [esp + 0x60], 0
mov byte [esp + 0x61], 0
mov byte [esp + 0x62], al
mov byte [esp + 0x63], 1
jne 0x410209
mov ecx, dword [esi]
mov eax, dword [ebx]
lea edx, [ecx + eax]
mov eax, dword [ebx + 4]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 4]
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 8]
sub eax, ecx
mov ecx, dword [ebx + 0xc]
sub eax, dword [ebx]
sub ecx, edx
sub ecx, dword [ebx + 4]
sub eax, dword [esi + 8]
sub ecx, dword [esi + 0xc]
add eax, dword [esp + 0x38]
add ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x410209
cmp byte [esp + 0x78], 0
jne 0x40ff7b
cmp byte [esp + 0x7c], 0
jne 0x41016a
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov edx, dword [esp + 0x60]
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
push edx
mov edx, dword [edi + 0xc]
sub edx, ecx
mov ecx, dword [edi]
sub edx, eax
sub edx, dword [esi + 0xc]
push edx
mov edx, dword [edi + 8]
sub edx, dword [esi]
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [esi + 4]
add edx, eax
mov eax, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
add eax, ecx
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x58]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [0x814894]
jmp 0x410209
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
sub ecx, dword [esi]
sub ecx, dword [esi + 8]
cmp byte [esp + 0x7c], 0
je 0x4100b6
mov eax, dword [esp + 0x40]
mov edx, ecx
sub edx, dword [esp + 0x38]
mov ebx, dword [edi + 0xc]
lea eax, [edx + eax - 1]
cdq
idiv ecx
sub ebx, dword [edi + 4]
mov dword [esp + 0x10], ecx
sub ebx, dword [esi + 0xc]
sub ebx, dword [esi + 4]
mov edx, ebx
sub edx, dword [esp + 0x3c]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x44]
lea eax, [edx + eax - 1]
cdq
idiv ebx
mov ebx, dword [esp + 0x64]
test eax, eax
jle 0x410209
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x3c]
add eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc]
add eax, edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
add eax, edx
cmp eax, dword [esp + 0x44]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x18], edx
jle 0x410014
sub edx, eax
mov eax, dword [esp + 0x44]
add edx, eax
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x28]
test edx, edx
jle 0x41009e
sub eax, dword [esp + 0x24]
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], eax
xor eax, eax
mov edi, edi
mov ebx, dword [esp + 0x38]
lea edx, [eax + ebx]
add eax, ecx
mov dword [esp + 0x2c], eax
add eax, ebx
mov ebx, dword [esp + 0x40]
cmp eax, ebx
jle 0x410051
mov ecx, dword [esp + 0x10]
sub ecx, eax
add ecx, ebx
mov eax, ebx
mov ebx, dword [esp + 0x60]
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
push ecx
mov ecx, dword [edi + 4]
add ecx, dword [esi + 4]
sub eax, edx
push ecx
mov ecx, dword [edi]
add ecx, dword [esi]
push ecx
mov ecx, dword [esp + 0x38]
push ebp
push ecx
mov ecx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x3c]
add eax, ecx
push eax
push edx
mov edx, dword [esp + 0x84]
push edx
call dword [0x814894]
sub dword [esp + 0x14], 1
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
jne 0x410030
mov ebx, dword [esp + 0x64]
sub dword [esp + 0x20], 1
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
jne 0x40ffe0
jmp 0x410209
mov edx, dword [esp + 0x40]
mov eax, ecx
sub eax, dword [esp + 0x38]
mov dword [esp + 0x30], ecx
lea eax, [eax + edx - 1]
cdq
idiv ecx
test eax, eax
jle 0x410209
xor ecx, ecx
mov dword [esp + 0x1c], eax
lea esp, [esp]
mov eax, dword [esp + 0x38]
lea edx, [ecx + eax]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x30]
add ecx, edx
add eax, ecx
cmp eax, dword [esp + 0x40]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
jle 0x41010f
mov ecx, edx
sub ecx, eax
mov eax, dword [esp + 0x40]
add ecx, eax
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x60]
mov ecx, dword [esi + 4]
push edx
mov edx, dword [edi + 0xc]
sub edx, ecx
mov ecx, dword [edi + 4]
sub edx, ecx
sub edx, dword [esi + 0xc]
push edx
mov edx, dword [esp + 0x28]
push edx
mov edx, dword [esi + 4]
add edx, ecx
mov ecx, dword [edi]
add ecx, dword [esi]
push edx
mov edx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x40]
push ebp
push edx
sub eax, ecx
push eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x84]
push ecx
call dword [0x814894]
sub dword [esp + 0x1c], 1
mov ecx, dword [esp + 0x28]
jne 0x4100e0
jmp 0x410209
mov ecx, dword [edi + 0xc]
sub ecx, dword [edi + 4]
mov eax, dword [esp + 0x44]
sub ecx, dword [esi + 0xc]
sub ecx, dword [esi + 4]
mov edx, ecx
sub edx, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
lea eax, [edx + eax - 1]
cdq
idiv ecx
test eax, eax
jle 0x410209
xor ecx, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
add eax, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
add eax, ecx
cmp eax, edx
mov ecx, dword [esp + 0x10]
jle 0x4101c1
sub ecx, eax
add ecx, edx
mov eax, edx
mov edx, dword [esp + 0x60]
push edx
mov edx, dword [edi + 8]
sub edx, dword [esi]
push ecx
mov ecx, dword [edi]
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [edi + 4]
add edx, dword [esi + 4]
push edx
mov edx, dword [esi]
add edx, ecx
mov ecx, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x70]
push ebp
sub eax, ecx
push eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
call dword [0x814894]
sub dword [esp + 0x20], 1
mov ecx, dword [esp + 0x2c]
jne 0x410195
mov edx, dword [esi]
test edx, edx
jle 0x41029a
cmp dword [esi + 4], 0
jle 0x41033b
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x40], edx
mov edx, dword [esi + 4]
add dword [esp + 0x40], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], edx
add dword [esp + 0x44], ecx
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x68]
push eax
push ecx
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x41029a
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x40]
push edx
mov edx, dword [esi + 4]
push edx
mov edx, dword [esi]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [esp + 0x58]
push ebp
sub eax, ecx
push edx
push eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x84]
push ecx
call dword [0x814894]
cmp dword [esi + 4], 0
jle 0x41033b
mov ecx, dword [esi]
mov edx, dword [ebx]
lea eax, [ecx + edx]
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 8]
sub eax, ecx
mov ecx, dword [esi + 4]
add ecx, dword [esp + 0x3c]
sub eax, edx
sub eax, dword [esi + 8]
mov edx, dword [esp + 0x68]
add eax, dword [esp + 0x38]
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x41033b
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov ecx, dword [esi]
mov eax, dword [edi]
push edx
mov edx, dword [esi + 4]
push edx
mov edx, dword [edi + 8]
sub edx, ecx
sub edx, eax
sub edx, dword [esi + 8]
add ecx, eax
mov eax, dword [esp + 0x4c]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x54]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [0x814894]
cmp dword [esi + 8], 0
jle 0x4103d5
cmp dword [esi + 4], 0
jle 0x4103d5
mov ecx, dword [esi + 8]
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
sub eax, ecx
mov dword [esp + 0x40], ecx
mov ecx, dword [esi + 4]
add dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
add dword [esp + 0x44], edx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4103d5
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov edx, dword [esp + 0x60]
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x38]
push edx
mov edx, dword [esi + 4]
push edx
mov edx, dword [edi + 4]
push eax
push edx
mov edx, dword [edi + 8]
sub edx, eax
mov eax, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x4c]
push ebp
push eax
mov eax, dword [esp + 0x78]
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
push eax
call dword [0x814894]
cmp dword [esi], 0
jle 0x410479
mov ecx, dword [ebx]
mov edx, dword [esi + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebx + 4]
lea eax, [edx + ecx]
mov dword [esp + 0x3c], eax
mov eax, dword [esi]
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xc]
sub eax, edx
sub eax, ecx
sub eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x38]
add eax, dword [esp + 0x3c]
add dword [esp + 0x40], ecx
lea edx, [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x410479
mov edx, dword [esp + 0x38]
sub dword [esp + 0x40], edx
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
push edx
mov edx, dword [edi + 0xc]
sub edx, ecx
sub edx, eax
sub edx, dword [esi + 0xc]
add ecx, eax
mov eax, dword [edi]
push edx
mov edx, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push ebp
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
call dword [0x814894]
cmp dword [esi + 8], 0
jle 0x410524
mov eax, dword [esi + 8]
mov ecx, dword [ebx + 8]
mov edx, dword [esi + 4]
sub ecx, eax
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xc]
sub eax, dword [esi + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebx + 4]
sub eax, ecx
sub eax, dword [esi + 0xc]
add edx, ecx
mov ecx, dword [esp + 0x38]
add dword [esp + 0x40], ecx
add eax, edx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x410524
mov edx, dword [esp + 0x38]
sub dword [esp + 0x40], edx
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov ecx, dword [esi + 4]
mov eax, dword [edi + 4]
push edx
mov edx, dword [edi + 0xc]
sub edx, ecx
sub edx, eax
sub edx, dword [esi + 0xc]
add ecx, eax
mov eax, dword [edi + 8]
push edx
mov edx, dword [esi + 8]
push edx
push ecx
mov ecx, dword [esp + 0x54]
sub eax, edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
push ebp
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
call dword [0x814894]
mov edx, dword [esi]
test edx, edx
jle 0x4105b6
cmp dword [esi + 0xc], 0
jle 0x41065f
mov eax, dword [ebx]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 0xc]
add edx, dword [esp + 0x38]
sub eax, ecx
add ecx, eax
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x68]
push ecx
mov dword [esp + 0x40], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4105b6
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x38]
push edx
mov edx, dword [esi]
push eax
push edx
mov edx, dword [edi + 0xc]
sub edx, eax
mov eax, dword [edi]
push edx
mov edx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push ebp
push edx
mov edx, dword [esp + 0x78]
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x58]
push eax
push ecx
push edx
call dword [0x814894]
cmp dword [esi + 0xc], 0
jle 0x41065f
mov edx, dword [esi]
mov eax, dword [ebx]
mov ecx, dword [ebx + 0xc]
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0xc]
sub ecx, eax
mov eax, dword [ebx + 8]
sub eax, edx
sub eax, dword [ebx]
mov edx, dword [esi + 0xc]
sub eax, dword [esi + 8]
mov dword [esp + 0x44], edx
add eax, dword [esp + 0x38]
add dword [esp + 0x44], ecx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x41065f
mov edx, dword [esp + 0x3c]
sub dword [esp + 0x44], edx
mov ecx, dword [esp + 0x38]
sub dword [esp + 0x40], ecx
mov edx, dword [esp + 0x60]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
push edx
mov edx, dword [edi + 8]
sub edx, ecx
mov ecx, dword [edi]
push eax
sub edx, ecx
sub edx, dword [esi + 8]
push edx
mov edx, dword [edi + 0xc]
sub edx, eax
mov eax, dword [esi]
push edx
mov edx, dword [esp + 0x4c]
add eax, ecx
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x58]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push eax
push ecx
call dword [0x814894]
cmp dword [esi + 8], 0
jle 0x4106fa
cmp dword [esi + 0xc], 0
jle 0x4106fa
mov eax, dword [ebx + 8]
mov edx, dword [esi + 0xc]
mov ebx, dword [ebx + 0xc]
mov ecx, dword [esi + 8]
sub ebx, edx
sub eax, ecx
add edx, ebx
add ecx, eax
mov dword [esp + 0x44], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
push edx
mov dword [esp + 0x44], ecx
push eax
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x48], ebx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4106fa
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x44], eax
mov eax, dword [esi + 0xc]
mov ebx, dword [esp + 0x60]
mov esi, dword [esi + 8]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
push ebx
mov ebx, dword [edi + 0xc]
push eax
push esi
sub ebx, eax
mov eax, dword [edi + 8]
push ebx
sub eax, esi
push eax
mov eax, dword [esp + 0x58]
push ebp
sub ecx, edx
push eax
push ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
mov edx, dword [esp + 0x84]
push edx
call dword [0x814894]
mov eax, dword [esp + 0x34]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret