Function at 0x4178a0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51f154
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x50
push esi
push edi
xor edi, edi
mov byte [ebp - 0x12], cl
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x24], edi
xor edx, edx
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c], edx
mov eax, 0x2aaaaaab
mov edx, dword [ebx + 0xc]
sub edx, dword [ebx + 8]
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x417b38
xor esi, esi
mov dword [ebp - 0x20], esi
nop word [eax + eax]
test cl, cl
je 0x417ad6
add esi, dword [ebx + 8]
mov eax, esi
cmp dword [esi + 0x14], 0x10
jb 0x417925
mov eax, dword [esi]
push dword [esi + 0x10]
cmp dword [ebx + 0x28], 0x10
lea ecx, [ebx + 0x14]
mov edx, dword [ebx + 0x24]
cmovae ecx, dword [ebx + 0x14]
push eax
push 0
call fcn.004851f0
add esp, 0xc
test eax, eax
je 0x417a39
xorps xmm0, xmm0
mov word [ebp - 0x30], 0xc3d1
mov byte [ebp - 0x2e], 0xc2
xor eax, eax
movq qword [ebp - 0x2d], xmm0
mov byte [ebp - 0x25], 0
lea ecx, [eax - 0x15]
xor byte [ebp + eax - 0x30], cl
inc eax
cmp eax, 3
jb 0x417961
xorps xmm0, xmm0
mov dword [0x558540], eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x2d], 0
movups xmmword [ebp - 0x48], xmm0
mov dword [ebp - 0x38], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x34], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417992
sub ecx, edx
lea eax, [ebp - 0x30]
push ecx
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b20
or edi, 4
mov byte [ebp - 4], 2
lea eax, [ebp - 0x48]
or edi, 1
cmp dword [ebp - 0x34], 0x10
mov dword [ebp - 0x24], edi
cmovae eax, dword [ebp - 0x48]
mov ecx, eax
mov dword [ebp - 0x18], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4179c8
sub ecx, edx
mov eax, closesocket
mov edx, dword [esi + 0x10]
sub eax, edx
cmp eax, ecx
jb 0x417b8a
cmp dword [esi + 0x14], 0x10
jb 0x4179eb
mov esi, dword [esi]
push edx
push esi
push ecx
push dword [ebp - 0x18]
push ecx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x60]
call fcn.00487550
push dword [ebp - 0x50]
mov esi, dword [ebp - 0x60]
lea eax, [ebp - 0x60]
mov edx, dword [ebx + 0x24]
lea ecx, [ebx + 0x14]
or edi, 0xa
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x4c]
cmp edi, 0x10
cmovae eax, esi
cmp dword [ebx + 0x28], 0x10
push eax
cmovae ecx, dword [ebx + 0x14]
push 0
call fcn.004851f0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x417a3f
mov byte [ebp - 0x11], 0
jmp 0x417a43
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x60]
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x18]
test al, 2
je 0x417a83
and eax, 0xfffffffd
mov dword [ebp - 0x18], eax
cmp edi, 0x10
jb 0x417a83
lea ecx, [edi + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x417a76
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x417b8f
push ecx
push esi
call fcn.004f7c11
mov eax, dword [ebp - 0x18]
add esp, 8
mov dword [ebp - 4], 1
test al, 1
je 0x417ac8
mov ecx, dword [ebp - 0x34]
and eax, 0xfffffffe
mov dword [ebp - 0x18], eax
cmp ecx, 0x10
jb 0x417ac8
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x417abe
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x417b8f
push ecx
push edx
call fcn.004f7c11
add esp, 8
cmp byte [ebp - 0x11], 0
jne 0x417b32
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
jmp 0x417b05
mov eax, dword [ebx + 8]
add eax, esi
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x417ae6
mov eax, dword [eax]
cmp dword [ebx + 0x28], 0x10
lea ecx, [ebx + 0x14]
push edx
cmovae ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x24]
push eax
push 0
call fcn.004851f0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x417b32
mov ecx, dword [ebx + 0xc]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx + 8]
add esi, 0x18
inc dword [ebp - 0x1c]
imul ecx
mov dword [ebp - 0x20], esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x1c], eax
jae 0x417b38
mov cl, byte [ebp - 0x12]
jmp 0x417910
mov byte [ebp - 0x11], 1
jmp 0x417b3c
mov byte [ebp - 0x11], 0
lea ecx, [ebx + 8]
call fcn.00481d80
mov ecx, dword [ebx + 0x28]
cmp ecx, 0x10
jb 0x417b74
mov edx, dword [ebx + 0x14]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x417b6a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x417b8f
push ecx
push edx
call fcn.004f7c11
add esp, 8
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00402390
call fcn.004fceb0
int3