Function at 0x475194
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1034
call fcn.0059bb50
mov eax, dword [0x6b0d44]
xor eax, esp
mov dword [esp + 0x1030], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x28], eax
push 0xfffffffffffffffc
xor ecx, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edi
mov ebx, 0x80
mov eax, dword [edi + 0xc8]
pop esi
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4751df
mov ecx, dword [eax]
and dword [esp + 0x10], 0
cmp dword [ebp + 0xc], 0
jne 0x4751f9
cmp edx, 9
je 0x4751f4
cmp edx, 0xa
jne 0x4751f9
or dword [esp + 0x10], 0xffffffff
cmp dword [edi + 0xcc], 0
je 0x4753bb
test ecx, ecx
je 0x4753bb
call fcn.00475114
cmp dword [edi + 0x68], 0
mov dword [esp + 0x1c], eax
jne 0x47522e
mov eax, dword [edi + 0xcc]
xor ecx, ecx
cmp dword [eax + 0x220], ecx
cmovne ebx, ecx
mov eax, dword [edi + 0xcc]
push 0xffffffffffffffff
push dword [eax + 0x208]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [ebp + 0xc]
jge 0x4753a5
mov edx, 0x1000
mov esi, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
cmovns eax, ecx
mov ecx, dword [esp + 0x28]
sub esi, eax
add ecx, eax
cmp esi, edx
mov dword [esp + 0x18], ecx
cmovg esi, edx
mov edx, ebx
add eax, esi
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
push esi
jl 0x47529a
xor ecx, ecx
or edx, 0x8000
cmp dword [eax + 4], ecx
jne 0x475294
push dword [esp + 0x24]
jmp 0x4752ab
mov dword [eax + 4], ecx
push ecx
jmp 0x4752ab
cmp dword [eax + 4], 0
jne 0x4752a9
mov dword [eax + 4], 1
jmp 0x47528e
push 0
lea ecx, [esp + 0x34]
call fcn.00480cf1
mov dword [esp + 0x14], eax
pop ecx
pop ecx
test bx, bx
je 0x47536d
lea eax, [esp + 0x14]
push 4
push eax
call fcn.004a39d0
pop ecx
pop ecx
test esi, esi
jle 0x47533a
mov ecx, esi
xor edx, edx
sar ecx, 2
test ecx, ecx
jle 0x475302
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x38]
sub edi, eax
lea eax, [edi + edx*4]
mov eax, dword [esp + eax + 0x38]
xor eax, dword [esp + 0x14]
mov dword [esp + edx*4 + 0x38], eax
inc edx
cmp edx, ecx
jl 0x4752ea
mov edi, dword [esp + 0x24]
shl edx, 2
cmp edx, esi
jge 0x47533a
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x38]
sub edi, eax
mov ecx, edx
lea eax, [edi + edx]
and ecx, reloc.WS2_32.dll_closesocket
jns 0x475325
dec ecx
or ecx, 0xfffffffc
inc ecx
mov al, byte [esp + eax + 0x38]
xor al, byte [esp + ecx + 0x14]
mov byte [esp + edx + 0x38], al
inc edx
cmp edx, esi
jl 0x475313
mov edi, dword [esp + 0x24]
push 2
push esi
lea eax, [esp + 0x40]
push eax
push 2
push 4
lea eax, [esp + 0x28]
push eax
push 2
push dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
push 0x40000003
push 0
push dword [edi + 0xcc]
call fcn.00467d91
add esp, 0x30
jmp 0x475391
push 2
push esi
push dword [esp + 0x20]
push 2
push eax
lea eax, [esp + 0x40]
push eax
push 0x40000002
push 0
push dword [edi + 0xcc]
call fcn.00467d91
add esp, 0x24
mov ecx, dword [esp + 0x10]
mov esi, eax
mov edx, 0x1000
cmp ecx, dword [ebp + 0xc]
jl 0x475254
mov eax, dword [edi + 0xcc]
push 0
push 1
push dword [eax + 0x208]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x103c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0059b3f0
mov esp, ebp
pop ebp
ret