Function at 0x59b350
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [0x6ce488]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0xdc], ecx
mov ecx, dword [ebp + 0x24]
shr esi, 3
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xd4], ecx
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0xac], edx
mov dword [ebp - 0xd8], ecx
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xbc], 2
push edi
mov edi, dword [ebp + 0x2c]
mov dword [ebp - 0x94], edi
cmp esi, 0x14
je 0x59b3e9
cmp esi, 0x1c
je 0x59b3e9
cmp esi, 0x20
je 0x59b3e9
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005c358e
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x59b3fe
call fcn.004f5850
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x9c], eax
mov eax, 0x200
cmp dword [ebp + 0xc], eax
cmovae eax, dword [ebp + 0xc]
add eax, 0x3f
and eax, 0xffffffc0
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x59b42a
xor ecx, ecx
cmp eax, esi
cmovb edx, ecx
mov dword [ebp - 0xac], edx
cmp eax, esi
cmova eax, esi
mov dword [ebp + 0x1c], eax
test edx, edx
je 0x59b447
push eax
push edx
lea eax, [ebp - 0x84]
push eax
call fcn.005fe040
add esp, 0xc
call fcn.0056e060
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x59bb3f
push ebx
call fcn.00520e40
mov ebx, eax
mov dword [ebp - 0x88], ebx
test ebx, ebx
je 0x59bb30
push ebx
call fcn.00520ec0
push ebx
call fcn.00520d20
push dword [ebp - 0x88]
mov ebx, eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0xa0], eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0xb4], eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0x98], eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0xcc], eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0xc8], eax
call fcn.00520d20
push dword [ebp - 0x88]
mov dword [ebp - 0x90], eax
call fcn.00520d20
mov dword [ebp - 0x8c], eax
add esp, 0x24
mov eax, dword [ebp - 0xb0]
dec eax
push eax
call fcn.004f18a0
push eax
push dword [ebp - 0x8c]
call fcn.0055e7c0
add esp, 0xc
test eax, eax
je 0x59bb1b
nop dword [eax]
push dword [ebp - 0xa8]
push 0
push edi
call fcn.005a65e0
inc dword [ebp - 0xa8]
add esp, 0xc
test eax, eax
je 0x59bb1b
cmp dword [ebp + 0x1c], 0
je 0x59b555
cmp dword [ebp - 0xac], 0
je 0x59b555
xor edi, edi
mov dword [ebp + 0x1c], edi
jmp 0x59b572
lea eax, [ebp - 0x84]
push esi
push eax
call fcn.00507c40
add esp, 8
test eax, eax
js 0x59bb1b
mov edi, 1
push esi
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.005fe040
push esi
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.005fe040
lea eax, [esi - 1]
add esp, 0x18
test eax, eax
js 0x59b5ac
nop
add byte [ebp + eax - 0x64], 1
jne 0x59b5ac
sub eax, 1
jns 0x59b5a0
push 0
push dword [ebp - 0x9c]
lea eax, [ebp - 0x24]
push 0
push eax
lea eax, [ebp - 0x84]
push esi
push eax
call fcn.004f4fa0
add esp, 0x18
test eax, eax
je 0x59bb1b
push 0
push dword [ebp - 0x9c]
lea eax, [ebp - 0x44]
push 0
push eax
lea eax, [ebp - 0x64]
push esi
push eax
call fcn.004f4fa0
add esp, 0x18
test eax, eax
je 0x59bb1b
xor ecx, ecx
test esi, esi
je 0x59b665
cmp esi, 0x40
jb 0x59b665
mov eax, esi
and eax, 0x8000003f
jns 0x59b60e
dec eax
or eax, 0xffffffc0
inc eax
mov edx, esi
sub edx, eax
movups xmm0, xmmword [ebp + ecx - 0x24]
movups xmm1, xmmword [ebp + ecx - 0x44]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x24], xmm1
movups xmm0, xmmword [ebp + ecx - 0x14]
movups xmm1, xmmword [ebp + ecx - 0x34]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x14], xmm1
movups xmm0, xmmword [ebp + ecx - 4]
movups xmm1, xmmword [ebp + ecx - 0x24]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 4], xmm1
movups xmm0, xmmword [ebp + ecx + 0xc]
movups xmm1, xmmword [ebp + ecx - 0x14]
pxor xmm1, xmm0
movups xmmword [ebp + ecx + 0xc], xmm1
add ecx, 0x40
cmp ecx, edx
jl 0x59b612
cmp ecx, esi
jge 0x59b67d
nop dword [eax]
mov al, byte [ebp + ecx - 0x44]
xor byte [ebp + ecx - 0x24], al
inc ecx
cmp ecx, esi
jl 0x59b670
push dword [ebp - 0x98]
or byte [ebp - 0x24], 0x80
lea eax, [ebp - 0x24]
or byte [ebp + esi - 0x25], 1
push esi
push eax
call fcn.004f0de0
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0x94]
push edi
push dword [ebp - 0x88]
push 0x32
push dword [ebp - 0x98]
call fcn.005a6ad0
add esp, 0x14
test eax, eax
jg 0x59b6d3
jne 0x59bb1b
mov edi, dword [ebp - 0x94]
jmp 0x59b520
mov edi, dword [ebp - 0x94]
push 0
push 2
push edi
call fcn.005a65e0
add esp, 0xc
test eax, eax
je 0x59bb1b
push 0
push 3
push edi
call fcn.005a65e0
add esp, 0xc
test eax, eax
je 0x59bb1b
mov ecx, dword [ebp - 0xb0]
mov eax, 0xcccccccd
xor edi, edi
mov dword [ebp - 0xb8], edi
lea ecx, [ecx - 1]
mul ecx
mov eax, edx
shr eax, 7
mov dword [ebp - 0xc4], eax
test edi, edi
je 0x59b743
push edi
push 0
push dword [ebp - 0x94]
call fcn.005a65e0
add esp, 0xc
test eax, eax
je 0x59bb1b
push 0
push dword [ebp - 0xb4]
call fcn.004f17f0
xor edi, edi
add esp, 8
cmp dword [ebp - 0xc4], edi
jl 0x59b7f0
lea eax, [esi - 1]
test eax, eax
js 0x59b774
add byte [ebp + eax - 0x64], 1
jne 0x59b774
sub eax, 1
jns 0x59b768
push 0
push dword [ebp - 0x9c]
lea eax, [ebp - 0x24]
push 0
push eax
lea eax, [ebp - 0x64]
push esi
push eax
call fcn.004f4fa0
add esp, 0x18
test eax, eax
je 0x59bb1b
push ebx
lea eax, [ebp - 0x24]
push esi
push eax
call fcn.004f0de0
add esp, 0xc
test eax, eax
je 0x59bb1b
lea eax, [esi*8]
imul eax, edi
push eax
push ebx
push ebx
call fcn.0055e7c0
add esp, 0xc
test eax, eax
je 0x59bb1b
mov eax, dword [ebp - 0xb4]
push ebx
push eax
push eax
call fcn.00520f90
add esp, 0xc
test eax, eax
je 0x59bb1b
inc edi
cmp edi, dword [ebp - 0xc4]
jle 0x59b761
mov eax, dword [ebp - 0xb0]
mov edi, dword [ebp - 0xb4]
dec eax
push eax
push edi
call fcn.004f1570
add esp, 8
test eax, eax
je 0x59bb1b
push edi
mov edi, dword [ebp - 0xcc]
push edi
call fcn.004f12f0
add esp, 8
test eax, eax
je 0x59bb1b
push dword [ebp - 0x8c]
push edi
push edi
call fcn.00520f90
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0x98]
push ebx
call fcn.0055e930
add esp, 8
test eax, eax
je 0x59bb1b
push dword [ebp - 0x88]
push ebx
push edi
push dword [ebp - 0xc8]
push 0
call fcn.0056daa0
add esp, 0x14
test eax, eax
je 0x59bb1b
call fcn.004f18a0
push eax
push dword [ebp - 0xc8]
push ebx
call fcn.00521020
add esp, 0xc
test eax, eax
je 0x59bb1b
push ebx
push edi
mov edi, dword [ebp - 0x90]
push edi
call fcn.00521020
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0x8c]
push edi
call fcn.004f0fe0
add esp, 8
test eax, eax
js 0x59b8e8
mov edi, dword [ebp - 0x94]
push edi
push 1
push dword [ebp - 0x88]
push 0x32
push dword [ebp - 0x90]
call fcn.005a6ad0
add esp, 0x14
test eax, eax
jg 0x59b90c
jne 0x59bb1b
mov edi, dword [ebp - 0xb8]
inc edi
mov dword [ebp - 0xb8], edi
cmp edi, 0x1000
jl 0x59b726
mov edi, dword [ebp - 0x94]
jmp 0x59b520
push 1
push 2
push edi
call fcn.005a65e0
add esp, 0xc
test eax, eax
je 0x59bb1b
call fcn.004f18a0
push eax
push dword [ebp - 0x90]
push dword [ebp - 0x8c]
call fcn.00521020
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0x88]
push dword [ebp - 0x98]
push dword [ebp - 0x8c]
push 0
push ebx
call fcn.0056daa0
add esp, 0x14
test eax, eax
je 0x59bb1b
push 2
push dword [ebp - 0x8c]
call fcn.004f17f0
add esp, 8
test eax, eax
je 0x59bb1b
push dword [ebp - 0x88]
push dword [ebp - 0x90]
push dword [ebp - 0xa4]
call fcn.0056e0c0
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0xa4]
push dword [ebp - 0x88]
push dword [ebp - 0x90]
push ebx
push dword [ebp - 0x8c]
push dword [ebp - 0xa0]
call fcn.0056c590
add esp, 0x18
test eax, eax
je 0x59bb1b
mov ecx, dword [ebp - 0xa0]
cmp dword [ecx + 4], 1
jne 0x59ba3e
mov eax, dword [ecx]
cmp dword [eax], 1
jne 0x59ba3e
cmp dword [ecx + 0xc], 0
jne 0x59ba3e
call fcn.004f18a0
push eax
mov eax, dword [ebp - 0x8c]
push eax
push eax
call fcn.00520f90
add esp, 0xc
test eax, eax
je 0x59bb1b
push dword [ebp - 0xa4]
inc dword [ebp - 0xbc]
push dword [ebp - 0x88]
push dword [ebp - 0x90]
push ebx
push dword [ebp - 0x8c]
push dword [ebp - 0xa0]
call fcn.0056c590
add esp, 0x18
test eax, eax
jne 0x59b9d1
jmp 0x59bb1b
push 1
push 3
push edi
call fcn.005a65e0
add esp, 0xc
test eax, eax
je 0x59bb1b
mov ebx, dword [ebp - 0xd0]
mov dword [ebp - 0xc0], 1
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x59ba73
push eax
call fcn.004f14c0
add esp, 4
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x59ba83
push eax
call fcn.004f14c0
add esp, 4
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x59ba93
push eax
call fcn.004f14c0
add esp, 4
push dword [ebp - 0x90]
call fcn.004f13c0
push dword [ebp - 0x98]
mov dword [ebx + 0xc], eax
call fcn.004f13c0
push dword [ebp - 0xa0]
mov dword [ebx + 0x10], eax
call fcn.004f13c0
add esp, 0xc
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0xc], 0
je 0x59bb11
cmp dword [ebx + 0x10], 0
je 0x59bb11
test eax, eax
je 0x59bb11
mov ecx, dword [ebp - 0xd4]
test ecx, ecx
je 0x59bae2
mov eax, dword [ebp - 0xb8]
mov dword [ecx], eax
mov eax, dword [ebp - 0xd8]
test eax, eax
je 0x59baf4
mov ecx, dword [ebp - 0xbc]
mov dword [eax], ecx
mov eax, dword [ebp - 0xdc]
test eax, eax
je 0x59bb1b
push esi
lea ecx, [ebp - 0x84]
push ecx
push eax
call fcn.005fe040
add esp, 0xc
jmp 0x59bb1b
mov dword [ebp - 0xc0], 0
mov ebx, dword [ebp - 0x88]
push ebx
call fcn.00520c30
push ebx
call fcn.00520ca0
add esp, 8
push dword [ebp - 0xa4]
call fcn.0056e020
add esp, 4
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc0]
xor ecx, ebp
pop edi
pop esi
call fcn.005c358e
mov esp, ebp
pop ebp
ret