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

Disassembly:
sub esp, 0x54
push esi
mov esi, ecx
call dword [sym.imp.USER32.dll_GetCapture]
test eax, eax
je 0x40e849
xor eax, eax
pop esi
add esp, 0x54
ret 0x14
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
push ebx
push ebp
push edi
lea edi, [esi + 8]
mov ebp, dword [esi + 0xc]
sub eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x14]
sub eax, ebp
mov ebp, dword [esp + 0x6c]
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.USER32.dll_SetCapture]
mov ebx, dword [sym.imp.USER32.dll_UpdateWindow]
push ebp
call ebx
mov eax, dword [esp + 0x78]
test eax, eax
je 0x40e886
push eax
call ebx
mov eax, edi
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x2c], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x14]
mov dword [esp + 0x34], edx
push eax
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x70]
lea eax, [esp + 0x20]
push edx
push eax
push ecx
mov ecx, esi
call fcn.0040eb70
mov edx, dword [esp + 0x70]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x74]
sub edx, ebx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
sub eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x78]
test eax, eax
je 0x40e8f4
push 2
push 0
push eax
call dword [sym.imp.USER32.dll_GetDCEx]
jmp 0x40e8fb
push ebp
call dword [sym.imp.USER32.dll_GetDC]
push 0
push 0
lea ecx, [esp + 0x50]
mov ebx, eax
push ebp
push ecx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], 0
call dword [sym.imp.USER32.dll_GetMessageW]
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, ebp
jne 0x40eb02
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov eax, dword [esp + 0x4c]
cmp eax, 0x202
ja 0x40eaa0
je 0x40e969
cmp eax, 0x100
je 0x40e959
cmp eax, 0x200
je 0x40e969
jmp 0x40eaa7
cmp dword [esp + 0x50], 0x1b
je 0x40ead2
jmp 0x40eab2
mov eax, edi
mov ecx, dword [eax]
mov dword [esp + 0x38], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x44], edx
je 0x40e999
movsx ecx, word [esp + 0x54]
sub ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40e9b1
mov edx, dword [esp + 0x54]
shr edx, 0x10
movsx ecx, dx
sub ecx, dword [esp + 0x14]
mov dword [eax], ecx
cmp dword [esp + 0x68], 8
jne 0x40ea10
cmp dword [edi], 0
jge 0x40e9c3
mov dword [edi], 0
mov ecx, dword [edi]
mov edx, dword [esp + 0x20]
mov eax, dword [0x41e628]
add ecx, edx
cmp ecx, eax
jle 0x40e9d8
sub eax, edx
mov dword [edi], eax
mov eax, dword [esi + 0xc]
test eax, eax
jge 0x40e9e6
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov ecx, dword [esp + 0x24]
mov eax, dword [0x41e62c]
add ebx, ecx
cmp ebx, eax
jle 0x40e9fd
sub eax, ecx
mov dword [esi + 0xc], eax
mov eax, dword [edi]
mov ebx, dword [esp + 0x70]
add eax, edx
mov edx, dword [esi + 0xc]
add edx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov ecx, dword [esp + 0x68]
mov eax, dword [esi]
push edi
push ecx
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [esp + 0x4c]
xor edx, edx
cmp ecx, 0x202
lea eax, [esp + 0x38]
sete dl
push edi
push eax
mov dword [esi + 0x38], edx
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
je 0x40ea46
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40ea81
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x40ea64
mov edx, dword [esi]
push ebp
push ebx
lea eax, [esp + 0x40]
push 0
push eax
mov ecx, esi
mov dword [esi + 0x34], 1
call dword [edx]
cmp dword [esp + 0x4c], 0x202
je 0x40ea76
mov dword [esp + 0x6c], 1
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x40eb02
lea ecx, [esp + 0x38]
push edi
push ecx
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x40eab2
mov edx, dword [esi]
push ebp
push ebx
push eax
push edi
mov ecx, esi
mov dword [esi + 0x34], eax
call dword [edx]
jmp 0x40eab2
cmp eax, 0x204
je 0x40ead2
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
lea ecx, [esp + 0x50]
push ebp
push ecx
call dword [sym.imp.USER32.dll_GetMessageW]
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, ebp
je 0x40e92a
jmp 0x40eb02
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x40eae5
mov eax, 1
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, edi
mov dword [edx], eax
mov eax, dword [esp + 0x30]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x34]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
mov eax, dword [esp + 0x78]
push ebx
test eax, eax
je 0x40eb0e
push eax
jmp 0x40eb0f
push ebp
call dword [sym.imp.USER32.dll_ReleaseDC]
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov ecx, dword [esp + 0x6c]
xor eax, eax
cmp ecx, eax
jne 0x40eb42
mov ecx, dword [esp + 0x28]
mov edx, edi
mov dword [edx], ecx
mov ecx, dword [esp + 0x2c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x30]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x34]
mov dword [edx + 0xc], ecx
lea edx, [esp + 0x28]
push edi
push edx
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], eax
call dword [sym.imp.USER32.dll_EqualRect]
neg eax
pop edi
pop ebp
sbb eax, eax
pop ebx
inc eax
pop esi
add esp, 0x54
ret 0x14