Function at 0x471360
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov edi, dword [ebp + 0xc]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
test edi, edi
je 0x471650
mov ebx, dword [ebp + 8]
xor esi, esi
jmp 0x4713ca
lea ecx, [esp + 0x18]
lea eax, [esp + 4]
push eax
call fcn.004791d0
nop dword [eax]
add ebx, 8
dec edi
je 0x471501
mov eax, dword [ebx]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov ecx, str.adb_poll
push eax
call fcn.00470cc0
add esp, 4
test eax, eax
je 0x4713f4
cmp dword [eax + 4], 0
je 0x4713f4
cmp dword [eax], 0x874d78
je 0x471407
mov eax, dword [0x86159c]
test byte [eax], 0x80
jne 0x471465
mov word [ebx + 6], 4
inc esi
jmp 0x4713c0
mov eax, dword [eax + 0xc]
mov dword [esp + 0x24], eax
movzx eax, word [ebx + 4]
mov word [esp + 0x28], ax
mov word [esp + 0x2a], 0
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x10]
je 0x471439
movq xmm0, qword [esp + 0x24]
movq qword [eax], xmm0
add dword [esp + 0xc], 8
jmp 0x471447
lea ecx, [esp + 8]
lea eax, [esp + 0x24]
push eax
call fcn.004790f0
mov dword [esp + 4], ebx
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jae 0x4713ae
mov dword [eax], ebx
add dword [esp + 0x1c], 4
jmp 0x4713c0
push 0
push 1
call fcn.004b9f30
add esp, 8
test al, al
je 0x4713fe
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0x34], eax
sub esp, 0x14
movdqa xmm0, xmmword [0x873ff0]
movdqu xmmword [esp + 4], xmm0
mov dword [esp], str.packages_modules_adb_sysdeps_win32.cpp
lea ecx, [esp + 0x18]
call fcn.004b9f90
lea ecx, [esp + 4]
call fcn.004b9f60
mov dword [esp + 0x30], eax
push dword [ebx]
push str.adb_poll_received_bad_FD__d
lea eax, [esp + 0x2c]
push eax
call fcn.004ba8a0
add esp, 0xc
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x34]
call fcn.00402f30
add esp, 8
test byte [esp + 0x24], 1
je 0x4714e7
push dword [esp + 0x2c]
call fcn.0051c570
add esp, 4
lea ecx, [esp + 4]
call fcn.004ba060
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
jmp 0x4713fe
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
cmp eax, ecx
je 0x471666
xor edx, edx
test esi, esi
mov esi, dword [ebp + 0x10]
cmovg esi, edx
sub ecx, eax
sar ecx, 3
push esi
push ecx
push eax
call sub.WS2_32.dll_WSAPoll
cmp eax, 0xffffffff
je 0x471654
mov eax, dword [esp + 8]
cmp dword [esp + 0xc], eax
je 0x47156a
xor ecx, ecx
mov edx, dword [esp + 0x18]
nop word cs:[eax + eax]
movzx esi, word [eax + ecx*8 + 6]
mov edi, dword [edx + ecx*4]
mov word [edi + 6], si
inc ecx
mov esi, dword [esp + 0xc]
sub esi, eax
sar esi, 3
cmp ecx, esi
jb 0x471550
mov edi, dword [ebp + 0xc]
test edi, edi
mov ebx, dword [ebp + 8]
je 0x471650
xor eax, eax
mov esi, 0
cmp edi, 8
jb 0x471640
mov eax, edi
and eax, 0xfffffff8
pxor xmm0, xmm0
xor ecx, ecx
pcmpeqd xmm2, xmm2
movdqa xmm4, xmmword [0x874000]
pxor xmm3, xmm3
pxor xmm1, xmm1
nop word [eax + eax]
movzx edx, word [ebx + ecx*8 + 6]
movd xmm6, edx
pinsrw xmm6, word [ebx + ecx*8 + 0xe], 1
pinsrw xmm6, word [ebx + ecx*8 + 0x16], 2
pinsrw xmm6, word [ebx + ecx*8 + 0x1e], 3
movzx edx, word [ebx + ecx*8 + 0x26]
movd xmm5, edx
pinsrw xmm5, word [ebx + ecx*8 + 0x2e], 1
pinsrw xmm5, word [ebx + ecx*8 + 0x36], 2
pinsrw xmm5, word [ebx + ecx*8 + 0x3e], 3
pcmpeqw xmm6, xmm0
pxor xmm6, xmm2
punpcklwd xmm6, xmm6
pand xmm6, xmm4
paddd xmm3, xmm6
pcmpeqw xmm5, xmm0
pxor xmm5, xmm2
punpcklwd xmm5, xmm5
pand xmm5, xmm4
paddd xmm1, xmm5
add ecx, 8
cmp eax, ecx
jne 0x4715b0
paddd xmm1, xmm3
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd esi, xmm1
cmp eax, edi
je 0x471666
nop dword [eax]
cmp word [ebx + eax*8 + 6], 1
sbb esi, 0xffffffff
inc eax
cmp edi, eax
jne 0x471640
jmp 0x471666
xor esi, esi
jmp 0x471666
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004716a0
mov esi, 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47167b
mov dword [esp + 0x1c], eax
push eax
call fcn.0051c570
add esp, 4
mov eax, dword [esp + 8]
test eax, eax
je 0x471690
mov dword [esp + 0xc], eax
push eax
call fcn.0051c570
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret