Function at 0x478680
Capabilities:
Reference http user-agent string

Disassembly:
push 0xffffffffffffffff
push 0x51c3f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
mov eax, dword [esp + 0x64]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x78]
mov ebx, ecx
lea esi, [eax + 0x14]
push 0
push edi
mov ecx, esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], esi
call fcn.004745a0
mov ebp, eax
push edi
mov ecx, esi
mov dword [esp + 0x34], ebp
call fcn.004745f0
mov ecx, dword [ebp]
push 0
push ecx
mov ecx, ebx
mov dword [esp + 0x2c], eax
call fcn.00479240
mov ebx, eax
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 0x14]
test al, 0x10
jne 0x4789e8
shr eax, 8
add ebp, 0x18
and eax, 1
push ebp
mov dword [esp + 0x30], eax
call fcn.004ca470
add ebp, eax
push ebp
call fcn.004ca470
mov esi, dword [ebp + eax]
add ebp, eax
add esp, 8
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call fcn.005112cb
test eax, eax
jne 0x478725
mov dword [esp + 0x10], eax
jmp 0x47872c
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x1c]
xor eax, eax
cmp edx, ecx
sete al
push 1
mov dword [esp + 0x3c], eax
call dword [ebx + 0x2c]
push 5
mov dword [esp + 0x2c], eax
call dword [ebx + 0x2c]
push esi
call eax
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x4789e8
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [esi + 0x1c]
mov edi, dword [sym.imp.USER32.dll_GetParent]
push ecx
call edi
push eax
call fcn.005112cb
lea edx, [esp + 0x3c]
mov ecx, eax
push edx
call fcn.00516296
mov ecx, esi
mov dword [esp + 0x18], 0
call fcn.00513dd1
test eax, eax
jne 0x4787a5
mov dword [esp + 0x18], 0x8000000
mov eax, dword [esi + 0x1c]
push eax
call edi
push eax
call fcn.005112cb
test eax, eax
jne 0x4787b9
xor edi, edi
jmp 0x4787bc
mov edi, dword [eax + 0x1c]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x70]
push 0
push 0
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x54]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x50]
sub edx, ecx
push edx
push eax
push ecx
push 0
mov ecx, esi
call fcn.00513cff
push eax
mov eax, dword [esp + 0x40]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call dword [esp + 0x60]
mov edi, eax
test edi, edi
je 0x4789da
mov ecx, dword [edi + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4789da
mov edx, dword [esp + 0x1c]
test byte [edx + 0x14], 0x80
je 0x4788b8
lea ecx, [esp + 0x4c]
call fcn.00464430
mov dword [esp + 0x4c], 0x922504
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x68], 0
test eax, eax
je 0x478876
push eax
call dword [sym.imp.USER32.dll_GetTopWindow]
mov ebx, eax
test ebx, ebx
je 0x478876
push ebx
lea ecx, [esp + 0x50]
call fcn.004646c0
push 2
push ebx
call dword [sym.imp.USER32.dll_GetWindow]
mov ebx, eax
test ebx, ebx
jne 0x47885d
mov eax, dword [esp + 0x5c]
mov ecx, dword [edi + 0x1c]
shr eax, 2
dec eax
mov dword [esp + 0x70], ecx
mov ebx, eax
js 0x47889f
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x70]
push edx
mov ecx, dword [eax + ebx*4]
push ecx
call dword [sym.imp.USER32.dll_SetParent]
dec ebx
jns 0x478889
lea ecx, [esp + 0x4c]
mov dword [esp + 0x68], 0xffffffff
mov dword [esp + 0x4c], 0x921d20
call fcn.00464630
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x20]
push edx
push eax
mov dword [ebp], edi
call fcn.00478a00
mov ecx, dword [edi + 0x1c]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x806f
push ecx
call ebx
mov edx, dword [edi + 0x1c]
push 0
push 0
push 0x8076
push edx
call ebx
mov eax, dword [esp + 0x1c]
test dword [eax + 0x14], 0x100000
je 0x47891e
mov ecx, dword [edi + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.005112cb
mov edx, dword [eax + 0x1c]
push 0
push 0
push 0x8004
push edx
call ebx
mov eax, dword [esi + 0x1c]
push 0xfffffffffffffff0
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000000
je 0x47893a
push 8
mov ecx, edi
call fcn.00513daa
mov eax, dword [esp + 0x2c]
mov ebp, 1
cmp eax, ebp
jne 0x478979
mov ecx, dword [esi + 0x1c]
push 0
push 0
push 0x130b
push ecx
call ebx
mov edx, dword [edi + 0x1c]
push 0
push eax
push 0x130c
push edx
call ebx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
push closesocket
push 0
push eax
call fcn.00474e70
mov ebx, dword [esp + 0x20]
mov ecx, esi
mov dword [ebx + 0x1d8], ebp
mov edx, dword [esi]
call dword [edx + 0x58]
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x1d8], 0
cmp eax, ebp
jne 0x4789a5
mov ecx, edi
call fcn.00513e13
jmp 0x4789d6
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4789d6
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4789d6
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call fcn.005112cb
test eax, eax
je 0x4789cb
mov eax, dword [eax + 0x1c]
cmp eax, esi
je 0x4789d6
push esi
call dword [sym.imp.USER32.dll_SetFocus]
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 0xc