Function at 0x580e00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x220
mov eax, dword [0x5eef00]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [esp + 0x224]
push ebx
mov ebx, ecx
test ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
je 0x58162f
test eax, eax
je 0x58162f
cmp dword [ebx + 0x1028], 1
jne 0x58162f
mov eax, dword [ebx]
cmp eax, 1
push esi
lea esi, [ebx + 0xdd8]
je 0x580e5b
lea esi, [ebx + 0xf00]
cmp eax, 1
push edi
mov ecx, 0x16
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
lea esi, [ebx + 0xe30]
je 0x580e78
lea esi, [ebx + 0xf58]
cmp eax, 1
mov ecx, 0x18
lea edi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
lea esi, [ebx + 0xe90]
je 0x580e94
lea esi, [ebx + 0xfb8]
cmp word [ebx + 0x1054], 0x303
mov ecx, 0x1c
lea edi, [esp + 0xd4]
push ebp
rep movsd dword es:[edi], dword [esi]
jb 0x581123
lea eax, [esp + 0x20c]
push eax
lea ecx, [esp + 0xdc]
push ecx
call fcn.004ce230
lea edx, [esp + 0x214]
add esp, 8
test edx, edx
lea esi, [ebx + 0xcc0]
mov dword [esp + 0x14], esi
je 0x58162c
test esi, esi
je 0x58162c
lea eax, [esp + 0x148]
test eax, eax
je 0x58162c
cmp dword [ebx], 1
jne 0x580f43
mov ecx, dword [str.client_finished]
mov edx, dword [0x5bc5b0]
mov eax, dword [0x5bc5b4]
mov dword [esp + 0x154], ecx
mov cx, word [0x5bc5b8]
mov dword [esp + 0x158], edx
mov dl, byte [0x5bc5ba]
mov dword [esp + 0x15c], eax
mov word [esp + 0x160], cx
mov byte [esp + 0x162], dl
jmp 0x580f84
mov eax, dword [str.server_finished]
mov ecx, dword [0x5bc5a0]
mov edx, dword [0x5bc5a4]
mov dword [esp + 0x154], eax
mov ax, word [0x5bc5a8]
mov dword [esp + 0x158], ecx
mov cl, byte [0x5bc5aa]
mov dword [esp + 0x15c], edx
mov word [esp + 0x160], ax
mov byte [esp + 0x162], cl
push 0x20
lea edx, [esp + 0x210]
push edx
lea eax, [esp + 0x16b]
push eax
call fcn.004b42c0
lea ecx, [esp + 0x160]
add esp, 0xc
test ecx, ecx
je 0x58162c
push 0x20
lea edx, [esp + 0x1bc]
push edx
push 0x30
push esi
mov eax, ecx
push 0x2f
push eax
xor ebp, ebp
mov dword [esp + 0x28], 0xffffffff
call fcn.004cbed0
add esp, 0x18
test eax, eax
jne 0x58162c
push 0x4f
call fcn.004772c0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x58162c
lea ecx, [ecx]
mov ecx, 8
lea esi, [esp + 0x1b8]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
push 0x2f
lea ecx, [esp + 0x158]
push ecx
lea eax, [ebx + 0x20]
push eax
call fcn.004b42c0
mov esi, dword [esp + 0x20]
push 0x20
lea edx, [esp + 0x198]
push edx
push 0x30
push esi
push 0x4f
push ebx
call fcn.004cbed0
add esp, 0x24
test eax, eax
jne 0x581105
push 0x20
lea eax, [esp + 0x1bc]
push eax
push 0x30
push esi
mov ecx, eax
push 0x20
push ecx
call fcn.004cbed0
add esp, 0x18
test eax, eax
jne 0x581105
mov eax, 0xc
sub eax, ebp
cmp eax, 0x20
jbe 0x58106a
mov eax, 0x20
push eax
lea edx, [esp + 0x18c]
push edx
lea eax, [esp + ebp + 0x150]
push eax
call fcn.004b42c0
add ebp, 0x20
add esp, 0xc
cmp ebp, 0xc
jb 0x580ff0
xor eax, eax
mov dword [esp + 0x188], eax
mov dword [esp + 0x18c], eax
mov dword [esp + 0x190], eax
mov dword [esp + 0x194], eax
mov dword [esp + 0x198], eax
mov dword [esp + 0x19c], eax
mov dword [esp + 0x1a0], eax
mov dword [esp + 0x1a4], eax
mov dword [esp + 0x1b8], eax
mov dword [esp + 0x1bc], eax
mov dword [esp + 0x1c0], eax
mov dword [esp + 0x1c4], eax
mov dword [esp + 0x1c8], eax
mov dword [esp + 0x1cc], eax
mov dword [esp + 0x1d0], eax
mov dword [esp + 0x1d4], eax
xor esi, esi
jmp 0x581109
mov esi, dword [esp + 0x10]
push 0x4f
push 0
push ebx
call fcn.004b3a80
push ebx
call fcn.00477540
add esp, 0x10
test esi, esi
jmp 0x5815ed
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1ec]
push edx
call fcn.004ca7f0
lea eax, [esp + 0x200]
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.004caee0
lea edx, [esp + 0x1f8]
add esp, 0x10
test edx, edx
lea ebp, [ebx + 0xcc0]
je 0x58162c
lea eax, [esp + 0x1f8]
test eax, eax
je 0x58162c
test ebp, ebp
je 0x58162c
lea ecx, [esp + 0x148]
test ecx, ecx
je 0x58162c
cmp dword [ebx], 1
jne 0x5811d0
mov edx, dword [str.client_finished]
mov eax, dword [0x5bc5b0]
mov ecx, dword [0x5bc5b4]
mov dword [esp + 0x154], edx
mov dx, word [0x5bc5b8]
mov dword [esp + 0x158], eax
mov al, byte [0x5bc5ba]
mov dword [esp + 0x15c], ecx
mov word [esp + 0x160], dx
mov byte [esp + 0x162], al
jmp 0x581212
mov ecx, dword [str.server_finished]
mov edx, dword [0x5bc5a0]
mov eax, dword [0x5bc5a4]
mov dword [esp + 0x154], ecx
mov cx, word [0x5bc5a8]
mov dword [esp + 0x158], edx
mov dl, byte [0x5bc5aa]
mov dword [esp + 0x15c], eax
mov word [esp + 0x160], cx
mov byte [esp + 0x162], dl
mov eax, dword [esp + 0x1e8]
mov ecx, dword [esp + 0x1ec]
mov edx, dword [esp + 0x1f0]
mov dword [esp + 0x163], eax
mov eax, dword [esp + 0x1f4]
mov dword [esp + 0x16f], eax
mov eax, dword [esp + 0x200]
mov dword [esp + 0x167], ecx
mov ecx, dword [esp + 0x1f8]
mov dword [esp + 0x16b], edx
mov edx, dword [esp + 0x1fc]
mov dword [esp + 0x17b], eax
mov dword [esp + 0x173], ecx
mov ecx, dword [esp + 0x204]
mov dword [esp + 0x177], edx
mov edx, dword [esp + 0x208]
or esi, 0xffffffff
lea eax, [esp + 0x154]
test eax, eax
mov dword [esp + 0x17f], ecx
mov dword [esp + 0x183], edx
mov dword [esp + 0x14], esi
je 0x58162c
push 0xc
call fcn.004772c0
mov edi, eax
add esp, 4
test edi, edi
je 0x58162c
push 0x10
lea ecx, [esp + 0x1ac]
push ecx
push 0x18
push ebp
lea edx, [esp + 0x164]
push 0x33
push edx
xor ebx, ebx
mov dword [esp + 0x28], esi
call fcn.004cbb40
add esp, 0x18
test eax, eax
jne 0x5815d5
push 0x43
call fcn.004772c0
mov esi, eax
add esp, 4
test esi, esi
je 0x5815d5
jmp 0x581300
mov eax, dword [esp + 0x1a8]
mov dword [esi], eax
mov ecx, dword [esp + 0x1ac]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x1b0]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x1b4]
push 0x33
lea ecx, [esp + 0x158]
mov dword [esi + 0xc], eax
push ecx
lea eax, [esi + 0x10]
push eax
call fcn.004b42c0
push 0x10
lea edx, [esp + 0x1e8]
push edx
push 0x18
push ebp
push 0x43
push esi
call fcn.004cbb40
add esp, 0x24
test eax, eax
jne 0x5813ec
push 0x10
lea eax, [esp + 0x1ac]
push eax
push 0x18
push ebp
mov ecx, eax
push 0x10
push ecx
call fcn.004cbb40
add esp, 0x18
test eax, eax
jne 0x5813ec
mov eax, 0xc
sub eax, ebx
cmp eax, 0x10
jbe 0x581389
mov eax, 0x10
push eax
lea edx, [esp + 0x1dc]
push edx
lea eax, [esp + ebx + 0x150]
push eax
call fcn.004b42c0
add ebx, 0x10
add esp, 0xc
cmp ebx, 0xc
jb 0x581300
xor eax, eax
mov dword [esp + 0x1d8], eax
mov dword [esp + 0x1dc], eax
mov dword [esp + 0x1e0], eax
mov dword [esp + 0x1e4], eax
mov dword [esp + 0x1a8], eax
mov dword [esp + 0x1ac], eax
mov dword [esp + 0x1b0], eax
mov dword [esp + 0x1b4], eax
xor ebx, ebx
jmp 0x5813f0
mov ebx, dword [esp + 0x10]
push 0x43
push 0
push esi
call fcn.004b3a80
push esi
call fcn.00477540
add esp, 0x10
test ebx, ebx
jne 0x5815d5
add ebp, 0x18
test ebp, ebp
mov dword [esp + 0x10], 0xffffffff
je 0x5815d5
push 0x14
lea ecx, [esp + 0x18c]
push ecx
push 0x18
push ebp
lea edx, [esp + 0x164]
push 0x33
push edx
call fcn.004cbd00
add esp, 0x18
test eax, eax
jne 0x5815d5
push 0x47
call fcn.004772c0
mov esi, eax
add esp, 4
test esi, esi
je 0x5815d5
lea esp, [esp]
mov eax, dword [esp + 0x188]
mov dword [esi], eax
mov ecx, dword [esp + 0x18c]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x190]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x194]
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x198]
push 0x33
lea edx, [esp + 0x158]
push edx
lea eax, [esi + 0x14]
push eax
mov dword [esi + 0x10], ecx
call fcn.004b42c0
push 0x14
lea eax, [esp + 0x1c8]
push eax
push 0x18
push ebp
push 0x47
push esi
call fcn.004cbd00
add esp, 0x24
test eax, eax
jne 0x581564
push 0x14
lea ecx, [esp + 0x18c]
push ecx
push 0x18
push ebp
mov edx, ecx
push 0x14
push edx
call fcn.004cbd00
add esp, 0x18
test eax, eax
jne 0x581564
mov eax, 0xc
sub eax, ebx
cmp eax, 0x14
jbe 0x5814f7
mov eax, 0x14
push eax
lea eax, [esp + 0x1bc]
push eax
lea ecx, [ebx + edi]
push ecx
call fcn.004b42c0
add ebx, 0x14
add esp, 0xc
cmp ebx, 0xc
jb 0x581460
xor eax, eax
mov dword [esp + 0x1b8], eax
mov dword [esp + 0x1bc], eax
mov dword [esp + 0x1c0], eax
mov dword [esp + 0x1c4], eax
mov dword [esp + 0x1c8], eax
mov dword [esp + 0x188], eax
mov dword [esp + 0x18c], eax
mov dword [esp + 0x190], eax
mov dword [esp + 0x194], eax
mov dword [esp + 0x198], eax
xor ebx, ebx
jmp 0x581568
mov ebx, dword [esp + 0x10]
push 0x47
push 0
push esi
call fcn.004b3a80
push esi
call fcn.00477540
add esp, 0x10
test ebx, ebx
jne 0x5815d5
mov esi, edi
lea edx, [esp + 0x148]
xor ecx, ecx
sub esi, edx
lea esp, [esp]
lea eax, [esp + ecx + 0x148]
movzx edx, byte [eax + esi]
xor byte [eax], dl
movzx edx, byte [edi + ecx + 1]
xor byte [eax + 1], dl
movzx edx, byte [edi + ecx + 2]
xor byte [eax + 2], dl
movzx edx, byte [edi + ecx + 3]
xor byte [eax + 3], dl
movzx edx, byte [edi + ecx + 4]
xor byte [eax + 4], dl
movzx edx, byte [edi + ecx + 5]
xor byte [eax + 5], dl
add ecx, 6
cmp ecx, 0xc
jb 0x581590
mov dword [esp + 0x14], 0
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
push edi
mov dword [edi + 8], eax
call fcn.00477540
add esp, 4
cmp dword [esp + 0x14], 0
jne 0x58162c
mov ecx, dword [esp + 0x1c]
mov edx, 0xc
cmp word [ecx + 0xc], dx
mov byte [ecx], 0x14
jb 0x58162c
mov eax, dword [ecx + 8]
mov esi, dword [esp + 0x148]
mov dword [eax], esi
mov esi, dword [esp + 0x14c]
mov dword [eax + 4], esi
mov esi, dword [esp + 0x150]
mov dword [eax + 8], esi
mov dword [ecx + 4], edx
mov dword [esp + 0x18], 0
pop ebp
pop edi
pop esi
mov ecx, dword [esp + 0x220]
mov eax, dword [esp + 0xc]
pop ebx
xor ecx, esp
call fcn.004b2f95
add esp, 0x220
ret