Function at 0x56b000
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x11c
mov ebp, dword [esp + 0x130]
mov esi, dword [esp + 0x140]
mov ebx, dword [esp + 0x144]
shr dword [esp + 0x138], 3
cmp dword [esp + 0x138], 0x14
je 0x56b060
cmp dword [esp + 0x138], 0x1c
je 0x56b060
cmp dword [esp + 0x138], 0x20
je 0x56b060
xor esi, esi
mov eax, esi
add esp, 0x11c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x13c]
test edi, edi
je 0x56b828
cmp dword [esp + 0x134], 0x1ff
jbe 0x56b490
mov eax, dword [esp + 0x134]
add eax, 0x3f
and eax, 0xffffffc0
mov dword [esp + 0x30], eax
test ebx, ebx
je 0x56b0b2
cmp dword [esp + 0x138], ebx
ja 0x56b50a
cmp dword [esp + 0x138], ebx
jae 0x56b0b2
mov ebx, dword [esp + 0x138]
test esi, esi
je 0x56b0e6
lea edi, [esp + 0xd0]
cmp ebx, 4
jb 0x56b0c9
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
xor eax, eax
test bl, 2
je 0x56b0db
mov ax, word [esi]
mov word [edi], ax
mov eax, 2
test bl, 1
je 0x56b0e6
mov dl, byte [esi + eax]
mov byte [edi + eax], dl
call fcn.004ca310
mov dword [esp + 0x40], eax
test eax, eax
je 0x56b4a0
call fcn.005145e0
mov dword [esp + 0x48], eax
test eax, eax
je 0x56b4a0
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca590
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca790
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x30]
dec edx
mov dword [esp + 0x5c], edx
call fcn.004bcdc0
mov edx, dword [esp + 0x5c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.00518e10
test eax, eax
je 0x56b4a8
mov edx, dword [esp + 0x138]
dec edx
mov dword [esp + 0x58], edx
mov ecx, 0xcccccccd
mov eax, dword [esp + 0x5c]
mul ecx
shr edx, 7
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x138]
shl eax, 3
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x138]
shr edx, 2
mov dword [esp + 0x68], edx
shl edx, 2
mov dword [esp + 0x70], edx
sete dl
cmp dword [esp + 0x138], 3
setbe al
or dl, al
mov byte [esp + 0x7f], dl
je 0x56b818
mov dword [esp + 0x80], 0
xor eax, eax
lea edx, [esp + 0xf0]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x138]
shr edx, 2
mov dword [esp + 0x60], edx
mov dword [esp + 0x8c], ebp
mov ebp, dword [esp + 0x138]
lea edx, [eax + 1]
mov dword [esp + 0x84], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esp + 0x150]
mov dword [esp], eax
call fcn.0055d780
test eax, eax
je 0x56b4a8
test ebx, ebx
je 0x56b7f0
mov dword [esp + 0x3c], 0
lea eax, [esp + 0xd0]
mov dword [esp + 0x30], eax
mov esi, eax
lea edi, [esp + 0xf0]
cmp ebp, 4
jb 0x56b2b4
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
test ebp, 2
je 0x56b2c9
mov ax, word [esi]
mov word [edi], ax
mov eax, 2
test ebp, 1
je 0x56b2d7
mov dl, byte [esi + eax]
mov byte [edi + eax], dl
lea ebx, [esp + 0xb0]
mov edi, ebx
mov esi, dword [esp + 0x30]
cmp ebp, 4
jb 0x56b2ef
mov ecx, dword [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
test ebp, 2
je 0x56b304
mov ax, word [esi]
mov word [edi], ax
mov eax, 2
test ebp, 1
je 0x56b312
mov dl, byte [esi + eax]
mov byte [edi + eax], dl
mov esi, dword [esp + 0x58]
test esi, esi
js 0x56b35e
mov eax, dword [esp + 0x58]
mov al, byte [esp + eax + 0xf0]
mov byte [esp + 0x7e], al
inc eax
mov edx, dword [esp + 0x58]
mov byte [esp + edx + 0xf0], al
test al, al
jne 0x56b35e
lea edx, [esp + ebp + 0xee]
lea ecx, [esp + 0xef]
jmp 0x56b35a
mov al, byte [edx]
inc eax
mov byte [edx], al
dec edx
test al, al
jne 0x56b35e
cmp edx, ecx
jne 0x56b350
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea edi, [esp + 0x90]
mov dword [esp + 8], edi
mov dword [esp + 4], ebp
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.004d1fc0
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
lea edx, [esp + 0xf0]
mov dword [esp], edx
call fcn.004d1fc0
test ebp, ebp
jle 0x56b40e
cmp byte [esp + 0x7f], 0
jne 0x56b3f1
xor eax, eax
mov ecx, dword [esp + 0x68]
mov esi, esi
lea edi, [edi]
mov edx, dword [ebx + eax*4]
xor dword [edi + eax*4], edx
inc eax
cmp ecx, eax
ja 0x56b3e0
cmp ebp, dword [esp + 0x70]
je 0x56b40e
mov eax, dword [esp + 0x80]
nop
lea esi, [esi]
mov dl, byte [edi + eax]
xor dl, byte [ebx + eax]
mov byte [edi + eax], dl
inc eax
cmp eax, ebp
jl 0x56b400
or byte [esp + 0x90], 0x80
mov eax, dword [esp + 0x58]
or byte [esp + eax + 0x90], 1
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], edi
call fcn.004bd6f0
test eax, eax
je 0x56b4a8
mov edx, dword [esp + 0x150]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x32
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.0055e700
cmp eax, 0
jg 0x56b511
jne 0x56b4a8
xor ebx, ebx
mov eax, dword [esp + 0x84]
jmp 0x56b254
mov dword [esp + 0x30], 0x200
jmp 0x56b091
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x56b4e0
xor esi, esi
mov edx, dword [esp + 0x48]
test edx, edx
je 0x56b047
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.005146a0
mov eax, esi
add esp, 0x11c
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca700
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.004ca3c0
jmp 0x56b4b2
xor esi, esi
jmp 0x56b0a2
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov edx, dword [esp + 0x150]
mov dword [esp], edx
call fcn.0055d780
test eax, eax
je 0x56b4a8
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov eax, dword [esp + 0x150]
mov dword [esp], eax
call fcn.0055d780
test eax, eax
je 0x56b4a8
mov dword [esp + 0x6c], 0
lea edx, [esp + ebp + 0xee]
mov dword [esp + 0x54], edx
mov esi, ebp
mov ebx, dword [esp + 0x74]
mov ebp, dword [esp + 0x58]
mov dword [esp + 4], 0
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.004bd670
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], 0
test ebp, ebp
js 0x56b5ce
inc byte [esp + ebp + 0xf0]
jne 0x56b5ce
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0xef]
jmp 0x56b5ca
mov al, byte [edx]
inc eax
mov byte [edx], al
dec edx
test al, al
jne 0x56b5ce
cmp edx, ecx
jne 0x56b5c0
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
lea edx, [esp + 0xf0]
mov dword [esp], edx
call fcn.004d1fc0
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.004bd6f0
test eax, eax
je 0x56b4a8
mov edx, dword [esp + 0x30]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], ebx
call fcn.00518e10
test eax, eax
je 0x56b4a8
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.0051d1b0
test eax, eax
je 0x56b4a8
inc dword [esp + 0x3c]
mov edx, dword [esp + 0x50]
add dword [esp + 0x30], edx
mov edx, dword [esp + 0x3c]
cmp dword [esp + 0x4c], edx
jge 0x56b5a0
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.004bdc90
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.004bd160
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x64]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.0051d1b0
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00518c50
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00518010
test eax, eax
je 0x56b4a8
call fcn.004bcdc0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0051d290
test eax, eax
je 0x56b4a8
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.0051d290
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.004bda60
test eax, eax
js 0x56b7a7
mov edx, dword [esp + 0x150]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x32
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.0055e700
cmp eax, 0
jg 0x56b839
jne 0x56b4a8
inc dword [esp + 0x6c]
cmp dword [esp + 0x6c], 0x1000
je 0x56b975
mov edx, dword [esp + 0x6c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [esp + 0x150]
mov dword [esp], eax
call fcn.0055d780
test eax, eax
jne 0x56b57c
jmp 0x56b4a8
mov dword [esp + 4], ebp
lea edx, [esp + 0xd0]
mov dword [esp + 0x30], edx
mov dword [esp], edx
call fcn.004bf4b0
mov dword [esp + 0x3c], 1
mov esi, dword [esp + 0x30]
jmp 0x56b29e
mov edx, dword [esp + 0x70]
mov dword [esp + 0x80], edx
jmp 0x56b22b
call fcn.004c8ab0
mov dword [esp + 0x13c], eax
jmp 0x56b06f
mov ebp, dword [esp + 0x8c]
mov dword [esp + 8], 1
mov dword [esp + 4], 2
mov edx, dword [esp + 0x150]
mov dword [esp], edx
call fcn.0055d780
test eax, eax
je 0x56b4a8
call fcn.004bcdc0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.0051d290
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call fcn.00518010
test eax, eax
je 0x56b4a8
mov dword [esp + 4], 2
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.004bd670
test eax, eax
je 0x56b4a8
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.005146f0
test eax, eax
je 0x56b4a8
mov ebx, 2
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.004cb870
test eax, eax
je 0x56b4a8
cmp dword [esi + 4], 1
jne 0x56b97c
mov eax, dword [esi]
cmp dword [eax], 1
jne 0x56b97c
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x56b97c
call fcn.004bcdc0
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], edi
call fcn.0051d1b0
test eax, eax
je 0x56b4a8
inc ebx
jmp 0x56b90d
mov ebp, esi
jmp 0x56b474
mov dword [esp + 8], 1
mov dword [esp + 4], 3
mov edx, dword [esp + 0x150]
mov dword [esp], edx
call fcn.0055d780
test eax, eax
je 0x56b4a8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x56b9b2
mov dword [esp], eax
call fcn.004bcfd0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x56b9c1
mov dword [esp], eax
call fcn.004bcfd0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x56b9d0
mov dword [esp], eax
call fcn.004bcfd0
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.004bd2a0
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.004bd2a0
mov dword [ebp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.004bd2a0
mov dword [ebp + 0x14], eax
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x56b4e0
xor esi, esi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x56b4f0
test eax, eax
je 0x56b4f0
mov esi, dword [esp + 0x148]
test esi, esi
je 0x56ba35
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x148]
mov dword [edx], eax
mov ecx, dword [esp + 0x14c]
test ecx, ecx
je 0x56ba53
mov edx, dword [esp + 0x14c]
mov dword [edx], ebx
mov esi, 1
jmp 0x56b4f0
mov esi, 1
jmp 0x56b4f0