Function at 0x47f4e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0xc]
shl ecx, 1
mov word [eax], bx
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x40]
cmp ecx, 1
mov dx, word [edx + 2]
mov dword [esp + 0x14], ecx
mov word [eax + 2], dx
mov word [0x56f888], bx
mov word [0x56f8a8], 1
jle 0x47f532
mov eax, 0x56f8aa
dec ecx
mov word [eax - 0x20], 0xffff
mov word [eax], bx
add eax, 2
dec ecx
jne 0x47f523
mov eax, dword [esi + 0x44]
mov word [eax], bx
mov ecx, dword [esi + 0x44]
mov word [ecx + 2], bx
mov edx, dword [esi + 0x48]
mov word [edx], 0xffff
mov eax, dword [esi + 0x48]
mov word [eax + 2], bx
mov eax, dword [esi + 0x40]
inc ebx
lea ecx, [ebx + ebx]
cmp word [ecx + eax], 0xffff
jne 0x47f5ab
mov eax, dword [esi + 0x44]
mov dx, word [ecx + eax]
mov word [eax + ebx*2 + 2], dx
mov eax, dword [esi + 0x44]
xor edx, edx
cmp word [eax + ecx], dx
jl 0x47f716
mov eax, ebx
shl eax, 5
add eax, 0x56f888
mov di, word [eax]
inc edx
mov word [eax + 0x20], di
mov ebp, dword [esi + 0x20]
movsx edi, word [eax]
add eax, 2
mov di, word [ebp + edi*2]
mov word [eax - 2], di
mov edi, dword [esi + 0x44]
movsx edi, word [edi + ecx]
cmp edx, edi
jle 0x47f581
jmp 0x47f716
lea ebp, [ebx - 1]
cmp word [eax + ebp*2], 0xffff
lea eax, [eax + ebp*2]
jne 0x47f5c6
test ebp, ebp
jle 0x47f5fd
sub eax, 2
dec ebp
cmp word [eax], 0xffff
je 0x47f5b8
test ebp, ebp
jle 0x47f5fd
lea edx, [ebp + ebp]
mov ecx, ebp
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x40]
dec ecx
lea eax, [ecx + ecx]
cmp word [eax + edx], 0xffff
je 0x47f5f9
mov edx, dword [esi + 0x48]
mov edi, dword [esp + 0x18]
mov di, word [edi + edx]
cmp di, word [eax + edx]
jge 0x47f5f9
mov ebp, ecx
mov dword [esp + 0x18], eax
test ecx, ecx
jg 0x47f5d4
mov eax, dword [esi + 0x44]
mov dx, word [eax + ebx*2]
mov cx, word [eax + ebp*2]
mov word [esp + 0x18], dx
mov edx, ebx
movsx edi, cx
sub edx, ebp
add edx, edi
movsx edi, word [esp + 0x18]
cmp edi, edx
jle 0x47f62b
mov cx, word [esp + 0x18]
mov word [eax + ebx*2 + 2], cx
jmp 0x47f636
mov edx, ebx
sub edx, ebp
add edx, ecx
mov word [eax + ebx*2 + 2], dx
mov ecx, dword [esp + 0x14]
test ecx, ecx
jle 0x47f654
mov edi, ebx
xor eax, eax
shl edi, 5
add edi, 0x56f8a8
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [esi + 0x44]
mov dword [esp + 0x10], 0
cmp word [eax + ebp*2], 0
jl 0x47f6d9
mov eax, ebp
shl eax, 5
add eax, 0x56f888
mov dword [esp + 0x18], eax
cmp word [eax], 0xffff
je 0x47f6be
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x10]
movsx edx, word [eax + ebp*2]
movsx edi, word [eax + ebx*2]
mov eax, dword [esp + 0x18]
sub edi, edx
mov edx, ecx
movsx eax, word [eax]
add edx, edi
mov edi, dword [esp + 0x10]
add eax, edx
cdq
idiv ecx
mov eax, dword [esi + 0x1c]
mov ecx, ebx
shl ecx, 4
add edi, ecx
mov ecx, ebx
add ecx, edi
sub ecx, ebp
mov dx, word [eax + edx*2]
mov eax, dword [esp + 0x18]
mov word [ecx*2 + 0x56f8a8], dx
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x10]
inc ecx
add eax, 2
movsx edx, word [edx + ebp*2]
cmp ecx, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jle 0x47f674
mov eax, dword [esi + 0x44]
lea ecx, [ebx + ebx]
xor edx, edx
cmp word [eax + ecx], dx
jl 0x47f716
mov eax, ebx
shl eax, 5
add eax, 0x56f888
mov di, word [eax]
xor word [eax + 0x20], di
mov ebp, dword [esi + 0x20]
movsx edi, word [eax]
inc edx
add eax, 2
mov di, word [ebp + edi*2]
mov word [eax - 2], di
mov edi, dword [esi + 0x44]
movsx edi, word [edi + ecx]
cmp edx, edi
jle 0x47f6f1
mov edx, dword [esi + 0x44]
mov ax, bx
sub ax, word [edx + ebx*2 + 2]
mov edx, dword [esi + 0x48]
mov word [edx + ebx*2 + 2], ax
mov edx, dword [esp + 0x14]
cmp ebx, edx
jge 0x47f800
mov eax, dword [esi + 0x30]
mov ax, word [eax + ebx*2 + 2]
cmp ax, 0xffff
je 0x47f757
mov edi, dword [esi + 0x1c]
mov ebp, dword [esi + 0x40]
movsx eax, ax
mov ax, word [edi + eax*2]
mov word [ebp + ebx*2 + 2], ax
jmp 0x47f761
mov eax, dword [esi + 0x40]
mov word [eax + ebx*2 + 2], 0
mov eax, dword [esi + 0x44]
mov ebp, 1
cmp word [eax + ebx*2 + 2], bp
jl 0x47f7d5
mov dword [esp + 0x18], ecx
mov edx, dword [esi + 0x30]
mov dx, word [ecx + edx]
cmp dx, 0xffff
je 0x47f7b9
mov eax, ebx
shl eax, 4
add eax, ebp
mov ax, word [eax*2 + 0x56f8a8]
test ax, ax
je 0x47f7b9
mov ecx, dword [esi + 0x40]
movsx eax, ax
lea edi, [ecx + ebx*2 + 2]
mov ecx, dword [esi + 0x20]
movsx edx, dx
movsx eax, word [ecx + eax*2]
add eax, edx
cdq
idiv dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
mov cx, word [eax + edx*2]
xor word [edi], cx
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x18]
inc ebp
sub ecx, 2
movsx eax, word [edx + ebx*2 + 2]
cmp ebp, eax
mov dword [esp + 0x18], ecx
jle 0x47f774
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x40]
mov edi, dword [esi + 0x20]
cmp ebx, edx
lea eax, [ecx + ebx*2 + 2]
movsx ecx, word [ecx + ebx*2 + 2]
mov cx, word [edi + ecx*2]
mov word [eax], cx
jge 0x47f800
mov eax, dword [esi + 0x44]
movsx ecx, word [eax + ebx*2 + 2]
cmp ecx, dword [esi + 0xc]
jle 0x47f54e
mov eax, dword [esi + 0x44]
inc ebx
mov ecx, dword [esi + 0xc]
lea ebp, [ebx + ebx]
movsx eax, word [eax + ebp]
cmp eax, ecx
jg 0x47f96b
xor ecx, ecx
test eax, eax
jl 0x47f843
mov eax, ebx
shl eax, 5
add eax, 0x56f888
movsx edx, word [eax]
mov edi, dword [esi + 0x20]
inc ecx
add eax, 2
mov dx, word [edi + edx*2]
mov word [eax - 2], dx
mov edx, dword [esi + 0x44]
movsx edx, word [edx + ebp]
cmp ecx, edx
jle 0x47f826
mov ecx, dword [esi + 0x44]
mov edx, 1
mov eax, edx
cmp word [ecx + ebp], dx
jl 0x47f875
shl ebx, 5
add ebx, 0x56f88a
mov ecx, dword [esi + 0x58]
mov di, word [ebx]
add ebx, 2
mov word [ecx + eax*2], di
mov ecx, dword [esi + 0x44]
inc eax
movsx ecx, word [ecx + ebp]
cmp eax, ecx
jle 0x47f85c
mov ecx, dword [esi + 0x10]
xor eax, eax
cmp ecx, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
jl 0x47f900
mov ecx, dword [esi + 0x44]
mov ebx, 1
mov edi, ebx
cmp word [ecx + ebp], bx
jl 0x47f8d6
mov ecx, dword [esi + 0x58]
mov ax, word [ecx + edi*2]
cmp ax, 0xffff
je 0x47f8c6
movsx edx, ax
mov eax, edi
add eax, edx
cdq
idiv dword [esi + 0x10]
mov word [ecx + edi*2], dx
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0x1c]
movsx eax, word [ecx + edi*2]
movsx eax, word [edx + eax*2]
mov edx, dword [esp + 0x10]
xor ebx, eax
mov eax, dword [esi + 0x44]
inc edi
movsx eax, word [eax + ebp]
cmp edi, eax
jle 0x47f899
mov eax, dword [esp + 0x18]
test ebx, ebx
jne 0x47f8f4
mov ecx, dword [esi + 0x4c]
mov word [ecx + eax*2], dx
mov cx, word [esi + 0x10]
mov edi, dword [esi + 0x50]
sub cx, dx
mov word [edi + eax*2], cx
inc eax
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x10]
inc edx
cmp edx, ecx
mov dword [esp + 0x10], edx
jle 0x47f886
mov edx, dword [esi + 0x44]
movsx ecx, word [edx + ebp]
cmp eax, ecx
jne 0x47f94f
xor eax, eax
test ecx, ecx
jle 0x47f930
mov ecx, dword [esi + 0x50]
movsx edx, word [ecx + eax*2]
mov ecx, dword [esi + 0x5c]
add ecx, edx
mov bl, byte [ecx]
xor bl, 1
inc eax
mov byte [ecx], bl
mov edx, dword [esi + 0x44]
movsx ecx, word [edx + ebp]
cmp eax, ecx
jl 0x47f911
mov ecx, dword [esp + 0x20]
mov eax, 1
test ecx, ecx
je 0x47f978
mov dx, word [esp + 0x18]
mov word [ecx], dx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0x20]
xor eax, eax
test ecx, ecx
je 0x47f978
mov dx, word [esp + 0x14]
mov word [ecx], dx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0x20]
xor eax, eax
test ecx, ecx
je 0x47f978
mov word [ecx], dx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4