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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x24]
cmp esi, dword [edi + 0x28]
mov dword [esp + 0x34], edi
jbe 0x402123
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov dword [esp + 0x88], esi
lea ebx, [ebx]
mov eax, dword [edi + 0x28]
cmp dword [edi + 0x24], eax
lea ebx, [edi + 0x20]
mov dword [esp + 0x20], eax
jbe 0x402145
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, ebx
je 0x40214f
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [esp + 0x20]
je 0x4025a3
cmp esi, dword [ebx + 8]
jb 0x402164
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [edi + 0x28]
mov ebx, dword [esi]
jb 0x402171
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 8]
mov ecx, dword [esi + 4]
mov esi, ecx
add ecx, eax
sub esi, eax
mov edi, ebx
add ebx, eax
sub edi, eax
mov eax, ebx
sub eax, edi
mov dword [esp + 0x48], eax
mov eax, ecx
sub eax, esi
mov dword [esp + 0x4c], eax
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
mov dword [esp + 0x10], eax
mov eax, 0x66666667
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
mov dword [esp + 0x24], eax
mov eax, 0x66666667
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax + 1]
lea eax, [edx + edx*4]
add eax, eax
mov dword [esp + 0x50], eax
mov eax, 0x66666667
imul ecx
sar edx, 2
mov dword [esp + 0x8c], ecx
mov ecx, edx
shr ecx, 0x1f
lea edx, [edx + ecx + 1]
mov dword [esp + 0x90], ebx
lea ebx, [edx + edx*4]
mov edx, dword [ebp + 8]
add ebx, ebx
push edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x98], ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [esp + 0x14], eax
xor eax, eax
push 0x45f274
mov dword [esp + 0x58], vtable.ATL::CImage.0
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov byte [esp + 0x74], al
mov byte [esp + 0x75], al
mov dword [esp + 0x78], 0xffffffff
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add dword [0x45f28c], 1
push 0x45f274
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x50]
sub ebx, dword [esp + 0x24]
sub eax, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
push eax
lea ecx, [esp + 0x58]
call fcn.00401d50
test eax, eax
je 0x40259a
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
push 0xcc0020
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x20]
push ecx
push ebx
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
mov eax, edx
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 0x50]
cmp eax, ecx
mov dword [esp + 0x30], edx
jne 0x402329
mov edx, dword [esp + 0x94]
cmp ebx, edx
je 0x40246d
lea eax, [ebx + 0xa]
cmp eax, edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], eax
jle 0x40231d
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x30], edx
lea eax, [edx + 0xa]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jle 0x402338
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x28], eax
mov eax, edx
sub eax, edi
mov dword [esp + 0x98], eax
add eax, 0xa
sub ecx, esi
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x9c], ecx
add ecx, 0xa
cmp eax, ebx
mov dword [esp + 0xa4], ecx
jge 0x402462
mov ebx, eax
sub ebx, dword [esp + 0x24]
mov eax, dword [esp + 0xc]
imul ebx, dword [esp + 0x68]
sub eax, dword [esp + 0x18]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x2c], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x1c]
cmp edx, eax
jge 0x4023fd
mov ecx, edx
sub ecx, dword [esp + 0x10]
mov esi, eax
imul ecx, dword [esp + 0x6c]
sub esi, edx
add dword [esp + 0x28], esi
jmp 0x4023c0
mov eax, ecx
add ecx, dword [esp + 0x6c]
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ebx
add eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x40]
movzx edx, byte [eax + 2]
add dword [esp + 0x44], edx
movzx edx, byte [eax + 1]
movzx eax, byte [eax]
add dword [esp + 0x38], edx
add dword [esp + 0x3c], eax
sub esi, 1
jne 0x4023c0
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
add ebx, dword [esp + 0x68]
sub dword [esp + 0x2c], 1
mov dword [esp + 0x40], ebx
jne 0x4023a0
cmp dword [esp + 0x28], 0
je 0x40245e
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cdq
idiv ecx
xor ebx, ebx
mov bh, al
mov eax, dword [esp + 0x38]
cdq
idiv ecx
mov bl, al
mov eax, dword [esp + 0x44]
cdq
idiv ecx
shl ebx, 8
movzx ecx, al
or ebx, ecx
push ebx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov ebx, eax
mov eax, dword [esp + 0x14]
push ebx
lea edx, [esp + 0x9c]
push edx
push eax
call dword [sym.imp.USER32.dll_FillRect]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, edx
jmp 0x4022ef
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x18]
push ecx
mov ecx, dword [eax + 0x14]
push edx
mov edx, dword [eax + 0x10]
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ebx, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.GDI32.dll_GetClipRgn]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x94]
push edx
push eax
push ecx
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateRoundRectRgn]
mov edx, dword [0x45f6e8]
push 1
mov esi, eax
push edx
push esi
push esi
call dword [sym.imp.GDI32.dll_CombineRgn]
mov eax, dword [0x45f6e8]
push 4
push esi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
mov eax, dword [ebp + 8]
push esi
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
push 0xcc0020
push 0
push 0
push ecx
mov ecx, dword [esp + 0x30]
push edx
push eax
push ecx
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
push ebx
push edi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push esi
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
push ebx
call esi
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x58]
xor ecx, ecx
cmp eax, ecx
je 0x402560
push eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x78], 0xffffffff
mov byte [esp + 0x75], cl
mov byte [esp + 0x74], cl
call esi
lea ecx, [esp + 0x54]
call fcn.00401c80
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x88]
add eax, 0x20
cmp ecx, dword [eax + 8]
jb 0x402582
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add dword [esp + 0x88], 8
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x34]
jmp 0x402130
lea ecx, [esp + 0x54]
call fcn.00401c80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4