Function at 0x10047420
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
lea eax, [esp + 0x38]
push ebp
lea ecx, [esp + 0x1c]
mov edi, dword [esp + 0x54]
push eax
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x3c]
push edx
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x58]
push eax
lea edx, [esp + 0x74]
push ecx
push edx
push edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x64], ebp
call fcn.10046f90
add esp, 0x30
test al, al
jne 0x1004747f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret
mov eax, dword [esp + 0x18]
push ebp
push eax
push edi
call fcn.100485d7
mov ecx, dword [esp + 0x34]
add esp, 0xc
cmp dword [ecx + 0x4874], ebp
jne 0x100474af
mov edx, dword [esp + 0x14]
push ebp
push edx
push edi
call fcn.10046e80
add esp, 0xc
mov dword [esp + 0x10], eax
jmp 0x100474b3
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x100474cb
pop edi
pop esi
pop ebp
mov dword [0x100916e0], 0xa
xor eax, eax
pop ebx
add esp, 0x34
ret
mov edx, dword [esp + 0x50]
mov ecx, eax
test dl, 0x10
je 0x100474da
sar eax, 1
mov ecx, eax
mov eax, edx
and eax, 0x40
je 0x100474e3
sar ecx, 1
neg eax
sbb eax, eax
push 0xff
and al, 0x7f
add eax, 0x80
push eax
mov eax, dword [esp + 0x40]
push 0xff
push eax
push edx
push ecx
push 0xffffffffffffffff
call fcn.100430cc
mov esi, eax
cmp esi, ebp
jne 0x10047517
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret
mov ecx, dword [esi + 0x108]
dec ecx
push ecx
push ebp
push esi
call fcn.10043620
mov edx, dword [esp + 0x28]
push 1
mov dword [esi + 0x148], edx
mov eax, dword [esp + 0x20]
add eax, 0x3e8
push eax
call fcn.10039fa5
mov ebx, eax
add esp, 8
cmp ebx, ebp
mov dword [esp + 0x30], ebx
jne 0x10047568
push esi
mov dword [0x100916e0], 0xc
call fcn.100431d9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret
mov ecx, dword [esp + 0x18]
push ebp
push ecx
push edi
call fcn.100485d7
add esp, 0xc
lea edx, [esp + 0x3c]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x40]
push edx
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
push ebp
push esi
xor edi, edi
call fcn.100434ef
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push ebx
call fcn.10048538
add esp, 0xc
jmp 0x100475b2
mov ebx, dword [esp + 0x30]
mov ecx, dword [esi + 0x148]
lea eax, [esp + 0x2c]
push eax
add ebx, ebp
push 0
push 0
push ebx
push ecx
mov byte [esp + 0x60], 0
call fcn.10048f80
add esp, 0x14
test eax, eax
je 0x10047604
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0x148]
lea edx, [esp + 0x14]
add eax, edi
push edx
push eax
push ebx
push ecx
call fcn.10049160
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
add esp, 0x10
add edi, eax
lea ebp, [edx + ebp + 4]
mov al, 1
jmp 0x10047608
mov al, byte [esp + 0x4c]
mov ecx, dword [esp + 0x10]
add ecx, 0xfffff000
cmp edi, ecx
jge 0x10047620
cmp ebp, dword [esp + 0x1c]
jge 0x10047620
test al, al
jne 0x100475ae
test byte [esp + 0x50], 8
je 0x10047646
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
xor ecx, ecx
test edx, edx
jle 0x10047646
mov dl, byte [eax]
xor dl, 0x80
mov byte [eax], dl
mov edx, dword [esp + 0x20]
inc eax
inc ecx
cmp ecx, edx
jl 0x10047635
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
push esi
call fcn.10043576
mov cl, byte [esp + 0x50]
mov eax, dword [esp + 0x10]
test cl, 0x10
je 0x1004766f
sar eax, 1
test cl, 0x40
je 0x10047676
sar eax, 1
dec eax
push eax
push 0
push esi
call fcn.10043620
mov eax, dword [esp + 0x30]
push eax
call fcn.10032c53
push esi
call fcn.100473f0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret