Function at 0x404100
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 0x404119
xor eax, eax
pop esi
add esp, 0x54
ret 0x14
push ebx
push ebp
push edi
call sub.MFC42.DLL_AfxLockTempMaps
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 8]
lea edi, [esi + 8]
mov ebp, dword [esp + 0x6c]
sub eax, ebx
mov edx, dword [edi + 4]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0xc]
sub eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
mov ecx, dword [ebp + 0x20]
mov ebx, dword [sym.imp.USER32.dll_UpdateWindow]
push ecx
call ebx
mov eax, dword [esp + 0x78]
test eax, eax
je 0x40416a
mov edx, dword [eax + 0x20]
push edx
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.00404440
mov edx, dword [esp + 0x70]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x14]
sub edx, ebx
mov ebx, dword [esp + 0x78]
sub eax, ecx
mov dword [esp + 0x10], edx
test ebx, ebx
mov dword [esp + 0x14], eax
je 0x4041db
mov ecx, dword [ebx + 0x20]
push 2
push 0
push ecx
call dword [sym.imp.USER32.dll_GetDCEx]
jmp 0x4041e5
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call sub.MFC42.DLL_CDC::FromHandle
mov dword [esp + 0x78], eax
push 0
push 0
lea eax, [esp + 0x50]
push 0
push eax
mov dword [esp + 0x7c], 0
call dword [sym.imp.USER32.dll_GetMessageA]
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
cmp eax, ebp
jne 0x4043cb
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [esp + 0x4c]
cmp eax, 0x202
ja 0x404362
je 0x40425b
cmp eax, 0x100
je 0x40424b
cmp eax, 0x200
je 0x40425b
jmp 0x404369
cmp dword [esp + 0x50], 0x1b
je 0x40439b
jmp 0x404374
mov edx, edi
mov eax, dword [edx]
mov dword [esp + 0x38], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x3c], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [edx + 0xc]
test eax, eax
mov dword [esp + 0x44], ecx
je 0x40428b
movsx edx, word [esp + 0x54]
sub edx, dword [esp + 0x10]
mov dword [eax], edx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4042a3
mov ecx, dword [esp + 0x54]
shr ecx, 0x10
movsx edx, cx
sub edx, dword [esp + 0x14]
mov dword [eax], edx
mov eax, dword [esp + 0x68]
cmp eax, 8
jne 0x4042c3
mov ecx, dword [edi]
mov edx, dword [esp + 0x20]
add ecx, edx
mov edx, dword [esi + 0xc]
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x24]
add edx, ecx
mov dword [esi + 0x14], edx
mov edx, dword [esi]
push edi
push eax
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [esp + 0x4c]
xor eax, eax
cmp ecx, 0x202
lea ecx, [esp + 0x38]
sete al
push edi
push ecx
mov dword [esi + 0x48], eax
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
je 0x4042f5
mov eax, dword [esi + 0x48]
test eax, eax
je 0x40433f
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x404316
mov eax, dword [esp + 0x78]
mov edx, dword [esi]
push ebp
push eax
lea ecx, [esp + 0x40]
push ebx
push ecx
mov ecx, esi
mov dword [esi + 0x44], 1
call dword [edx]
mov edx, dword [esi]
lea eax, [esp + 0x38]
push eax
mov ecx, esi
call dword [edx + 8]
cmp dword [esp + 0x4c], 0x202
je 0x404334
mov dword [esp + 0x6c], 1
mov eax, dword [esi + 0x48]
test eax, eax
jne 0x4043cb
lea ecx, [esp + 0x38]
push edi
push ecx
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x404374
mov edx, dword [esi]
mov dword [esi + 0x44], eax
mov eax, dword [esp + 0x78]
push ebp
push eax
push ebx
push edi
mov ecx, esi
call dword [edx]
jmp 0x404374
cmp eax, 0x204
je 0x40439b
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
lea edx, [esp + 0x50]
push 0
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
cmp eax, ebp
je 0x40421c
jmp 0x4043cb
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x4043ae
mov eax, 1
mov dword [esi + 0x48], eax
mov dword [esi + 0x44], eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, edi
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x78]
test ebx, ebx
mov ecx, dword [eax + 4]
push ecx
je 0x4043dc
mov edx, dword [ebx + 0x20]
jmp 0x4043df
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
call dword [sym.imp.USER32.dll_ReleaseCapture]
xor ebx, ebx
push ebx
call sub.MFC42.DLL_AfxUnlockTempMaps
cmp dword [esp + 0x6c], ebx
jne 0x404417
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, edi
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [esp + 0x28]
push edi
push eax
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ebx
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