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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x5c
mov eax, dword [eax + 0x84]
mov dword [eax + 0x64], 2
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov ecx, dword [edx + 0xc]
cmp dword [eax + 0x48], ecx
je 0x40c180
mov dword [eax + 0x48], ecx
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [edx + 0x10]
mov dword [eax + 0x4c], edx
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x40c010
lea esi, [ebp - 0x28]
mov eax, dword [edi + 0x84]
mov ecx, dword [ecx + 0x10]
mov dword [ebp - 0x2c], esi
mov dword [eax + 0x54], edx
mov dword [eax + 0x5c], 0
mov dword [eax + 0x58], ecx
mov dword [eax + 0x60], 0
mov eax, dword [edi + 8]
mov esi, dword [eax + 0x7c]
lea ebx, [esi + 1]
mov esi, dword [eax + 0x80]
sub ebx, dword [eax + 0x74]
inc esi
sub esi, dword [eax + 0x78]
mov eax, dword [edi + 0x84]
mov dword [eax + 0x38], ebx
mov eax, dword [edi + 0x84]
mov dword [eax + 0x3c], esi
mov edx, dword [edi + 8]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
movsx eax, word [edx + 0x84]
imul eax, ebx
mov dword [ebp - 0x20], eax
movsx eax, word [edx + 0x86]
mov dword [esp + 4], 0xfffffff0
imul eax, esi
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetWindowLongW]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_AdjustWindowRect]
mov eax, dword [edi + 8]
sub esp, 0xc
cmp dword [eax + 0xc], ebx
jbe 0x40c140
mov eax, dword [sym.imp.user32.dll_GetSystemMetrics]
mov dword [esp], 3
mov dword [ebp - 0x30], eax
call eax
sub esp, 4
mov dword [ebp - 0x34], eax
mov dword [esp + 0x10], 0
mov eax, dword [edi + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
sub eax, ebx
mov dword [esp + 0xc], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetScrollRange]
sub esp, 0x14
mov dword [esp + 0xc], 0
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x78]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetScrollPos]
mov ebx, dword [sym.imp.user32.dll_ShowScrollBar]
sub esp, 0x10
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov eax, dword [edi + 8]
cmp dword [eax + 0x10], esi
jbe 0x40c118
mov dword [esp], 2
mov eax, dword [ebp - 0x30]
call eax
sub esp, 4
mov dword [ebp - 0x38], eax
mov dword [esp + 0x10], 0
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
sub eax, esi
mov dword [esp + 0xc], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetScrollRange]
sub esp, 0x14
mov dword [esp + 0xc], 0
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x78]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetScrollPos]
sub esp, 0x10
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x38]
sub esp, 0xc
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x1c]
mov dword [esp + 0x18], 0x16
sub eax, dword [ebp - 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], 0
add eax, edx
sub eax, dword [ebp - 0x28]
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetWindowPos]
mov eax, dword [ebp - 0x2c]
sub esp, 0x1c
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x30
call dword [sym.imp.user32.dll_SystemParametersInfoW]
mov ecx, dword [edi + 8]
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
sub esp, 0x10
movsx ebx, word [ecx + 0x84]
cdq
idiv ebx
mov dword [ecx + 0x28], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x24]
mov dword [esp], 4
mov ebx, eax
mov eax, dword [ebp - 0x30]
call eax
mov ecx, dword [edi + 8]
mov edx, eax
mov eax, ebx
sub esp, 4
movsx ebx, word [ecx + 0x86]
sub eax, edx
cdq
idiv ebx
mov dword [ecx + 0x2c], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 0xa8]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.user32.dll_UpdateWindow]
mov eax, dword [edi + 8]
mov dword [ebp - 0x38], 1
sub esp, 4
mov eax, dword [eax + 0x74]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x84]
movzx esi, word [ebp - 0x30]
mov word [eax + 0x34], si
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [edx + 0x78]
mov word [eax + 0x36], dx
mov eax, dword [edi + 0x84]
mov ecx, dword [eax + 0x58]
mov edx, dword [eax + 0x60]
cmp ecx, edx
jg 0x40be0a
mov ebx, dword [eax + 0x5c]
mov esi, dword [eax + 0x54]
mov dword [ebp - 0x2c], ebx
cmp esi, ebx
jle 0x40c357
mov ecx, dword [edi + 8]
mov esi, dword [ebp - 0x38]
mov edx, dword [ecx + 0x14]
test esi, esi
jne 0x40be20
cmp dword [eax + 0x40], edx
je 0x40c30c
mov dword [eax + 0x40], edx
mov eax, dword [edi + 8]
mov esi, dword [eax + 0x14]
mov ebx, dword [eax + 0x18]
mov dword [ebp - 0x2c], esi
test ebx, ebx
jne 0x40c2db
mov eax, dword [edi + 0x84]
mov edx, dword [eax + 0x10]
test edx, edx
je 0x40be56
mov dword [esp], edx
call dword [sym.imp.gdi32.dll_DeleteObject]
mov eax, dword [edi + 0x84]
sub esp, 4
mov dword [eax + 0x10], 0
mov eax, dword [edi + 0x84]
cmp dword [ebp - 0x2c], 0x64
mov dword [eax + 0x44], 0
je 0x40bf81
mov esi, dword [edi + 8]
movsx ecx, word [esi + 0x84]
movsx ebx, word [esi + 0x86]
mov dword [ebp - 0x40], esi
lea eax, [ecx + 0xf]
mov word [ebp - 0x44], cx
and eax, 0xfffffff0
mov dword [ebp - 0x30], ecx
lea edx, [eax + 7]
mov dword [esp + 4], ebx
cmovs eax, edx
mov edx, eax
sar edx, 3
mov dword [ebp - 0x34], edx
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_calloc]
mov esi, eax
test eax, eax
je 0x40bf81
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ebx
mov edx, 1
imul eax, ebx
cmp eax, 0xc7
jg 0x40c33d
mov eax, ebx
sub ebx, edx
mov dword [ebp - 0x30], ebx
mov edx, ebx
cmp eax, ebx
jle 0x40bf48
mov ebx, dword [ebp - 0x34]
imul ebx, edx
mov edx, ebx
movzx ebx, word [ebp - 0x44]
mov dword [ebp - 0x44], edi
mov edi, dword [ebp - 0x40]
lea esi, [esi]
xor eax, eax
test bx, bx
jle 0x40bf30
mov dword [ebp - 0x2c], edx
lea esi, [esi]
mov ebx, eax
mov ecx, eax
mov edx, pe_nt_image_headers32
inc eax
and ecx, 7
sar ebx, 3
add ebx, dword [ebp - 0x2c]
sar edx, cl
or byte [esi + ebx], dl
movsx ecx, word [edi + 0x84]
mov ebx, ecx
cmp eax, ecx
jl 0x40bf08
mov edx, dword [ebp - 0x2c]
inc dword [ebp - 0x30]
movsx eax, word [edi + 0x86]
add edx, dword [ebp - 0x34]
cmp dword [ebp - 0x30], eax
jl 0x40bef8
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
mov ebx, dword [edi + 0x84]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ecx
call dword [sym.imp.gdi32.dll_CreateBitmap]
sub esp, 0x14
mov dword [ebx + 0x10], eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [ecx + 0x18]
cmp edx, dword [eax + 0x44]
je 0x40bfb2
mov dword [eax + 0x44], edx
mov ebx, dword [edi + 0xa8]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
je 0x40c410
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [ebp - 0x38]
test edx, edx
jne 0x40c2c8
mov esi, dword [ecx + 0xc]
mov ebx, dword [ecx + 0x1c]
lea edx, [esi - 1]
cmp edx, ebx
cmova edx, ebx
movsx ebx, word [eax + 0x50]
cmp ebx, edx
je 0x40c2fa
mov word [eax + 0x50], dx
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [edx + 0x20]
mov word [eax + 0x52], dx
mov eax, edi
call sym._update_window_cursor
mov eax, dword [edi + 0x84]
mov dword [eax + 0x64], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ecx + 0x10]
mov eax, dword [edi + 0x84]
test ecx, ecx
je 0x40c108
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x40c108
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetDC]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x40bfff
mov eax, dword [edi + 8]
movsx edx, word [eax + 0x86]
imul edx, dword [eax + 0x10]
mov dword [esp + 8], edx
movsx edx, word [eax + 0x84]
imul edx, dword [eax + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], edx
call dword [sym.imp.gdi32.dll_CreateCompatibleBitmap]
sub esp, 0xc
mov esi, eax
mov dword [esp + 4], ebx
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ReleaseDC]
sub esp, 8
mov dword [esp + 4], esi
mov eax, dword [edi + 0x84]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_SelectObject]
mov eax, dword [edi + 0x84]
sub esp, 8
mov edx, dword [eax + 4]
test edx, edx
je 0x40c0c0
mov dword [esp], edx
call dword [sym.imp.gdi32.dll_DeleteObject]
mov eax, dword [edi + 0x84]
sub esp, 4
mov dword [eax + 4], esi
mov edx, dword [edi + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [edx + 0xc]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
dec eax
dec edx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x20], edx
mov edx, eax
mov dword [ebp - 0x2c], eax
mov eax, edi
call sym._fill_mem_dc
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov ecx, dword [edx + 0x10]
mov edx, dword [edx + 0xc]
jmp 0x40baec
lea esi, [ebp - 0x28]
mov dword [ebp - 0x2c], esi
jmp 0x40baec
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
xor edx, edx
sub esp, 0xc
jmp 0x40bcd2
mov dword [esp + 8], 0
mov ebx, dword [sym.imp.user32.dll_ShowScrollBar]
mov dword [esp + 4], 0
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
mov eax, dword [sym.imp.user32.dll_GetSystemMetrics]
mov dword [ebp - 0x34], 0
sub esp, 0xc
mov dword [ebp - 0x30], eax
jmp 0x40bc31
mov esi, dword [edx + 0x10]
cmp dword [eax + 0x4c], esi
jne 0x40babd
mov esi, dword [eax + 4]
test esi, esi
je 0x40c46f
mov esi, dword [edx + 0x7c]
mov ecx, dword [edx + 0x74]
lea ebx, [esi + 1]
mov esi, dword [edx + 0x78]
mov dword [ebp - 0x30], ecx
sub ebx, ecx
mov dword [ebp - 0x34], esi
mov ecx, esi
mov esi, dword [edx + 0x80]
inc esi
sub esi, ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
cmp dword [eax + 0x38], ebx
jne 0x40bb1c
cmp dword [eax + 0x3c], esi
jne 0x40bb1c
movsx esi, word [eax + 0x34]
movsx ebx, word [eax + 0x36]
cmp esi, dword [ebp - 0x30]
jne 0x40c1eb
mov dword [ebp - 0x38], 0
cmp dword [ebp - 0x34], ebx
je 0x40bdd1
sub ebx, dword [ebp - 0x34]
sub esi, dword [ebp - 0x30]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
movsx eax, word [edx + 0x86]
imul ebx, eax
mov dword [esp + 8], ebx
movsx eax, word [edx + 0x84]
imul esi, eax
mov dword [esp + 4], esi
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ScrollWindow]
mov ebx, dword [sym.imp.user32.dll_SetScrollPos]
sub esp, 0x14
mov dword [esp + 0xc], 1
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x74]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
sub esp, 0x10
mov dword [esp + 0xc], 1
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x78]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call ebx
sub esp, 0x10
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 8]
mov dword [ebp - 0x38], 0
sub esp, 0xc
mov eax, dword [eax + 0x74]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x84]
jmp 0x40bdd1
mov esi, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x1c]
lea edx, [esi - 1]
cmp edx, ecx
cmova edx, ecx
jmp 0x40bfd7
mov ebx, dword [edi + 0xa8]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
jne 0x40be37
call dword [sym.imp.user32.dll_DestroyCaret]
jmp 0x40be37
movsx ebx, word [eax + 0x52]
cmp dword [ecx + 0x20], ebx
jne 0x40bfd7
jmp 0x40bff8
mov edx, dword [ecx + 0x18]
cmp edx, dword [eax + 0x44]
je 0x40bfbd
mov dword [eax + 0x44], edx
mov ebx, dword [edi + 0xa8]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
je 0x40c410
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0x84]
jmp 0x40bfbd
mov edx, 0x51eb851f
mov dword [ebp - 0x2c], eax
imul edx
mov eax, dword [ebp - 0x2c]
sar eax, 0x1f
sar edx, 5
sub edx, eax
jmp 0x40bed6
mov ebx, dword [edi + 8]
inc edx
mov ebx, dword [ebx + 0x74]
mov dword [ebp - 0x30], ebx
mov ebx, dword [edi + 8]
sub esi, dword [ebp - 0x30]
movsx ebx, word [ebx + 0x84]
mov dword [ebp - 0x34], ebx
imul esi, ebx
mov ebx, dword [ebp - 0x2c]
inc ebx
sub ebx, dword [ebp - 0x30]
imul ebx, dword [ebp - 0x34]
mov dword [ebp - 0x28], esi
mov esi, dword [edi + 8]
mov dword [ebp - 0x20], ebx
mov ebx, dword [edi + 8]
mov esi, dword [esi + 0x78]
movsx ebx, word [ebx + 0x86]
sub edx, esi
sub ecx, esi
imul ecx, ebx
imul ebx, edx
lea edx, [eax + 0x54]
mov eax, edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], ebx
call sym._fill_mem_dc
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x84]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov dword [ecx + 0x5c], 0
mov dword [ecx + 0x60], 0
mov dword [ecx + 0x54], eax
lea eax, [ebp - 0x28]
mov dword [ecx + 0x58], edx
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 0xa8]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.user32.dll_UpdateWindow]
mov eax, dword [edi + 0x84]
sub esp, 4
jmp 0x40be0a
mov eax, dword [edi + 0x84]
mov ecx, dword [eax + 0x44]
test ecx, ecx
je 0x40c464
mov edx, dword [edi + 8]
movsx ecx, word [edx + 0x86]
mov dword [esp + 0xc], ecx
movsx edx, word [edx + 0x84]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_CreateCaret]
mov eax, edi
sub esp, 0x10
call sym._update_window_cursor
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0x84]
jmp 0x40bfb2
call dword [sym.imp.user32.dll_DestroyCaret]
jmp 0x40bfa9
mov eax, dword [edi + 0xa8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IsWindowVisible]
mov edx, dword [edi + 8]
sub esp, 4
test eax, eax
mov eax, dword [edi + 0x84]
je 0x40c197
mov ecx, dword [edx + 0xc]
jmp 0x40babd