Function at 0x409e40
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2b0
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
xor esi, esi
cmp eax, 0x111
je 0x409f3d
cmp eax, 0x110
jne 0x40a286
push 0x7dc
push edi
call dword [sym.imp.user32.dll_GetDlgItem]
mov edi, eax
mov dword [ebp - 0xbc], 0x9c
mov dword [ebp - 0xb8], 0x10
lea eax, [ebp - 0xbc]
mov esi, dword [sym.imp.user32.dll_SendMessageW]
push eax
push 0
push 0x43d
push dword [0x419f78]
call esi
push 0
push 0xfe
push 0x141
push edi
call esi
cmp word [ebp - 0xa2], 0
jle 0x409f2f
xor esi, esi
lea ebx, [ebp - 0x2ba]
nop dword [eax]
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [ebp + esi*4 - 0xa0]
divss xmm0, dword [0x40d218]
mulss xmm0, dword [0x40d238]
divss xmm0, dword [0x40d23c]
cvtss2sd xmm0, xmm0
sub esp, 0x18
mov dword [esp], ebx
movsd qword [esp + 0xc], xmm0
mov dword [esp + 0x14], 0x41ab9e
call dbg.swprintf
add esp, 0x18
push ebx
push 0
push 0x143
push edi
call dword [sym.imp.user32.dll_SendMessageW]
inc esi
movsx eax, word [ebp - 0xa2]
cmp esi, eax
jl 0x409ed0
push edi
call dword [sym.imp.user32.dll_SetFocus]
xor esi, esi
jmp 0x40a286
mov ecx, dword [ebp + 0x10]
movzx eax, cx
cmp eax, 0x64
jg 0x40a043
cmp eax, 1
je 0x40a0dd
cmp eax, 2
je 0x40a245
cmp eax, 0x64
jne 0x40a286
push 0x7dc
push edi
call dword [sym.imp.user32.dll_GetDlgItem]
mov ebx, eax
lea esi, [ebp - 0x2ba]
push 0xff
push esi
push eax
call dword [sym.imp.user32.dll_GetWindowTextW]
nop dword [eax + eax]
cmp word [esi], 0
lea esi, [esi + 2]
jne 0x409f90
mov dword [esi - 2], 0x20
lea eax, [ebp - 0x2ba]
nop word cs:[eax + eax]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x409fb0
mov ecx, 0xfffffffe
xor esi, esi
movzx edx, word [ecx + 0x41aba0]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x409fc0
lea eax, [ebp - 0x2ba]
push eax
push 0xffffffffffffffff
push 0x158
push ebx
call dword [sym.imp.user32.dll_SendMessageW]
cmp eax, 0xffffffff
jne 0x40a27f
mov dword [ebp - 0x18], 0
push 0
push 0
push 0x146
push ebx
call dword [sym.imp.user32.dll_SendMessageW]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xbc]
lea ecx, [ebp - 0x2ba]
lea edx, [ebp - 0x18]
push eax
call sym._number_from_string
add esp, 4
test eax, eax
je 0x40a26e
mov eax, dword [ebp - 0x10]
cmp eax, 0x20
jl 0x40a295
mov ecx, edi
mov edx, 0x6b0
jmp 0x40a275
cmp eax, 0x65
je 0x40a1c0
cmp eax, 0x66
je 0x40a1fb
cmp eax, 0x7dc
jne 0x40a286
mov esi, dword [sym.imp.user32.dll_GetDlgItem]
push 0x64
push edi
call esi
mov ebx, edi
mov edi, eax
push 0x65
push ebx
call esi
mov dword [ebp - 0x10], eax
push 0x66
push ebx
call esi
mov esi, dword [ebp + 0x14]
mov ebx, eax
push esi
call dword [sym.imp.user32.dll_GetWindowTextLengthW]
xor ecx, ecx
test eax, eax
setne cl
push ecx
push edi
call dword [sym.imp.user32.dll_EnableWindow]
push 0
push 0
push 0x146
push esi
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
je 0x40a254
push 1
push ebx
call dword [sym.imp.user32.dll_EnableWindow]
push 0
push 0
push 0x147
push esi
call dword [sym.imp.user32.dll_SendMessageW]
cmp eax, 0xffffffff
mov esi, 0
je 0x40a261
push 1
jmp 0x40a263
push 0x7dc
push edi
call dword [sym.imp.user32.dll_GetDlgItem]
mov esi, eax
mov dword [ebp - 0xbc], 0x9c
mov dword [ebp - 0xb8], 0x10
lea eax, [ebp - 0x2ba]
push eax
push 0
push 0x148
push esi
call dword [sym.imp.user32.dll_SendMessageW]
xor ebx, ebx
cmp eax, 0xffffffff
je 0x40a21c
nop
lea ecx, [ebp - 0x2ba]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call sym._number_from_string
add esp, 4
mov ecx, dword [ebp - 0x14]
movss xmm0, dword [ebp - 0x18]
cmp ecx, 2
je 0x40a180
cmp ecx, 1
je 0x40a170
xor eax, eax
test ecx, ecx
jne 0x40a190
cvtss2sd xmm0, xmm0
mulsd xmm0, qword [0x40d220]
divsd xmm0, qword [0x40d228]
mulsd xmm0, qword [0x40d230]
jmp 0x40a18c
mulss xmm0, dword [0x40d218]
cvttss2si eax, xmm0
jmp 0x40a190
cvtss2sd xmm0, xmm0
mulsd xmm0, qword [0x40d210]
cvttsd2si eax, xmm0
mov dword [ebp + ebx*4 - 0xa0], eax
lea edi, [ebx + 1]
lea eax, [ebp - 0x2ba]
push eax
push edi
push 0x148
push esi
call dword [sym.imp.user32.dll_SendMessageW]
cmp ebx, 0x1e
ja 0x40a21e
mov ebx, edi
cmp eax, 0xffffffff
jne 0x40a120
jmp 0x40a21e
push 0x7dc
push edi
call dword [sym.imp.user32.dll_GetDlgItem]
mov edi, eax
push 0
push 0
push 0x147
push eax
call dword [sym.imp.user32.dll_SendMessageW]
cmp eax, 0xffffffff
je 0x40a286
push 0
push eax
push 0x144
push edi
call dword [sym.imp.user32.dll_SendMessageW]
jmp 0x40a286
push 0x7dc
push edi
call dword [sym.imp.user32.dll_GetDlgItem]
mov edi, eax
push 0
push 0
push 0x14b
push eax
call dword [sym.imp.user32.dll_SendMessageW]
push edi
jmp 0x40a280
xor edi, edi
mov word [ebp - 0xa2], di
lea eax, [ebp - 0xbc]
push eax
push 0
push 0x447
push dword [0x419f78]
call dword [sym.imp.user32.dll_SendMessageW]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ecx
push edi
call dword [sym.imp.user32.dll_EndDialog]
mov esi, 1
jmp 0x40a286
push 0
push ebx
call dword [sym.imp.user32.dll_EnableWindow]
xor esi, esi
jmp 0x40a286
push 0
push dword [ebp - 0x10]
call dword [sym.imp.user32.dll_EnableWindow]
jmp 0x40a286
mov ecx, edi
mov edx, 0x6a9
push 0x40
call sym._MessageBoxWithResStringW
add esp, 4
push ebx
call dword [sym.imp.user32.dll_SetFocus]
mov eax, esi
add esp, 0x2b0
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
mov dword [ebp - 0x14], 0xbf800000
mov ecx, dword [ebp - 0xbc]
movss xmm0, dword [ebp - 0x18]
call sym._units_to_twips
cmp dword [ebp - 0x10], 0
jle 0x40a36f
xor edi, edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], eax
mov eax, ebx
lea ebx, [ebp - 0x2ba]
push ebx
push edi
push 0x148
push eax
call dword [sym.imp.user32.dll_SendMessageW]
mov ecx, ebx
lea edx, [ebp - 0x14]
lea eax, [ebp - 0xbc]
push eax
call sym._number_from_string
add esp, 4
mov ecx, dword [ebp - 0xbc]
movss xmm0, dword [ebp - 0x14]
cmp ecx, 2
je 0x40a345
cmp ecx, 1
mov eax, dword [ebp - 0x20]
je 0x40a331
mov edx, 0
test ecx, ecx
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
jne 0x40a35e
cvtss2sd xmm0, xmm0
mulsd xmm0, qword [0x40d220]
divsd xmm0, qword [0x40d228]
mulsd xmm0, qword [0x40d230]
cvttsd2si edx, xmm0
jmp 0x40a35e
mulss xmm0, dword [0x40d218]
cvttss2si edx, xmm0
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
jmp 0x40a35e
cvtss2sd xmm0, xmm0
mulsd xmm0, qword [0x40d210]
cvttsd2si edx, xmm0
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
cmp eax, edx
jle 0x40a376
inc edi
cmp ecx, edi
jne 0x40a2be
mov edi, ecx
jmp 0x40a376
mov edx, 0xffffffff
xor edi, edi
cmp eax, edx
je 0x40a27f
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, dword [0x40d218]
mulss xmm0, dword [0x40d238]
divss xmm0, dword [0x40d23c]
cvtss2sd xmm0, xmm0
sub esp, 0x18
lea eax, [ebp - 0x2ba]
mov dword [esp], eax
movsd qword [esp + 0xc], xmm0
mov dword [esp + 0x14], 0x41ab9e
call dbg.swprintf
add esp, 0x18
lea eax, [ebp - 0x2ba]
push eax
push edi
push 0x14a
push ebx
call dword [sym.imp.user32.dll_SendMessageW]
push 0
push ebx
call dword [sym.imp.user32.dll_SetWindowTextW]
jmp 0x40a27f