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

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
push eax
push ecx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov edx, dword [esp + 0x74]
push eax
push edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_GetWindowRgn]
mov eax, dword [esp + 0x6c]
movsx eax, byte [eax + 0xf]
mov esi, dword [edi + 8]
sub esi, dword [edi]
mov ebp, dword [edi + 0xc]
sub ebp, dword [edi + 4]
add eax, eax
lea ecx, [eax + esi]
add eax, ebp
cmp ebp, eax
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
jle 0x40eda2
mov ebx, ebp
mov dword [esp + 0x30], ebp
jmp 0x40edaa
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x30], ebx
xor ecx, ecx
lea edi, [ebx + 2]
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
mov dword [esp + 0x74], eax
mov eax, ecx
mov ecx, 4
mul ecx
mov ecx, dword [esp + 0x74]
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004129bc
xor ecx, ecx
mov edi, eax
mov eax, ebp
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x18], edi
neg ecx
or ecx, eax
xor eax, eax
mov dword [esp + 0x78], eax
mov eax, ecx
mov ecx, 4
mul ecx
mov ecx, dword [esp + 0x78]
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004129bc
mov edx, dword [esp + 0x74]
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [edi], esi
mov dword [edi + 4], eax
mov dword [edi + ebx*8 + 8], esi
mov dword [edi + ebx*8 + 0xc], eax
mov al, byte [edx + 0xf]
add esp, 8
test al, al
jle 0x40ee7f
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x74], 0
lea eax, [edi + 0xc]
lea ecx, [edi + ecx*8]
inc dword [esp + 0x74]
mov dword [eax - 4], esi
mov dword [eax], 0
mov dword [ecx], esi
mov dword [ecx + 4], 0
movsx ebx, byte [edx + 0xf]
add eax, 8
sub ecx, 8
cmp dword [esp + 0x74], ebx
jl 0x40ee4a
mov edx, dword [esp + 0x6c]
movsx eax, byte [edx + 0xf]
lea ecx, [edi + eax*8]
mov dword [esp + 0x14], ecx
xor ebx, ebx
test ebp, ebp
jle 0x40ef22
mov ebp, dword [esp + 0x14]
add ebp, 8
xor edi, edi
test esi, esi
jle 0x40eec6
mov edx, dword [esp + 0x34]
push ebx
push edi
push edx
call dword [sym.imp.GDI32.dll_PtInRegion]
test eax, eax
jne 0x40eeae
inc edi
cmp edi, esi
jl 0x40ee96
jmp 0x40eec6
mov eax, dword [esp + 0x6c]
movsx ecx, byte [eax + 0xf]
mov edx, dword [esp + 0x1c]
add ecx, edi
cmp edi, esi
mov dword [ebp], ecx
mov dword [edx + ebx*8], edi
jl 0x40eedb
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov dword [ebp], esi
mov dword [ebp + 4], ecx
mov dword [eax + ebx*8], esi
mov dword [eax + ebx*8 + 4], ecx
jmp 0x40ef14
lea edi, [esi - 1]
cmp edi, dword [ebp]
jl 0x40ef14
mov eax, dword [esp + 0x34]
push ebx
push edi
push eax
call dword [sym.imp.GDI32.dll_PtInRegion]
test eax, eax
jne 0x40eefc
dec edi
cmp edi, dword [ebp]
jge 0x40eee3
jmp 0x40ef14
mov ecx, dword [esp + 0x6c]
movsx edx, byte [ecx + 0xf]
mov ecx, dword [esp + 0x1c]
lea eax, [edx + edi + 1]
inc edi
mov dword [ebp + 4], eax
mov dword [ecx + ebx*8 + 4], edi
inc ebx
add ebp, 8
cmp ebx, dword [esp + 0x5c]
jl 0x40ee90
mov edx, dword [esp + 0x6c]
mov al, byte [edx + 0xf]
test al, al
jle 0x40ef3d
mov ecx, dword [esp + 0x14]
movsx eax, al
neg eax
lea edx, [ecx + eax*8]
mov dword [esp + 0x14], edx
mov ebp, dword [esp + 0x30]
xor ecx, ecx
lea eax, [ebp + 2]
mov edx, 2
mul edx
seto cl
xor ebx, ebx
neg ecx
or ecx, eax
mov eax, ecx
mov ecx, 4
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.004129bc
mov ecx, dword [esp + 0x70]
mov edi, eax
xor edx, edx
mov dword [edi], esi
mov dword [edi + 4], edx
mov dword [edi + ebp*8 + 8], esi
mov dword [edi + ebp*8 + 0xc], edx
movsx eax, byte [ecx + 0xf]
movzx esi, byte [ecx + 0xe]
sub esi, eax
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x44], edi
mov dword [esp + 0x74], edx
test esi, esi
jle 0x40f03a
lea ebx, [ebp + 1]
mov dword [esp + 0x44], ebx
mov esi, 1
cmp ebx, esi
jle 0x40f00f
add eax, 0x10
mov ecx, dword [eax - 8]
mov edx, dword [eax]
cmp ecx, edx
mov ebp, ecx
jg 0x40efc2
mov ebp, edx
mov ebx, dword [eax - 0x10]
cmp ebx, ebp
jle 0x40efcd
mov ecx, ebx
jmp 0x40efd3
cmp ecx, edx
jg 0x40efd3
mov ecx, edx
inc ecx
mov dword [edi + esi*8], ecx
mov edx, dword [eax - 4]
mov ecx, dword [eax + 4]
cmp edx, ecx
mov ebp, edx
jl 0x40efe5
mov ebp, ecx
mov ebx, dword [eax - 0xc]
cmp ebx, ebp
jge 0x40eff0
mov ecx, ebx
jmp 0x40eff6
cmp edx, ecx
jge 0x40eff6
mov ecx, edx
mov ebx, dword [esp + 0x44]
dec ecx
mov dword [edi + esi*8 + 4], ecx
inc esi
add eax, 8
cmp esi, ebx
jl 0x40efb5
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
movsx esi, byte [ecx + 0xf]
movzx ebp, byte [ecx + 0xe]
mov edx, edi
mov edi, eax
mov eax, edx
mov edx, dword [esp + 0x74]
inc edx
sub ebp, esi
cmp edx, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x74], edx
jl 0x40efa9
mov dword [esp + 0x44], edi
xor edx, edx
mov bl, byte [ecx + 0xf]
test bl, bl
jge 0x40f046
movsx edx, bl
neg edx
movzx ecx, byte [ecx + 0xe]
lea edx, [eax + edx*8 + 8]
movsx eax, bl
cmp eax, ecx
mov dword [esp + 0x14], edx
jle 0x40f061
mov edx, eax
mov dword [esp + 0x10], edx
jmp 0x40f067
mov edx, ecx
mov dword [esp + 0x10], ecx
cmp eax, ecx
jle 0x40f073
sub eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x40f07b
mov dword [esp + 0x2c], 0
lea esi, [edx + edx]
lea eax, [esi + 1]
imul eax, eax
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004129bc
add esp, 4
mov dword [esp + 0x30], eax
mov edi, eax
test esi, esi
jl 0x40f279
mov ecx, dword [esp + 0x10]
mov eax, ecx
neg eax
mov dword [esp + 0x20], eax
lea eax, [ecx + ecx]
inc eax
mov dword [esp + 0x18], eax
nop
mov eax, dword [esp + 0x10]
add eax, eax
js 0x40f266
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x6c]
mov ecx, eax
imul ecx, eax
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x10]
mov eax, ecx
fild dword [esp + 0x74]
neg eax
mov dword [esp + 0x24], eax
lea eax, [ecx + ecx]
fstp qword [esp + 0x48]
inc eax
fild dword [esp + 0x2c]
mov dword [esp + 0x28], eax
fstp qword [esp + 0x60]
fild dword [esp + 0x24]
fmul st(0), st(0)
fadd qword [esp + 0x48]
call fcn.004d3440
fld qword [esp + 0x60]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x40f18d
mov ecx, dword [ebp + 0x1c]
fstp st(1)
mov bl, byte [ebp + 0xd]
fstp st(0)
movzx edx, cl
movzx esi, bl
imul edx, esi
mov eax, 0x80808081
mul edx
shr edx, 7
mov eax, edx
movzx edx, bl
shl edx, 8
or eax, edx
mov edx, ecx
shr edx, 8
movzx edx, dl
imul edx, esi
shl eax, 8
mov dword [esp + 0x74], eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x74]
shr ecx, 0x10
movzx ecx, cl
shr edx, 7
imul ecx, esi
or eax, edx
shl eax, 8
mov dword [esp + 0x74], eax
mov eax, 0x80808081
mul ecx
mov eax, dword [esp + 0x74]
shr edx, 7
or eax, edx
mov dword [edi], eax
jmp 0x40f250
fild dword [esp + 0x10]
fcomp st(2)
fnstsw ax
test ah, 1
jne 0x40f246
movzx edx, byte [ebp + 0xe]
fsubp st(1)
inc edx
mov dword [esp + 0x74], edx
movzx eax, byte [ebp + 0xd]
fild dword [esp + 0x74]
mov dword [esp + 0x74], eax
mov ecx, dword [ebp + 0x1c]
fdivp st(1)
movzx edx, cl
fld1
fsubrp st(1)
fild dword [esp + 0x74]
fnstcw word [esp + 0x74]
fmulp st(1)
movzx eax, word [esp + 0x74]
or eax, 0xc00
mov dword [esp + 0x38], eax
mov eax, 0x80808081
fldcw word [esp + 0x38]
fistp qword [esp + 0x38]
mov ebx, dword [esp + 0x38]
movzx esi, bl
shl ebx, 8
imul edx, esi
fldcw word [esp + 0x74]
mul edx
shr edx, 7
mov eax, edx
mov edx, ecx
shr edx, 8
movzx edx, dl
or eax, ebx
imul edx, esi
shl eax, 8
mov dword [esp + 0x74], eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x74]
shr ecx, 0x10
movzx ecx, cl
shr edx, 7
imul ecx, esi
or eax, edx
shl eax, 8
mov dword [esp + 0x74], eax
mov eax, 0x80808081
mul ecx
mov eax, dword [esp + 0x74]
shr edx, 7
or eax, edx
mov dword [edi], eax
jmp 0x40f250
fstp st(1)
mov dword [edi], 0
fstp st(0)
mov eax, 1
add dword [esp + 0x24], eax
add edi, 4
sub dword [esp + 0x28], eax
jne 0x40f101
mov eax, 1
add dword [esp + 0x20], eax
sub dword [esp + 0x18], eax
jne 0x40f0c0
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x10]
mov eax, ebp
sub eax, esi
cmp esi, eax
mov dword [esp + 0x48], eax
jge 0x40f43e
mov edx, dword [esp + 0x14]
lea ecx, [edx + esi*8 - 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x50]
lea edx, [ebp*4 - 4]
imul edx, ecx
neg ecx
add ecx, ecx
add ecx, ecx
sub eax, esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], eax
nop
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 4]
cmp edx, dword [eax + 8]
jge 0x40f41c
mov edi, eax
mov ebx, dword [edi + 4]
mov eax, ebx
sub eax, dword [esp + 0x10]
mov dword [esp + 0x74], ebx
add eax, eax
add eax, eax
mov dword [esp + 0x28], eax
mov eax, dword [edi - 4]
mov ecx, dword [edi + 0xc]
cmp eax, ecx
mov esi, eax
jg 0x40f2f5
mov esi, ecx
mov edx, dword [edi + 8]
inc esi
cmp esi, edx
jge 0x40f306
cmp eax, ecx
jg 0x40f303
mov eax, ecx
lea edx, [eax + 1]
cmp ebx, edx
jge 0x40f375
mov eax, dword [esp + 0x10]
add eax, eax
js 0x40f35f
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
lea ecx, [eax*4 + 4]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x24]
add ecx, edx
add ecx, dword [esp + 0x70]
lea ebp, [eax + 1]
mov edi, dword [esp + 0x10]
add edi, edi
mov eax, ecx
js 0x40f352
mov esi, ebx
sub esi, ecx
inc edi
mov edx, dword [esi + eax]
cmp dword [eax], edx
jae 0x40f34a
mov dword [eax], edx
add eax, 4
sub edi, 1
jne 0x40f341
add ebx, dword [esp + 0x2c]
add ecx, dword [esp + 0x20]
sub ebp, 1
jne 0x40f332
inc dword [esp + 0x74]
add dword [esp + 0x28], 4
mov ebx, dword [esp + 0x74]
mov edi, dword [esp + 0x18]
jmp 0x40f2e7
mov eax, dword [edi]
mov ecx, dword [edi + 0x10]
cmp eax, ecx
mov edx, eax
jl 0x40f382
mov edx, ecx
dec edx
cmp ebx, edx
jg 0x40f394
cmp eax, ecx
jl 0x40f38d
mov eax, ecx
lea ebx, [eax - 1]
mov dword [esp + 0x74], ebx
cmp ebx, dword [edi + 8]
jge 0x40f41c
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x10]
add eax, eax
add eax, eax
mov dword [esp + 0x28], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x10]
add eax, eax
js 0x40f405
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
lea edx, [eax*4 + 4]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x28]
add ecx, edx
add ecx, dword [esp + 0x70]
lea ebp, [eax + 1]
mov edi, dword [esp + 0x10]
add edi, edi
mov eax, ecx
js 0x40f3f8
mov esi, ebx
sub esi, ecx
inc edi
mov edx, dword [esi + eax]
cmp dword [eax], edx
jae 0x40f3f0
mov dword [eax], edx
add eax, 4
sub edi, 1
jne 0x40f3e7
add ebx, dword [esp + 0x2c]
add ecx, dword [esp + 0x20]
sub ebp, 1
jne 0x40f3d8
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x18]
add dword [esp + 0x28], 4
inc eax
cmp eax, dword [ecx + 8]
mov dword [esp + 0x74], eax
jl 0x40f3b0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
add dword [esp + 0x24], eax
add edx, 8
sub dword [esp + 0x38], 1
mov dword [esp + 0x18], edx
jne 0x40f2c0
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x6c]
mov ecx, dword [esi + 0x1c]
mov al, byte [esi + 0xd]
movzx edi, al
movzx edx, cl
imul edx, edi
mov eax, 0x80808081
mul edx
movzx eax, byte [esi + 0xd]
shr edx, 7
mov ebx, edx
mov edx, ecx
shr edx, 8
movzx edx, dl
imul edx, edi
shl eax, 8
or ebx, eax
shr ecx, 0x10
mov eax, 0x80808081
mul edx
movzx ecx, cl
imul ecx, edi
shr edx, 7
shl ebx, 8
or ebx, edx
mov eax, 0x80808081
mul ecx
movsx eax, byte [esi + 0xf]
mov ecx, dword [esp + 0x10]
shr edx, 7
shl ebx, 8
or ebx, edx
movsx edx, byte [esi + 0x11]
sub eax, edx
xor edx, edx
test eax, eax
setle dl
mov dword [esp + 0x74], ebx
dec edx
and edx, eax
cmp ecx, edx
jl 0x40f4c2
xor ecx, ecx
test eax, eax
setle cl
dec ecx
and ecx, eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x50]
lea edi, [eax + ecx*8 + 4]
mov eax, edx
neg eax
add eax, eax
sub ebp, ecx
add eax, eax
dec ebp
imul ebp, edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
lea eax, [edx + ebp*4]
mov dword [esp + 0x70], eax
movsx edx, byte [esi + 0xf]
movsx eax, byte [esi + 0x11]
mov ebp, dword [esp + 0x5c]
mov esi, edx
sub esi, eax
add esi, ebp
lea edx, [ebp + edx*2]
cmp esi, edx
mov edx, dword [esp + 0x6c]
movsx esi, byte [edx + 0xf]
mov dword [esp + 0x2c], edi
jge 0x40f519
mov edx, esi
sub edx, eax
add edx, ebp
jmp 0x40f51d
lea edx, [ebp + esi*2]
mov ebp, dword [esp + 0x48]
cmp ebp, edx
jle 0x40f529
mov edx, ebp
jmp 0x40f551
mov edx, dword [esp + 0x6c]
movsx edx, byte [edx + 0xf]
mov ebx, dword [esp + 0x5c]
mov ebp, edx
sub ebp, eax
add ebp, ebx
lea edx, [ebx + edx*2]
cmp ebp, edx
jge 0x40f54a
mov edx, esi
sub edx, eax
add edx, ebx
jmp 0x40f54d
lea edx, [ebx + esi*2]
mov ebx, dword [esp + 0x74]
cmp ecx, edx
mov ebp, dword [esp + 0x1c]
jge 0x40f6f5
sub eax, esi
add eax, ecx
js 0x40f6cd
cmp eax, dword [esp + 0x5c]
jge 0x40f6cd
mov eax, dword [edi - 4]
mov dword [esp + 0x38], eax
jmp 0x40f580
mov esi, dword [esp + 0x6c]
movsx eax, byte [esi + 0x11]
movsx edx, byte [esi + 0xf]
movsx esi, byte [esi + 0x10]
mov edi, dword [edi]
mov ebx, eax
sub ebx, edx
add ebx, ecx
mov ebx, dword [ebp + ebx*8]
sub ebx, esi
add ebx, edx
cmp ebx, edi
mov ebx, dword [esp + 0x6c]
jge 0x40f5ba
movsx edx, byte [ebx + 0xf]
sub eax, edx
add eax, ecx
mov eax, dword [ebp + eax*8]
sub eax, esi
add eax, edx
jmp 0x40f5bc
mov eax, edi
mov edx, dword [esp + 0x38]
cmp edx, eax
jge 0x40f5da
mov eax, dword [esp + 0x74]
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x2c]
mov dword [esi + edx*4], eax
inc edx
mov dword [esp + 0x38], edx
jmp 0x40f580
movsx eax, byte [ebx + 0x11]
movsx edx, byte [ebx + 0xf]
movsx esi, byte [ebx + 0x10]
mov edi, eax
sub edi, edx
add edi, ecx
mov edi, dword [ebp + edi*8]
sub edi, esi
add edi, edx
test edi, edi
jle 0x40f60a
movsx edx, byte [ebx + 0xf]
sub eax, edx
add eax, ecx
mov edi, dword [ebp + eax*8]
sub edi, esi
add edi, edx
jmp 0x40f610
xor edi, edi
lea esp, [esp]
movsx eax, byte [ebx + 0x11]
movsx edx, byte [ebx + 0xf]
movsx esi, byte [ebx + 0x10]
mov ebx, eax
sub ebx, edx
add ebx, ecx
mov ebx, dword [ebp + ebx*8 + 4]
sub ebx, esi
add ebx, edx
mov edx, dword [esp + 0x50]
cmp ebx, edx
mov ebx, dword [esp + 0x6c]
jge 0x40f648
movsx edx, byte [ebx + 0xf]
sub eax, edx
add eax, ecx
mov eax, dword [ebp + eax*8 + 4]
sub eax, esi
add eax, edx
jmp 0x40f64a
mov eax, edx
cmp edi, eax
jge 0x40f660
mov edx, dword [esp + 0x70]
mov ebx, dword [esp + 0x6c]
mov dword [edx + edi*4], 0
inc edi
jmp 0x40f610
movsx esi, byte [ebx + 0x10]
movsx edx, byte [ebx + 0x11]
movsx eax, byte [ebx + 0xf]
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x38], esi
mov esi, edx
sub esi, eax
movsx eax, byte [ebx + 0xf]
add esi, ecx
mov esi, dword [ebp + esi*8 + 4]
sub esi, dword [esp + 0x38]
add esi, eax
mov eax, dword [edi - 4]
cmp esi, eax
jle 0x40f6a1
movsx esi, byte [ebx + 0xf]
sub edx, esi
add edx, ecx
mov eax, dword [ebp + edx*8 + 4]
sub eax, dword [esp + 0x38]
add eax, esi
cmp eax, dword [edi]
mov ebx, dword [esp + 0x74]
mov edx, dword [esp + 0x70]
jge 0x40f6e0
lea ecx, [ecx]
mov dword [edx + eax*4], ebx
inc eax
cmp eax, dword [edi]
jl 0x40f6b0
add edx, dword [esp + 0x20]
mov esi, dword [esp + 0x6c]
inc ecx
mov dword [esp + 0x70], edx
add edi, 8
jmp 0x40f4eb
mov eax, dword [edi - 4]
cmp eax, dword [edi]
mov edx, dword [esp + 0x70]
jge 0x40f6e0
mov dword [edx + eax*4], ebx
inc eax
cmp eax, dword [edi]
jl 0x40f6d8
add edx, dword [esp + 0x20]
mov esi, dword [esp + 0x6c]
inc ecx
mov dword [esp + 0x70], edx
add edi, 8
jmp 0x40f4eb
mov eax, dword [esp + 0x6c]
mov al, byte [eax + 0xf]
test al, al
jge 0x40f707
movsx eax, al
neg eax
jmp 0x40f709
xor eax, eax
lea ecx, [eax*8 + 8]
mov eax, dword [esp + 0x14]
sub eax, ecx
push eax
call fcn.004129c7
mov edx, dword [esp + 0x48]
push edx
call fcn.004129c7
push ebp
call fcn.004129c7
mov eax, dword [esp + 0x3c]
push eax
call fcn.004129c7
mov ecx, dword [esp + 0x44]
add esp, 0x10
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc