Function at 0x1508218
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff39c
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
mov esi, edx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0xc]
call fcn.01508464
mov ebx, eax
lea eax, [ebp - 0x34]
push eax
push esi
call sub.USER32.DLL_GetWindowRect
lea edx, [ebp - 0x44]
push edx
push esi
call sub.USER32.DLL_GetClientRect
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x34]
inc ecx
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x30]
inc eax
sub eax, dword [ebp - 0x38]
test bl, bl
mov dword [ebp - 0x18], eax
je 0x15082af
cmp byte [ebp + 8], 0
jne 0x15082af
mov eax, dword [ebp - 0x3c]
mov ecx, 0x64
imul dword [ebp - 0xc]
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x38]
imul dword [ebp - 0x10]
cdq
mov edi, 0x64
idiv edi
add ecx, dword [ebp - 0x14]
add eax, dword [ebp - 0x18]
push 0x206
push eax
push ecx
push 0
push 0
push 0
push esi
call sub.USER32.DLL_SetWindowPos
cmp byte [ebp + 8], 0
jne 0x15082ed
push 0x400
lea eax, [ebp - 0x444]
push eax
push esi
call sub.USER32.DLL_GetWindowTextA
push 1
push dword [ebp - 8]
lea ecx, [ebp - 0x444]
lea edx, [ebp - 0x444]
mov eax, dword [ebp - 4]
call fcn.01508038
lea edx, [ebp - 0x444]
push edx
push esi
call sub.USER32.DLL_SetWindowTextA
push 8
call sub.USER32.DLL_GetSystemMetrics
sub dword [ebp - 0x18], eax
push 5
push esi
call sub.USER32.DLL_GetWindow
mov esi, eax
test esi, esi
je 0x150845a
push 0x400
lea ecx, [ebp - 0x844]
push ecx
push esi
call sub.USER32.DLL_GetWindowTextA
cmp byte [ebp - 0x844], 0
je 0x150834a
push 1
push dword [ebp - 8]
lea ecx, [ebp - 0x844]
lea edx, [ebp - 0x844]
mov eax, dword [ebp - 4]
call fcn.01508038
lea eax, [ebp - 0x844]
push eax
push esi
call sub.USER32.DLL_SetWindowTextA
test bl, bl
je 0x1508448
lea edx, [ebp - 0x854]
push edx
push esi
call sub.USER32.DLL_GetWindowRect
mov ecx, dword [ebp - 0x854]
mov eax, ecx
sub eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x14]
sar edx, 1
jns 0x1508374
adc edx, 0
sub eax, edx
mov edi, 0x64
imul dword [ebp - 0xc]
cdq
idiv edi
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp - 0x850]
mov eax, edi
sub eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x18]
imul dword [ebp - 0x10]
cdq
push ecx
mov ecx, 0x64
idiv ecx
pop ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x84c]
sub eax, ecx
mov ecx, 0x64
inc eax
imul dword [ebp - 0xc]
cdq
idiv ecx
mov dword [ebp - 0x24], eax
mov ecx, 0x64
mov eax, dword [ebp - 0x848]
sub eax, edi
inc eax
imul dword [ebp - 0x10]
cdq
idiv ecx
mov edi, eax
lea eax, [ebp - 0xc54]
push 0x400
push eax
push esi
call sub.USER32.DLL_GetClassNameA
mov edx, str.COMBOBOX
lea eax, [ebp - 0xc54]
call fcn.01501930
test eax, eax
jne 0x1508431
push 0xfffffffffffffff0
push esi
call sub.USER32.DLL_GetWindowLongA
and eax, 3
dec eax
je 0x1508431
lea edx, [ebp - 0xc64]
push edx
push 0
push 0x152
push esi
call sub.USER32.DLL_SendMessageA
mov eax, dword [ebp - 0xc58]
mov ecx, 0x64
sub eax, dword [ebp - 0xc60]
inc eax
imul dword [ebp - 0x10]
cdq
idiv ecx
add edi, eax
push 0x204
push edi
push dword [ebp - 0x24]
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push 0
push esi
call sub.USER32.DLL_SetWindowPos
push 2
push esi
call sub.USER32.DLL_GetWindow
mov esi, eax
test esi, esi
jne 0x1508309
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4