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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x42d8
call fcn.00410040
push esi
push edi
push dword [ebx + 4]
mov dword [esp + 0x34], 0x320
mov dword [esp + 0x20], 0x60
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
test edi, edi
je 0x40e7a4
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x58
push edi
call esi
push 0x5a
push edi
call esi
push edi
push dword [ebx + 4]
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push 2
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_MonitorFromWindow]
push 9
mov edx, eax
pop ecx
xor eax, eax
lea edi, [esp + 0xa4]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa0]
push eax
push edx
mov dword [esp + 0xa8], 0x28
call dword [sym.imp.USER32.dll_GetMonitorInfoW]
test eax, eax
je 0x40e807
mov eax, dword [esp + 0x1c]
imul eax, eax, 0x46
cdq
push 0x60
pop ecx
idiv ecx
mov ecx, eax
mov eax, dword [esp + 0xb0]
sub eax, ecx
sub eax, dword [esp + 0xa8]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + 0x2c4]
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x3e9
push dword [ebx + 4]
mov dword [esp + 0x2c], eax
call esi
push 0x3e8
push dword [ebx + 4]
mov edi, eax
call esi
mov esi, dword [sym.imp.USER32.dll_GetWindowLongW]
push 0xfffffffffffffff0
push edi
mov dword [esp + 0x18], eax
call esi
push 0xfffffffffffffff0
push dword [esp + 0x14]
mov dword [esp + 0x34], eax
call esi
push 0xffffffffffffffec
push edi
mov dword [esp + 0x30], eax
call esi
push 0xffffffffffffffec
push dword [esp + 0x14]
mov dword [esp + 0x74], eax
call esi
mov esi, dword [sym.imp.USER32.dll_GetWindowRect]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x74]
push eax
push edi
call esi
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x14]
call esi
mov edi, dword [sym.imp.USER32.dll_MapWindowPoints]
push 2
lea eax, [esp + 0x78]
push eax
push dword [ebx + 4]
xor esi, esi
push esi
call edi
push 2
lea eax, [esp + 0x4c]
push eax
push dword [ebx + 4]
push esi
call edi
mov eax, dword [esp + 0x50]
sub eax, dword [esp + 0x48]
mov edi, dword [esp + 0x7c]
sub edi, dword [esp + 0x74]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x80]
sub eax, dword [esp + 0x78]
mov dword [esp + 0x18], esi
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x54]
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x10], esi
lea esi, [ebx + 0x40]
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], eax
call fcn.004019da
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_GetDC]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x20], eax
je 0x40e97b
mov eax, dword [ebx + 0x3c]
cmp dword [eax + 0x2c0], esi
mov dword [esp + 0x14], esi
jle 0x40e95e
mov eax, dword [esp + 0x24]
add eax, 0x10
mov dword [esp + 0xc], eax
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x10]
push dword [eax]
call sub.msvcrt.dll_wcslen
pop ecx
push eax
mov eax, dword [esp + 0x14]
push dword [eax]
push dword [esp + 0x2c]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
test eax, eax
je 0x40e946
mov eax, dword [esp + 0x38]
add eax, 0xa
cmp eax, esi
jle 0x40e946
mov esi, eax
inc dword [esp + 0x14]
mov eax, dword [ebx + 0x3c]
mov ecx, dword [esp + 0x14]
add dword [esp + 0xc], 0x14
cmp ecx, dword [eax + 0x2c0]
jl 0x40e913
push dword [esp + 0x20]
sub esi, edi
push dword [ebx + 4]
sub dword [esp + 0x3c], esi
add dword [esp + 0x50], esi
add edi, esi
mov dword [esp + 0x48], edi
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebx + 0x3c]
and dword [esp + 0xc], 0
cmp dword [eax + 0x2c0], 0
jle 0x40eb3c
mov ecx, dword [esp + 0x2c]
mov eax, 0x10000000
or ecx, eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x28]
or ecx, eax
mov eax, dword [esp + 0x1c]
imul eax, eax, 0x64
mov dword [esp + 0x28], ecx
cdq
push 0x60
pop ecx
idiv ecx
mov ecx, dword [esp + 0x30]
sub ecx, eax
mov eax, dword [esp + 0x24]
add eax, 0x10
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], eax
push dword [esp + 0xc]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
push dword [esp + 0x70]
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x1c]
push edi
add eax, esi
push eax
push dword [esp + 0x80]
push dword [esp + 0x3c]
push str.STATIC
push dword [esp + 0x84]
push ebx
call fcn.0040159d
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x88]
imul eax, dword [esp + 0x44]
push eax
push dword [esp + 0x38]
mov eax, dword [esp + 0x54]
add esi, eax
push esi
push dword [esp + 0x54]
push dword [esp + 0x38]
push str.EDIT
push dword [esp + 0x80]
push ebx
call fcn.0040159d
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
push dword [eax]
lea eax, [esp + 0xdc]
push 0x412f54
push 0xff
push eax
call sub.msvcrt.dll__snwprintf
mov esi, dword [sym.imp.USER32.dll_SetWindowTextW]
add esp, 0x10
lea eax, [esp + 0xd8]
push eax
push dword [esp + 0x24]
call esi
mov ecx, dword [ebx + 0x38]
mov eax, dword [ecx]
lea edx, [esp + 0x2d8]
push edx
push dword [esp + 0x10]
call dword [eax]
push eax
push dword [esp + 0x28]
call esi
mov eax, dword [ebx + 0x88]
imul eax, dword [esp + 0x44]
add eax, dword [ebx + 0x8c]
lea ecx, [ebx + 0x40]
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
mov esi, dword [ecx + 0xc]
test esi, esi
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x9c], eax
jl 0x40eb0d
cmp esi, 0xffffffff
mov eax, dword [ecx + 8]
jne 0x40eadb
push dword [ecx]
call sub.msvcrt.dll_free
jmp 0x40eaeb
push eax
push 0xc
lea eax, [ecx + 4]
mov edx, esi
mov edi, ecx
call fcn.00405d4e
pop ecx
lea eax, [esi + 1]
cmp dword [ebx + 0x4c], eax
pop ecx
jge 0x40eaf7
mov dword [ebx + 0x4c], eax
mov edi, esi
imul edi, edi, 0xc
add edi, dword [ebx + 0x40]
lea esi, [esp + 0x94]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x38]
jl 0x40eb20
and dword [esp + 0x18], 0
inc dword [esp + 0x10]
inc dword [esp + 0xc]
mov eax, dword [ebx + 0x3c]
mov ecx, dword [esp + 0xc]
add dword [esp + 0x14], 0x14
cmp ecx, dword [eax + 0x2c0]
jl 0x40e9cb
mov eax, dword [esp + 0x10]
and dword [ebx + 0x90], 0
mov esi, ebx
mov dword [ebx + 0x94], eax
call fcn.0040e6c6
push 1
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [esp + 0x58]
push ecx
push eax
mov dword [esp + 0x40], eax
call esi
push 2
lea eax, [esp + 0x5c]
push eax
push dword [ebx + 4]
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov edi, dword [sym.imp.USER32.dll_GetClientRect]
lea eax, [esp + 0xc8]
push eax
push dword [ebx + 4]
call edi
lea eax, [esp + 0x84]
push eax
push dword [ebx + 4]
call esi
mov ecx, dword [ebx + 0x94]
test ecx, ecx
mov eax, dword [esp + 0x30]
jne 0x40ebc2
mov eax, dword [esp + 0x1c]
imul eax, eax, 0x50
cdq
push 0x60
pop esi
idiv esi
add eax, dword [esp + 0x18]
mov edx, dword [esp + 0x8c]
sub edx, dword [esp + 0x84]
mov esi, 0x204
inc edx
test ecx, ecx
jne 0x40ebfa
push 0x206
push eax
push edx
xor eax, eax
push eax
push eax
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
push dword [ebx + 4]
call fcn.004061c5
pop ecx
jmp 0x40ec46
xor ecx, ecx
cmp dword [esp + 0xb0], ecx
je 0x40ec33
push esi
push eax
mov eax, dword [esp + 0xb0]
add eax, 0xa
push edx
push eax
mov eax, dword [esp + 0xbc]
sub eax, dword [esp + 0xb4]
sub eax, edx
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0xb4]
push eax
push ecx
jmp 0x40ec3d
push 0x206
push eax
push edx
push ecx
push ecx
push ecx
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [esp + 0x84]
push eax
push dword [ebx + 4]
call edi
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x64]
sub eax, ecx
inc eax
push esi
push eax
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x60]
inc eax
push eax
mov eax, dword [esp + 0x28]
imul eax, eax, 5
push 0x60
pop esi
cdq
idiv esi
sub ecx, eax
sub ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x9c]
sub ecx, dword [esp + 0x94]
lea eax, [ecx + eax - 1]
push eax
push dword [esp + 0x68]
push 0
push dword [esp + 0x50]
call dword [sym.imp.USER32.dll_SetWindowPos]
pop edi
pop esi
mov esp, ebp
pop ebp
ret