Function at 0x495660
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x48
push ebx
push ebp
mov ebx, ecx
cmp byte [ebx + 0x30], 0
push esi
push edi
mov dword [esp + 0x14], ebx
jne 0x495695
mov eax, dword [ebx + 0x2c]
mov esi, dword [ebx + 4]
push str.uiview_init_dialog
push eax
mov byte [ebx + 0x30], 1
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x495695
push esi
push 0x3e6
call eax
push 1
push ebx
call fcn.00451ce0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, dword [0x5cde70]
add esi, 0x10
push esi
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [0x5ce714]
call fcn.00450090
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esp + 0x10]
lea edx, [ebx + 0x60]
push eax
lea ecx, [edi + 4]
mov dword [esp + 0x14], edx
call fcn.0044f030
mov ecx, dword [ebx + 4]
lea ebp, [ebx + 4]
lea edi, [ebx + 0xe8]
mov dword [edi], ecx
mov dword [edi + 4], 0x4b0
mov edx, dword [ebp]
lea eax, [ebx + 0xf0]
mov dword [eax], edx
mov dword [eax + 4], 0x4b1
cmp dword [ebx + 0x7c], 0
mov dword [esp + 0x1c], eax
je 0x495754
lea eax, [ebx + 0x68]
lea esi, [esp + 0x3c]
call fcn.00495620
mov esi, 8
cmp dword [eax + 0x18], esi
jb 0x495733
mov eax, dword [eax + 4]
jmp 0x495736
add eax, 4
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextW]
cmp dword [esp + 0x54], esi
jb 0x495754
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0055215c
add esp, 4
lea esi, [ebx + 0xb8]
push esi
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x495798
mov edx, dword [ebp]
push 0x3e8
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xc]
push 1
sub eax, ecx
push eax
mov eax, dword [esi + 8]
sub eax, edx
push eax
push ecx
mov ecx, dword [esp + 0x20]
push edx
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
lea esi, [ebx + 0xc8]
push esi
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x4957de
mov edx, dword [ebp]
mov ecx, dword [esi]
push 1
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov edx, dword [esi + 0xc]
mov dword [eax + 8], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x3c], 2
mov dword [eax + 0xc], edx
call fcn.00449f70
lea esi, [ebx + 0xa8]
push esi
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x495a23
mov ecx, dword [ebp]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esi + 8]
sub eax, dword [esp + 0x44]
sub eax, dword [esi]
add eax, dword [esp + 0x3c]
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
sar ebx, 1
sub eax, dword [esp + 0x48]
mov dword [esp + 0x20], ebx
add eax, dword [esp + 0x40]
cdq
sub eax, edx
mov edx, dword [edi + 4]
mov esi, eax
mov eax, dword [edi]
sar esi, 1
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
call fcn.004a1350
test eax, eax
je 0x49588a
push str.uiview_get_window_rect
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x49588a
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push ecx
push edx
lea ecx, [esp + 0x34]
push ecx
call eax
push esi
push ebx
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 1
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
mov ecx, edi
mov dword [eax + 0xc], edx
call fcn.00449f70
mov edi, dword [esp + 0x1c]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
call fcn.004a1350
test eax, eax
je 0x4958fb
push str.uiview_get_window_rect
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4958fb
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push edx
push ecx
lea edx, [esp + 0x34]
push edx
call eax
push esi
push ebx
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 1
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
mov ecx, edi
mov dword [eax + 0xc], edx
call fcn.00449f70
mov dword [esp + 0x10], 0x5dc
jmp 0x495948
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov edi, dword [ebp]
call fcn.004a1350
test eax, eax
je 0x495971
push str.uiview_get_window_rect
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x495971
mov ecx, dword [esp + 0x10]
push ecx
push edi
lea edx, [esp + 0x34]
push edx
call eax
push esi
push ebx
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x38]
sub edi, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp]
sub esi, eax
mov ebx, eax
mov dword [esp + 0x18], ecx
call fcn.004a1350
test eax, eax
je 0x4959ce
push str.uiview_move_window
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4959ce
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push 1
push esi
push edi
push ebx
push edx
mov edx, dword [esp + 0x2c]
push ecx
push edx
call eax
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, 0x5df
mov dword [esp + 0x10], eax
jle 0x495940
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xac]
mov esi, dword [eax + 0xb4]
mov edx, dword [eax + 0xa8]
add eax, 0xa8
mov eax, dword [eax + 8]
push 1
sub esi, ecx
push esi
sub eax, edx
push eax
push ecx
mov ecx, dword [ebp]
push edx
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
push 0
mov ecx, ebp
call fcn.0040ac10
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebp]
add ebx, 0xf8
push 0
push ebp
mov ecx, ebx
mov dword [ebx + 0x34], 0x1f4
mov dword [ebx + 0x54], ebp
call fcn.0040bee0
mov edx, dword [esp + 0x68]
pop edi
pop esi
pop ebp
mov dword [edx], 0
mov eax, 1
pop ebx
add esp, 0x48
ret 0x10