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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x413a01
push eax
mov dword fs:[0], esp
sub esp, 0xa4
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x34]
test eax, eax
jne 0x40a29f
xor eax, eax
jmp 0x40ac5b
xor edi, edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], edi
call sub.MFC42.DLL_CString::CString_2
mov dword [esp + 0xbc], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 0x416d90
mov ecx, dword [esi + 0x34]
push esi
mov byte [esp + 0xc0], 1
call fcn.00407530
mov eax, dword [esp + 0xcc]
mov ecx, dword [esp + 0xd0]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
mov edi, ecx
mov ecx, esi
call fcn.0040adc0
mov edx, dword [esp + 0xc8]
mov ecx, dword [esi + 0x34]
lea ebp, [eax + edi - 1]
mov eax, dword [edx + 8]
mov dword [esp + 0x18], eax
call fcn.00407510
mov eax, dword [eax]
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [sym.imp.USER32.dll_SetRect]
add eax, 5
push ecx
lea ebx, [esi + 0x40]
push edi
push eax
push ebx
call ebp
mov ecx, dword [esi + 0x34]
call fcn.00407510
mov eax, dword [eax + 4]
neg eax
push eax
push 0
push ebx
call dword [sym.imp.USER32.dll_OffsetRect]
mov ebx, dword [esi + 0x3c]
mov ecx, esi
call fcn.0040adc0
mov ecx, dword [esi + 0x34]
lea edx, [eax + ebx - 1]
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x18], edx
mov edi, dword [eax + 8]
sub edi, 2
call fcn.00407510
mov ecx, dword [esp + 0x18]
mov eax, dword [eax]
push ecx
push edi
push ebx
lea edx, [esp + 0x80]
push eax
push edx
call ebp
mov ecx, dword [esi + 0x34]
call fcn.00407510
mov eax, dword [eax + 4]
neg eax
push eax
lea eax, [esp + 0x78]
push 0
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, esi
call fcn.0040adc0
mov ecx, dword [esi + 0x38]
mov edi, dword [esi + 0x3c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esi + 0x34]
mov dword [esp + 0x24], eax
call fcn.00407510
mov edx, dword [eax + 4]
mov ecx, dword [esi + 0x34]
sub edi, edx
mov dword [esp + 0x40], edi
call fcn.00407510
mov edx, dword [eax]
mov ecx, esi
mov dword [esp + 0x68], edx
call fcn.0040a1f0
cmp eax, 1
jne 0x40a414
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0xc8]
mov ecx, edi
lea ebx, [ecx + eax]
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x3c]
push ebx
push eax
push ecx
lea edi, [edx + 0x10]
lea eax, [esp + 0x34]
push edi
push eax
mov dword [esp + 0x4c], ebx
call ebp
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0x40]
push ebx
mov eax, dword [ecx + 8]
push eax
push edx
lea eax, [esp + 0xa0]
push edi
push eax
jmp 0x40a449
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x68]
add ecx, edi
push ecx
lea eax, [edx + 0x10]
push ebx
push edi
push eax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x4c], ecx
call ebp
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x94]
push ecx
push ebx
push edi
push 0x10
push edx
call ebp
mov ecx, esi
call fcn.0040a1f0
cmp eax, 1
jne 0x40a53c
mov eax, dword [esi + 0x8c]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CGdiObject::Attach
mov ecx, dword [esi + 0x34]
call fcn.00408290
mov edi, dword [esp + 0xc4]
cmp eax, 1
je 0x40a4af
mov ecx, dword [esi + 0x34]
call sub.MFC42.DLL_CWnd::IsWindowEnabled
test eax, eax
je 0x40a4af
push 5
call dword [sym.imp.USER32.dll_GetSysColorBrush]
test eax, eax
je 0x40a4ab
push eax
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
jmp 0x40a4bb
xor ebx, ebx
jmp 0x40a4bd
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call sub.MFC42.DLL_CDC::SelectObject
mov ebx, eax
mov ecx, esi
call fcn.0040b200
mov ecx, dword [esp + 0x34]
test eax, eax
je 0x40a4f0
mov ebp, dword [esp + 0xc8]
mov edx, dword [esp + 0x2c]
sub ecx, edx
push 0xf00021
mov eax, dword [ebp + 8]
push ecx
sub eax, dword [ebp]
inc eax
push eax
push edx
mov edx, dword [edi + 4]
push 0
push edx
jmp 0x40a515
mov eax, dword [esp + 0xc8]
mov ebp, dword [esp + 0x2c]
sub ecx, ebp
push 0xf00021
mov edx, dword [eax]
mov eax, dword [eax + 8]
sub eax, edx
push ecx
inc eax
add edx, 0x10
push eax
mov eax, dword [edi + 4]
push ebp
push edx
push eax
call dword [sym.imp.GDI32.dll_PatBlt]
test ebx, ebx
je 0x40a52a
mov ecx, dword [edi + 4]
push ebx
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
lea edx, [esp + 0x10]
test edx, edx
je 0x40a591
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40a591
jmp 0x40a588
mov eax, dword [esi + 0x84]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CGdiObject::Attach
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0xc4]
lea eax, [esp + 0x10]
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [edi + 4]
push eax
lea eax, [esp + 0x78]
push eax
push ecx
call dword [sym.imp.USER32.dll_FillRect]
lea edx, [esp + 0x10]
test edx, edx
je 0x40a591
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40a591
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov ecx, esi
call fcn.0040a140
test eax, eax
je 0x40a628
mov eax, dword [esi + 0x3c]
mov dword [esi + 0x24], 4
add eax, 5
mov dword [esi + 0x2c], 0xc
mov dword [esi + 0x28], eax
add eax, 8
mov dword [esi + 0x30], eax
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x2c]
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x30]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esi + 0x34]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], eax
call fcn.00407510
mov eax, dword [eax + 4]
lea ecx, [esp + 0x58]
neg eax
push eax
push 0
push ecx
call dword [sym.imp.USER32.dll_OffsetRect]
test edi, edi
jne 0x40a5fc
xor ebp, ebp
jmp 0x40a5ff
mov ebp, dword [edi + 4]
mov ecx, esi
call fcn.0040a1f0
neg eax
sbb eax, eax
mov ecx, esi
inc eax
push eax
call fcn.0040cbc0
mov edx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x60]
push edx
push eax
push ebp
mov ecx, esi
call fcn.0040add0
jmp 0x40a632
lea ecx, [esi + 0x24]
push ecx
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov ecx, esi
call fcn.0040a1f0
test eax, eax
jne 0x40a67a
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ebx, eax
test edi, edi
mov dword [esp + 0x20], ebx
jne 0x40a66d
xor eax, eax
push ebx
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
jmp 0x40a67e
mov eax, dword [edi + 4]
push ebx
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
jmp 0x40a67e
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x58], eax
mov dword [esp + 0x64], ecx
add eax, 5
mov ecx, esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], eax
call fcn.0040a1f0
test eax, eax
jne 0x40a724
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x78], eax
mov eax, dword [esi + 0x94]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x34]
push eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], edx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CGdiObject::Attach
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
neg eax
mov ecx, dword [edi + 4]
sbb eax, eax
and eax, edx
push eax
lea eax, [esp + 0x78]
push eax
push ecx
call dword [sym.imp.USER32.dll_FillRect]
lea edx, [esp + 0x10]
test edx, edx
je 0x40a724
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40a724
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CGdiObject::DeleteObject
push ecx
lea eax, [esi + 8]
mov ecx, esp
mov dword [esp + 0x58], esp
push eax
call fcn.0041283a
mov ecx, esi
call fcn.0040aeb0
test eax, eax
jne 0x40a994
mov ecx, esi
call fcn.0040a1f0
mov ebp, dword [edi]
cmp eax, 1
jne 0x40a770
call fcn.00407270
push eax
mov ecx, edi
call dword [ebp + 0x30]
mov ecx, dword [esi + 0x90]
mov dword [esp + 0x18], eax
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x38]
jmp 0x40a78d
call fcn.00407260
push eax
mov ecx, edi
call dword [ebp + 0x30]
mov edx, dword [edi]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x90]
mov ecx, edi
push eax
call dword [edx + 0x38]
push 1
mov ecx, edi
mov dword [esp + 0x70], eax
call sub.MFC42.DLL_CDC::SetBkMode
mov ecx, esi
mov dword [esp + 0x54], eax
call fcn.0040a170
cmp eax, 1
jne 0x40a852
push 8
call dword [sym.imp.GDI32.dll_GetStockObject]
test eax, eax
je 0x40a7cb
mov ecx, dword [edi + 4]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ecx
call ebx
mov ebp, eax
jmp 0x40a7d3
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
xor ebp, ebp
push 0xd
call dword [sym.imp.USER32.dll_GetSysColorBrush]
test eax, eax
je 0x40a7ec
mov edx, dword [edi + 4]
push eax
push edx
call ebx
mov dword [esp + 0x70], eax
jmp 0x40a7f4
mov dword [esp + 0x70], 0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x2c]
add ecx, 5
push edx
push ecx
mov ecx, dword [edi + 4]
push eax
push 0x10
push ecx
call dword [sym.imp.GDI32.dll_Rectangle]
test ebp, ebp
je 0x40a82f
mov edx, dword [edi + 4]
push ebp
push edx
call ebx
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40a83e
push eax
mov eax, dword [edi + 4]
push eax
call ebx
mov ebx, dword [edi]
push 0x14
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
mov ecx, edi
call dword [ebx + 0x38]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esi + 0x34]
call sub.MFC42.DLL_CWnd::IsWindowEnabled
test eax, eax
jne 0x40a86e
mov ebp, dword [edi]
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
mov ecx, edi
call dword [ebp + 0x38]
mov ecx, esi
call fcn.0040b140
mov ecx, dword [esp + 0x58]
cmp eax, 1
mov dword [esp + 0x44], ecx
jne 0x40a8e4
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov ebp, dword [esp + 0x64]
mov dword [esp + 0x48], edx
add edx, 5
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], edx
mov edx, dword [esi + 8]
sub eax, ecx
push 1
push eax
push edx
push edi
mov dword [esp + 0x60], ebp
call fcn.0040ace0
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
call fcn.0041295a
mov eax, dword [esp + 0x1c]
mov edx, dword [edi]
lea ebp, [esp + 0x44]
push 0x20
mov ecx, dword [eax - 8]
push ebp
push ecx
push eax
mov ecx, edi
call dword [edx + 0x70]
mov eax, dword [esp + 0x1c]
mov edx, dword [edi]
push 0x420
mov ecx, dword [eax - 8]
jmp 0x40a93d
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x64]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], edx
mov edx, dword [esi + 8]
sub eax, ecx
push 1
push eax
push edx
push edi
call fcn.0040ace0
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
call fcn.0041295a
mov eax, dword [esp + 0x1c]
mov edx, dword [edi]
lea ebp, [esp + 0x44]
push 0x24
mov ecx, dword [eax - 8]
push ebp
push ecx
push eax
mov ecx, edi
call dword [edx + 0x70]
mov eax, dword [esp + 0x1c]
mov edx, dword [edi]
push 0x424
mov ecx, dword [eax - 8]
lea ebp, [esp + 0x48]
push ebp
push ecx
push eax
mov ecx, edi
call dword [edx + 0x70]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], ecx
mov ecx, esi
mov dword [eax + 0xc], edx
call fcn.0040b110
mov ecx, dword [esp + 0x6c]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x38]
mov edx, dword [esp + 0x54]
mov ecx, edi
push edx
call sub.MFC42.DLL_CDC::SetBkMode
mov ecx, dword [esp + 0x18]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x30]
test ebx, ebx
je 0x40a9b3
test edi, edi
jne 0x40a9a0
xor eax, eax
jmp 0x40a9a3
mov eax, dword [edi + 4]
push 0
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, esi
call fcn.0040a1f0
cmp eax, 1
jne 0x40aa78
mov ecx, esi
call fcn.0040b200
test eax, eax
je 0x40aa26
test edi, edi
jne 0x40a9d6
xor ecx, ecx
jmp 0x40a9d9
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0xc8]
mov ebp, dword [esp + 0x3c]
lea eax, [edx - 1]
mov edx, dword [ebx + 8]
push edx
push eax
push ebp
push ecx
mov dword [esp + 0x30], eax
call fcn.0040ac80
add esp, 0x10
test edi, edi
jne 0x40aa15
mov edx, dword [esp + 0x40]
mov ecx, dword [ebx + 8]
xor eax, eax
dec edx
push ecx
push edx
push ebp
push eax
jmp 0x40aa9b
mov edx, dword [esp + 0x40]
mov ecx, dword [ebx + 8]
mov eax, dword [edi + 4]
dec edx
push ecx
push edx
push ebp
push eax
jmp 0x40aa9b
test edi, edi
jne 0x40aa2e
xor ecx, ecx
jmp 0x40aa31
mov ecx, dword [edi + 4]
mov ebx, dword [esp + 0xc8]
mov eax, dword [esp + 0x38]
dec eax
mov edx, dword [ebx + 8]
mov dword [esp + 0x20], eax
push edx
push eax
push 0x10
push ecx
call fcn.0040ac80
add esp, 0x10
test edi, edi
jne 0x40aa66
mov edx, dword [esp + 0x40]
mov ecx, dword [ebx + 8]
xor eax, eax
dec edx
push ecx
push edx
push 0x10
push eax
jmp 0x40aa9b
mov edx, dword [esp + 0x40]
mov ecx, dword [ebx + 8]
mov eax, dword [edi + 4]
dec edx
push ecx
push edx
push 0x10
push eax
jmp 0x40aa9b
test edi, edi
jne 0x40aa80
xor ecx, ecx
jmp 0x40aa83
mov ecx, dword [edi + 4]
mov ebx, dword [esp + 0xc8]
mov eax, dword [esp + 0x38]
dec eax
mov edx, dword [ebx + 8]
mov dword [esp + 0x20], eax
push edx
push eax
push 0x10
push ecx
call fcn.0040ac80
add esp, 0x10
test edi, edi
jne 0x40aaab
xor eax, eax
jmp 0x40aaae
mov eax, dword [edi + 4]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 4]
push ecx
push edx
push 0x10
push eax
call fcn.00408fd0
add esp, 0x10
mov ecx, esi
call fcn.0040a1f0
test eax, eax
jne 0x40aaed
test edi, edi
je 0x40aad3
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
sub edx, ecx
push edx
push ecx
mov ecx, dword [esp + 0x70]
push ecx
push eax
call fcn.00408fd0
add esp, 0x10
mov edx, dword [esi + 0x98]
mov ecx, dword [edx + 0xc]
test ecx, ecx
jle 0x40ab0a
mov eax, dword [ebx + 8]
mov edx, dword [esp + 0x68]
sub eax, edx
cdq
idiv ecx
mov dword [esp + 0x18], eax
mov ecx, esi
call fcn.0040a1f0
test eax, eax
jne 0x40abad
mov eax, dword [esi + 0x98]
mov ebx, dword [eax + 4]
test ebx, ebx
je 0x40abad
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x68]
inc ecx
mov dword [esp + 0x54], ecx
lea ebp, [edx + 5]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x58]
lea edx, [ecx + ebp - 0xa]
lea ecx, [esp + 0xa8]
push edx
push eax
push ebp
push ecx
call dword [sym.imp.USER32.dll_SetRect]
test edi, edi
jne 0x40ab64
xor ecx, ecx
jmp 0x40ab67
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
sub edx, eax
push edx
push eax
lea eax, [ebp - 5]
push eax
push ecx
call fcn.00408fd0
mov ecx, dword [esp + 0xe0]
mov edx, dword [esp + 0xdc]
add esp, 0x10
mov eax, ebx
mov ebx, dword [ebx]
push ecx
lea ecx, [esp + 0xa8]
push edx
push ecx
mov ecx, dword [eax + 8]
push edi
call fcn.0040cbf0
add ebp, dword [esp + 0x18]
test ebx, ebx
jne 0x40ab3a
mov ecx, esi
call fcn.0040a140
test eax, eax
je 0x40ac22
mov ecx, esi
call fcn.0040cbc0
cmp eax, 1
jne 0x40ac22
mov ebp, dword [esp + 0xd0]
mov ecx, dword [esp + 0x24]
add ebp, ecx
mov ecx, esi
call fcn.0040a140
mov ebx, eax
test ebx, ebx
je 0x40ac22
push ebp
mov ecx, esi
call fcn.0040a1f0
mov ecx, dword [esp + 0xd0]
mov edx, dword [esp + 0xcc]
neg eax
sbb eax, eax
and al, 0xf0
add eax, 0x10
add eax, ecx
mov ecx, ebx
push eax
push edx
push edi
call fcn.0040a270
mov edx, dword [esp + 0x24]
mov ecx, ebx
add edx, eax
add ebp, eax
mov dword [esp + 0x24], edx
call fcn.0040a120
mov ebx, eax
test ebx, ebx
jne 0x40abde
mov dword [esp + 0x10], 0x4157b8
lea ecx, [esp + 0x10]
mov byte [esp + 0xbc], 2
call sub.MFC42.DLL_CGdiObject::DeleteObject
lea ecx, [esp + 0x1c]
mov dword [esp + 0x10], 0x4157a4
mov dword [esp + 0xbc], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xb0
ret 0x10