Function at 0x40c9c0
Capabilities:
Get graphical window text

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x2f8
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
mov edi, dword [ecx + 8]
cmp eax, 0x110
je 0x40ca18
cmp eax, 0x111
jne 0x40ca03
cmp di, 1
movzx eax, di
je 0x40cc50
cmp eax, 2
je 0x40cee7
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov edi, eax
sub esp, 4
mov dword [esp], ebx
mov eax, 0x7db
mov dword [esp + 4], eax
call sym._GetDlgItem_8
sub esp, 8
mov esi, eax
mov dword [esp], ebx
mov eax, 0x7d8
mov dword [esp + 4], eax
call sym._GetDlgItem_8
mov dword [ebp - 0x2ec], eax
sub esp, 8
mov eax, 0x7d9
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._GetDlgItem_8
mov edx, 0x7da
mov dword [ebp - 0x2f0], eax
sub esp, 8
mov dword [esp + 4], edx
mov dword [esp], ebx
lea ebx, [ebp - 0x216]
call sym._GetDlgItem_8
mov ecx, 0xff
mov dword [ebp - 0x2f4], eax
sub esp, 8
mov eax, 0x588
mov dword [esp + 0xc], ecx
mov dword [esp], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
call sym._LoadStringW_16
xor eax, eax
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, 0x143
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SendMessageW_16
mov eax, 0xff
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, 0x589
mov dword [esp], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
call sym._LoadStringW_16
xor edx, edx
mov ecx, 0x143
sub esp, 0x10
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], ebx
mov dword [esp], esi
call sym._SendMessageW_16
mov eax, 0xff
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, 0x58a
mov dword [esp], edi
mov edi, 0x43d
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
call sym._LoadStringW_16
xor eax, eax
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, 0x143
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SendMessageW_16
mov eax, 0xbc
xor ecx, ecx
mov dword [ebp - 0x2d4], eax
lea eax, [ebp - 0x2d4]
mov edx, 0xf
mov dword [ebp - 0x2d0], edx
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [0x41c704]
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._SendMessageW_16
movzx eax, word [ebp - 0x2bc]
sub esp, 0x10
cmp eax, 2
je 0x40cf10
cmp eax, 3
sete al
movzx eax, al
add eax, eax
mov dword [esp + 8], eax
xor edi, edi
mov eax, 0x14e
mov dword [esp + 0xc], edi
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._SendMessageW_16
mov eax, dword [ebp - 0x2c8]
mov edx, dword [ebp - 0x2c0]
add edx, eax
mov eax, ebx
sub esp, 0x10
call sym._number_with_units
mov eax, dword [ebp - 0x2ec]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._SetWindowTextW_8
mov edx, dword [ebp - 0x2c4]
mov eax, ebx
sub esp, 8
call sym._number_with_units
mov eax, dword [ebp - 0x2f0]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._SetWindowTextW_8
mov edx, dword [ebp - 0x2c0]
mov eax, ebx
neg edx
sub esp, 8
call sym._number_with_units
mov eax, dword [ebp - 0x2f4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._SetWindowTextW_8
xor eax, eax
sub esp, 8
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp], ebx
mov edx, 0x7db
mov dword [esp + 4], edx
call sym._GetDlgItem_8
mov ecx, 0x7d8
sub esp, 8
mov esi, eax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._GetDlgItem_8
mov dword [ebp - 0x2f0], eax
sub esp, 8
mov eax, 0x7d9
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._GetDlgItem_8
mov dword [ebp - 0x2f4], eax
sub esp, 8
mov eax, 0x7da
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._GetDlgItem_8
mov edx, 0x43d
mov dword [ebp - 0x2f8], eax
mov eax, 0xbc
sub esp, 8
mov dword [ebp - 0x2d4], eax
mov eax, 0x20
mov dword [ebp - 0x2d0], eax
lea eax, [ebp - 0x2d4]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [0x41c704]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._SendMessageW_16
xor ecx, ecx
mov dword [ebp - 0x2ec], ecx
sub esp, 0x10
test byte [ebp - 0x2d0], 0x20
je 0x40cd17
xor eax, eax
cmp word [ebp - 0x2cc], 0
setne al
mov dword [ebp - 0x2ec], eax
mov dword [esp], esi
lea esi, [ebp - 0x216]
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0x147
mov dword [esp + 4], eax
call sym._SendMessageW_16
movzx eax, word [eax + eax + 0x410b4c]
sub esp, 0x10
mov dword [esp + 4], esi
mov word [ebp - 0x2bc], ax
mov eax, 0xff
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2f0]
mov dword [esp], eax
call sym._GetWindowTextW_12
lea ecx, [ebp - 0x2d8]
mov eax, esi
lea edx, [ebp - 0x2dc]
sub esp, 0xc
call sym._number_from_string
movss xmm0, dword [ebp - 0x2dc]
mov dword [ebp - 0x2f0], eax
mov eax, dword [ebp - 0x2d8]
call sym._units_to_twips
mov edx, dword [ebp - 0x2f4]
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [ebp - 0x2c0], eax
mov eax, 0xff
mov dword [esp + 8], eax
call sym._GetWindowTextW_12
lea ecx, [ebp - 0x2d8]
mov eax, esi
lea edx, [ebp - 0x2dc]
sub esp, 0xc
call sym._number_from_string
movss xmm0, dword [ebp - 0x2dc]
test eax, eax
mov eax, dword [ebp - 0x2d8]
je 0x40cf20
call sym._units_to_twips
mov edx, dword [ebp - 0x2f8]
mov ecx, 0xff
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [ebp - 0x2c4], eax
call sym._GetWindowTextW_12
lea ecx, [ebp - 0x2d8]
mov eax, esi
lea edx, [ebp - 0x2dc]
sub esp, 0xc
call sym._number_from_string
test eax, eax
je 0x40cf5c
mov eax, dword [ebp - 0x2d8]
movss xmm0, dword [ebp - 0x2dc]
call sym._units_to_twips
mov edx, dword [ebp - 0x2f0]
test edx, edx
mov dword [ebp - 0x2c8], eax
je 0x40cf75
mov esi, dword [ebp - 0x2c0]
lea edx, [eax + esi]
mov ecx, edx
shr ecx, 0x1f
test cl, cl
jne 0x40cf90
test esi, esi
jns 0x40ce74
mov eax, 0
test edx, edx
cmovs edx, eax
mov eax, edx
neg eax
mov dword [ebp - 0x2c8], edx
mov esi, dword [ebp - 0x2ec]
mov edx, 0xbc
mov dword [ebp - 0x2c0], eax
mov ecx, 0xf
mov dword [ebp - 0x2d4], edx
mov dword [ebp - 0x2d0], ecx
test esi, esi
je 0x40cebe
test eax, eax
mov edx, 0
cmovs eax, edx
mov esi, 0x400f
mov word [ebp - 0x220], ax
mov dword [ebp - 0x2d0], esi
lea eax, [ebp - 0x2d4]
xor edx, edx
mov dword [esp + 0xc], eax
mov eax, dword [0x41c704]
mov ecx, 0x447
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._EndDialog_8
mov eax, 1
sub esp, 8
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov eax, 1
jmp 0x40cbab
call sym._units_to_twips
mov dword [esp + 4], esi
mov dword [ebp - 0x2c4], eax
mov eax, 0xff
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
call sym._GetWindowTextW_12
lea ecx, [ebp - 0x2d8]
mov eax, esi
lea edx, [ebp - 0x2dc]
sub esp, 0xc
call sym._number_from_string
mov eax, dword [ebp - 0x2d8]
movss xmm0, dword [ebp - 0x2dc]
call sym._units_to_twips
mov dword [ebp - 0x2c8], eax
mov eax, dword [0x41c708]
mov ecx, 0x40
mov edx, 0x6a9
call sym._MessageBoxWithResStringW.constprop.0
jmp 0x40ca03
mov ecx, eax
shr ecx, 0x1f
test cl, cl
je 0x40ce64
neg eax
xor edx, edx
jmp 0x40ce76