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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x48
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 0x40c820
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 0x40c5d0
lea esi, [ebp - 0x1c]
mov eax, dword [edi + 0x84]
mov ecx, dword [ecx + 0x10]
mov dword [ebp - 0x20], 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 ebx, dword [eax + 0x7c]
mov edx, dword [eax + 0x80]
sub ebx, dword [eax + 0x74]
sub edx, dword [eax + 0x78]
mov eax, dword [edi + 0x84]
add ebx, 1
lea esi, [edx + 1]
mov dword [eax + 0x38], ebx
mov eax, dword [edi + 0x84]
mov dword [eax + 0x3c], esi
mov edx, dword [edi + 8]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
movsx eax, word [edx + 0x84]
imul eax, ebx
mov dword [ebp - 0x14], eax
movsx eax, word [edx + 0x86]
mov dword [esp + 4], 0xfffffff0
imul eax, esi
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetWindowLongW]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
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 0x40c7b8
mov eax, dword [sym.imp.user32.dll_GetSystemMetrics]
mov dword [esp], 3
mov dword [ebp - 0x24], eax
call eax
sub esp, 4
mov dword [ebp - 0x28], 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 + 0xac]
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 + 0xac]
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 + 0xac]
mov dword [esp], eax
call ebx
mov eax, dword [edi + 8]
sub esp, 0xc
cmp dword [eax + 0x10], esi
jbe 0x40c7f7
mov dword [esp], 2
mov eax, dword [ebp - 0x24]
call eax
sub esp, 4
mov dword [ebp - 0x2c], 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 + 0xac]
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 + 0xac]
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 + 0xac]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x18], 0x16
mov ebx, edx
add eax, dword [ebp - 0x10]
sub ebx, dword [ebp - 0x1c]
mov dword [esp + 0xc], 0
sub eax, dword [ebp - 0x18]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetWindowPos]
mov eax, dword [ebp - 0x20]
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 - 0x14]
sub eax, dword [ebp - 0x1c]
sub esp, 0x10
movsx ebx, word [ecx + 0x84]
cdq
idiv ebx
mov dword [ecx + 0x28], eax
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
mov dword [esp], 4
mov ebx, eax
mov eax, dword [ebp - 0x24]
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 + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 0xac]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.user32.dll_UpdateWindow]
mov eax, dword [edi + 8]
mov dword [ebp - 0x2c], 1
sub esp, 4
mov eax, dword [eax + 0x74]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x84]
movzx esi, word [ebp - 0x24]
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 ebx, dword [eax + 0x58]
mov ecx, dword [eax + 0x60]
cmp ebx, ecx
jle 0x40c6e0
mov edx, dword [edi + 8]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [edx + 0x14]
test ebx, ebx
jne 0x40c3e5
cmp dword [eax + 0x40], ecx
je 0x40c983
mov dword [eax + 0x40], ecx
mov eax, dword [edi + 8]
mov esi, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
test eax, eax
jne 0x40c964
mov eax, dword [edi + 0x84]
mov edx, dword [eax + 0x10]
test edx, edx
je 0x40c418
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]
mov ebx, esi
mov dword [eax + 0x44], 0
cmp esi, 0x64
je 0x40c54c
mov esi, dword [edi + 8]
movsx ecx, word [esi + 0x84]
mov dword [ebp - 0x34], esi
lea eax, [ecx + 0xf]
mov word [ebp - 0x38], cx
and eax, 0xfffffff0
mov dword [ebp - 0x24], ecx
lea edx, [eax + 7]
cmovs eax, edx
sar eax, 3
mov edx, eax
mov dword [ebp - 0x28], eax
movsx eax, word [esi + 0x86]
mov dword [esp], edx
mov dword [ebp - 0x20], eax
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_calloc]
mov esi, eax
test eax, eax
je 0x40c54c
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov edx, 1
imul ebx, eax
mov dword [ebp - 0x30], eax
cmp ebx, 0xc7
mov eax, ebx
jg 0x40c9b7
mov eax, dword [ebp - 0x20]
mov ebx, eax
sub ebx, edx
mov dword [ebp - 0x24], ebx
mov edx, ebx
cmp eax, ebx
jle 0x40c513
imul edx, dword [ebp - 0x28]
movzx ebx, word [ebp - 0x38]
mov dword [ebp - 0x38], edi
mov edi, dword [ebp - 0x34]
lea esi, [esi]
xor eax, eax
test bx, bx
jle 0x40c4fa
mov dword [ebp - 0x20], edx
lea esi, [esi]
mov ebx, eax
mov ecx, eax
mov edx, pe_nt_image_headers32
add eax, 1
and ecx, 7
sar ebx, 3
add ebx, dword [ebp - 0x20]
sar edx, cl
or byte [esi + ebx], dl
movsx ecx, word [edi + 0x84]
mov ebx, ecx
cmp eax, ecx
jl 0x40c4d0
mov edx, dword [ebp - 0x20]
add dword [ebp - 0x24], 1
movsx eax, word [edi + 0x86]
add edx, dword [ebp - 0x28]
cmp dword [ebp - 0x24], eax
jl 0x40c4c0
mov dword [ebp - 0x30], eax
mov edi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x30]
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 edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov ecx, dword [edx + 0x18]
cmp ecx, dword [eax + 0x44]
je 0x40c57d
mov dword [eax + 0x44], ecx
mov ebx, dword [edi + 0xac]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
je 0x40c9eb
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
mov esi, dword [edx + 0xc]
mov ebx, dword [edx + 0x1c]
lea ecx, [esi - 1]
cmp ecx, ebx
cmova ecx, ebx
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
jne 0x40c59e
movsx ebx, word [eax + 0x50]
cmp ebx, ecx
je 0x40c9a5
mov word [eax + 0x50], cx
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 0x40c6d0
mov esi, dword [eax + 8]
test esi, esi
je 0x40c6d0
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetDC]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x40c5c6
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 + 0xac]
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 0x40c680
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 - 0x1c], 0
mov dword [ebp - 0x18], 0
sub eax, 1
sub edx, 1
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], edx
mov edx, eax
mov dword [ebp - 0x20], 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 0x40c0bc
lea esi, [ebp - 0x1c]
mov dword [ebp - 0x20], esi
jmp 0x40c0bc
mov edx, dword [eax + 0x5c]
mov esi, dword [eax + 0x54]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], esi
mov esi, edx
mov edx, dword [edi + 8]
cmp dword [ebp - 0x20], esi
jg 0x40c3d2
mov esi, dword [edx + 0x74]
mov dword [ebp - 0x28], esi
movsx esi, word [edx + 0x84]
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x20]
sub esi, dword [ebp - 0x28]
imul esi, dword [ebp - 0x30]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x24]
sub esi, dword [ebp - 0x28]
add esi, 1
imul esi, dword [ebp - 0x30]
mov dword [ebp - 0x14], esi
mov esi, dword [edx + 0x78]
movsx edx, word [edx + 0x86]
sub ecx, esi
sub ebx, esi
add ecx, 1
imul ebx, edx
imul edx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edx
lea edx, [eax + 0x54]
mov eax, edi
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 - 0x1c]
mov dword [ecx + 0x58], edx
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 0xac]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.user32.dll_UpdateWindow]
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
sub esp, 4
jmp 0x40c3d2
mov dword [esp + 8], 0
mov ebx, dword [sym.imp.user32.dll_ShowScrollBar]
mov dword [esp + 4], 0
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call ebx
mov eax, dword [sym.imp.user32.dll_GetSystemMetrics]
mov dword [ebp - 0x28], 0
sub esp, 0xc
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 8]
cmp dword [eax + 0x10], esi
ja 0x40c20f
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call ebx
xor edx, edx
sub esp, 0xc
jmp 0x40c2a4
mov esi, dword [edx + 0x10]
cmp dword [eax + 0x4c], esi
jne 0x40c08d
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40ca4a
mov esi, dword [edx + 0x74]
mov ebx, dword [edx + 0x7c]
mov ecx, dword [edx + 0x80]
sub ebx, esi
mov dword [ebp - 0x24], esi
mov esi, dword [edx + 0x78]
add ebx, 1
sub ecx, esi
mov dword [ebp - 0x28], esi
mov esi, ecx
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
add esi, 1
cmp dword [eax + 0x38], ebx
jne 0x40c0ee
cmp dword [eax + 0x3c], esi
jne 0x40c0ee
movsx esi, word [eax + 0x34]
movsx ebx, word [eax + 0x36]
cmp esi, dword [ebp - 0x24]
jne 0x40c88d
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x28], ebx
je 0x40c3a3
sub ebx, dword [ebp - 0x28]
sub esi, dword [ebp - 0x24]
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 eax, esi
mov dword [esp + 4], eax
mov eax, dword [edi + 0xac]
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 + 0xac]
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 + 0xac]
mov dword [esp], eax
call ebx
sub esp, 0x10
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edi + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
mov eax, dword [edi + 8]
mov dword [ebp - 0x2c], 0
sub esp, 0xc
mov eax, dword [eax + 0x74]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x84]
jmp 0x40c3a3
mov ebx, dword [edi + 0xac]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
jne 0x40c3f9
call dword [sym.imp.user32.dll_DestroyCaret]
jmp 0x40c3f9
mov ecx, dword [edx + 0x18]
cmp ecx, dword [eax + 0x44]
jne 0x40c9cd
mov esi, dword [edx + 0xc]
mov ebx, dword [edx + 0x1c]
lea ecx, [esi - 1]
cmp ecx, ebx
cmova ecx, ebx
movsx ebx, word [eax + 0x50]
cmp ebx, ecx
jne 0x40c59e
movsx ebx, word [eax + 0x52]
cmp dword [edx + 0x20], ebx
jne 0x40c59e
jmp 0x40c5bf
mov edx, 0x51eb851f
imul edx
mov eax, ebx
sar eax, 0x1f
sar edx, 5
sub edx, eax
jmp 0x40c49f
mov dword [eax + 0x44], ecx
mov ebx, dword [edi + 0xac]
call dword [sym.imp.user32.dll_GetFocus]
cmp ebx, eax
je 0x40c9eb
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
jmp 0x40c98b
mov eax, dword [edi + 0x84]
mov esi, dword [eax + 0x44]
test esi, esi
je 0x40ca3f
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 + 0xac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_CreateCaret]
mov eax, edi
sub esp, 0x10
call sym._update_window_cursor
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x84]
jmp 0x40c57d
call dword [sym.imp.user32.dll_DestroyCaret]
jmp 0x40c574
mov eax, dword [edi + 0xac]
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 0x40c837
mov ecx, dword [edx + 0xc]
jmp 0x40c08d