Function at 0x47e7e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 4], 0
test edi, edi
jne 0x47e7fc
lea eax, [edi - 0x66]
pop edi
add esp, 8
ret
push ebx
mov ebx, dword [edi + 0x9c]
test ebx, ebx
jne 0x47e810
lea eax, [ebx - 0x66]
pop ebx
pop edi
add esp, 8
ret
cmp dword [ebx], 0
jne 0x47e820
pop ebx
mov eax, 0xffffff9c
pop edi
add esp, 8
ret
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x47e82e
pop ebx
pop edi
add esp, 8
ret
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x10], ecx
mov ecx, dword [ebx + 0x5c]
mov dword [ebx + 0x14], eax
cmp eax, ecx
jbe 0x47e84b
cmp dword [ebx + 0x8c], 0
jne 0x47e84b
mov dword [ebx + 0x14], ecx
mov edx, dword [ebx + 0x58]
mov ecx, dword [ebx + 8]
add ecx, edx
cmp eax, ecx
jbe 0x47e863
cmp dword [ebx + 0x8c], 0
je 0x47e863
mov dword [ebx + 0x14], ecx
cmp dword [ebx + 0x14], 0
push ebp
push esi
jbe 0x47ea05
nop
cmp dword [ebx + 8], 0
jne 0x47e934
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x47e934
mov esi, 0x4000
mov dword [esp + 0x14], esi
cmp eax, esi
jae 0x47e898
mov dword [esp + 0x14], eax
mov esi, eax
mov edx, dword [ebx + 0x88]
add edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x7c]
push 0
push edx
mov edx, dword [ebx + 0x70]
push eax
push ecx
call edx
add esp, 0x10
test eax, eax
jne 0x47ea11
mov eax, dword [ebx]
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0x7c]
push esi
push eax
mov eax, dword [ebx + 0x64]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, esi
jne 0x47ea11
cmp dword [edi + 0xa0], 0
je 0x47e926
xor ebp, ebp
test esi, esi
jbe 0x47e926
lea esi, [edi + 0xa4]
mov ecx, dword [ebx]
mov eax, esi
lea edx, [ecx + ebp]
call fcn.0047dc20
xor byte [edx], al
mov edx, dword [ebx]
movsx eax, byte [edx + ebp]
mov edi, dword [edi + 0xb0]
call fcn.0047dc40
mov ecx, dword [ebx]
mov edi, dword [esp + 0x1c]
mov byte [ecx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x14]
jb 0x47e8f3
mov esi, dword [esp + 0x14]
mov edx, dword [ebx]
add dword [ebx + 0x3c], esi
sub dword [ebx + 0x58], esi
mov dword [ebx + 4], edx
mov dword [ebx + 8], esi
cmp dword [ebx + 0x84], 0
je 0x47e9a3
cmp dword [ebx + 0x8c], 0
jne 0x47e9a3
mov eax, dword [ebx + 0x10]
mov edi, dword [ebx + 0x18]
lea ecx, [ebx + 4]
push 2
push ecx
mov dword [esp + 0x1c], eax
call fcn.004800d0
mov ebp, eax
add esp, 8
test ebp, ebp
jl 0x47e96f
cmp dword [ebx + 0x1c], 0
je 0x47e96f
mov ebp, 0xfffffffd
mov esi, dword [ebx + 0x18]
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x50]
sub esi, edi
push esi
push edx
push eax
call fcn.0048a8d0
sub dword [ebx + 0x5c], esi
add dword [esp + 0x1c], esi
add esp, 0xc
mov dword [ebx + 0x50], eax
cmp ebp, 1
je 0x47ea05
test ebp, ebp
jne 0x47ea1c
mov edi, dword [esp + 0x1c]
jmp 0x47e9fb
mov eax, dword [ebx + 8]
test eax, eax
jne 0x47e9af
cmp dword [ebx + 0x58], eax
je 0x47ea05
mov esi, dword [ebx + 0x14]
cmp esi, eax
jb 0x47e9b8
mov esi, eax
xor eax, eax
test esi, esi
jbe 0x47e9d1
mov edi, edi
mov ecx, dword [ebx + 4]
mov cl, byte [eax + ecx]
mov edx, dword [ebx + 0x10]
mov byte [eax + edx], cl
inc eax
cmp eax, esi
jb 0x47e9c0
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x50]
push esi
push edx
push eax
call fcn.0048a8d0
sub dword [ebx + 0x5c], esi
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 0x10], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add esp, 0xc
add dword [esp + 0x10], esi
mov dword [ebx + 0x50], eax
cmp dword [ebx + 0x14], 0
ja 0x47e870
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
add esp, 8
ret
pop esi
mov eax, ebp
pop ebp
pop ebx
pop edi
add esp, 8
ret