Function at 0x47990c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
and dword [ebp - 0x3c], 0
and dword [ebp - 4], 0
push ebx
mov ebx, dword [0x4cf2b4]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
push 0x40000
mov dword [ebp - 0xc], esi
call ebx
test eax, eax
pop ecx
mov dword [ebp - 0x20], eax
je 0x47994a
push 0x80000
call ebx
test eax, eax
pop ecx
mov dword [ebp - 0x18], eax
jne 0x479951
xor eax, eax
jmp 0x479c91
mov eax, dword [ebp - 0x20]
mov edx, 0x1000
add eax, 0x38
or ecx, 0xffffffff
mov dword [eax + 4], ecx
mov dword [eax], ecx
mov dword [eax - 4], ecx
mov dword [eax - 8], ecx
mov dword [eax - 0xc], ecx
mov dword [eax - 0x10], ecx
mov dword [eax - 0x14], ecx
mov dword [eax - 0x18], ecx
mov dword [eax - 0x1c], ecx
mov dword [eax - 0x20], ecx
mov dword [eax - 0x24], ecx
mov dword [eax - 0x28], ecx
mov dword [eax - 0x2c], ecx
mov dword [eax - 0x30], ecx
mov dword [eax - 0x34], ecx
mov dword [eax - 0x38], ecx
add eax, 0x40
dec edx
jne 0x47995f
cmp dword [ebp + 0xc], 0
jle 0x479c5d
and dword [ebp - 0x2c], 0
push 2
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
mov eax, 0x404
cmp dword [ebp + 0xc], eax
jge 0x4799b8
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
lea eax, [esi + 1]
mov dword [ebp - 0x34], eax
xor ecx, ecx
movzx eax, byte [eax]
mov ch, byte [esi]
mov cl, byte [esi + 2]
shl eax, 4
xor eax, ecx
mov ecx, dword [ebp - 0x20]
lea ebx, [ecx + eax*4]
mov eax, esi
sub eax, dword [ebp + 8]
mov ecx, dword [ebx]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x30], eax
lea edx, [eax - 0x1ffff]
test edx, edx
jle 0x4799f2
mov dword [ebp - 0x28], edx
jmp 0x4799f6
and dword [ebp - 0x28], 0
cmp ecx, dword [ebp - 0x28]
jl 0x479abb
jmp 0x479a04
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp + 8]
add eax, ecx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov dl, byte [ecx + esi]
cmp dl, byte [eax + ecx]
jne 0x479a93
push dword [ebp - 0x38]
push eax
push esi
call fcn.00479c96
add esp, 0xc
cmp eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
jbe 0x479a93
mov ecx, esi
sub ecx, dword [ebp - 0x1c]
dec ecx
cmp ecx, 0x400
mov dword [ebp - 0x40], ecx
jae 0x479a4b
cmp eax, 0xa
ja 0x479a4b
mov dword [ebp - 0x1c], 2
jmp 0x479a66
cmp ecx, 0x4000
jae 0x479a5f
cmp eax, 0x43
mov dword [ebp - 0x1c], 3
jbe 0x479a66
mov dword [ebp - 0x1c], 4
mov ecx, dword [ebp - 8]
sub eax, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x14]
add eax, 4
add ecx, 4
cmp eax, ecx
jbe 0x479a93
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x40]
cmp ecx, 0x404
mov dword [ebp - 8], ecx
mov dword [ebp - 0x2c], eax
jae 0x479ab0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
and eax, 0x1ffff
mov eax, dword [ecx + eax*4]
cmp eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
jge 0x479a01
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 8]
jb 0x479adb
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x18]
mov edx, dword [ebx]
mov ecx, eax
and ecx, 0x1ffff
inc dword [ebp - 4]
dec dword [ebp + 0xc]
mov dword [esi + ecx*4], edx
mov esi, dword [ebp - 0x34]
mov dword [ebx], eax
jmp 0x479c1e
cmp dword [ebp - 4], 3
jbe 0x479b25
mov eax, dword [ebp - 4]
push 0x70
and al, 0xfc
pop ecx
cmp eax, ecx
mov dword [ebp - 0x10], ecx
ja 0x479af3
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
sub dword [ebp - 4], eax
mov ecx, eax
shr ecx, 2
sub cl, 0x21
push eax
push dword [ebp - 0xc]
mov byte [edi], cl
inc edi
push edi
call fcn.004b4912
mov eax, dword [ebp - 0x10]
add esp, 0xc
add dword [ebp - 0xc], eax
add edi, eax
inc dword [ebp - 0x3c]
cmp dword [ebp - 4], 3
ja 0x479ae1
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x14], 2
jne 0x479b43
mov dl, byte [ebp - 8]
mov ecx, eax
shr ecx, 3
add dl, 0x3d
and cl, 0xe0
shl dl, 2
add cl, dl
add cl, byte [ebp - 4]
jmp 0x479b5f
cmp dword [ebp - 0x14], 3
jne 0x479b64
mov cl, byte [ebp - 8]
mov dl, byte [ebp - 4]
add cl, 0x7c
mov byte [edi], cl
mov ecx, eax
shr ecx, 8
shl dl, 6
inc edi
add cl, dl
mov byte [edi], cl
inc edi
jmp 0x479b93
mov ecx, dword [ebp - 8]
mov edx, eax
add ecx, 0xfffffffb
shr ecx, 6
shr edx, 0xc
and cl, 0xfc
and dl, 0xf0
add cl, dl
add cl, byte [ebp - 4]
sub cl, 0x40
mov byte [edi], cl
mov ecx, eax
inc edi
shr ecx, 8
mov byte [edi], cl
inc edi
mov byte [edi], al
mov al, byte [ebp - 8]
inc edi
sub al, 5
mov byte [edi], al
inc edi
cmp dword [ebp - 4], 0
je 0x479bb2
push dword [ebp - 4]
push dword [ebp - 0xc]
push edi
call fcn.004b4912
add edi, dword [ebp - 4]
add esp, 0xc
and dword [ebp - 4], 0
cmp dword [ebp + 0x18], 0
je 0x479bd2
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebx]
and eax, 0x1ffff
add esi, dword [ebp - 8]
mov dword [edx + eax*4], ecx
mov eax, dword [ebp - 0x30]
mov dword [ebx], eax
jmp 0x479c15
mov eax, dword [ebp - 8]
test eax, eax
jle 0x479c15
mov dword [ebp - 0x38], eax
lea eax, [esi + 1]
xor ecx, ecx
mov ch, byte [esi]
mov dword [ebp - 0x34], eax
movzx eax, byte [eax]
mov cl, byte [esi + 2]
sub esi, dword [ebp + 8]
shl eax, 4
mov ebx, dword [ebp - 0x18]
xor eax, ecx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + eax*4]
lea eax, [ecx + eax*4]
mov ecx, esi
and ecx, 0x1ffff
dec dword [ebp - 0x38]
mov dword [ebx + ecx*4], edx
mov dword [eax], esi
mov esi, dword [ebp - 0x34]
jne 0x479bdc
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], esi
sub dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jg 0x47999e
cmp dword [ebp - 4], 3
jbe 0x479c5d
mov esi, dword [ebp - 4]
and esi, 0xfffffffc
cmp esi, 0x70
jbe 0x479c3c
push 0x70
pop esi
sub dword [ebp - 4], esi
mov eax, esi
shr eax, 2
sub al, 0x21
push esi
push dword [ebp - 0xc]
mov byte [edi], al
inc edi
push edi
call fcn.004b4912
add dword [ebp - 0xc], esi
add esp, 0xc
add edi, esi
jmp 0x479c28
mov ebx, dword [ebp - 4]
mov al, bl
sub al, 4
mov byte [edi], al
inc edi
test ebx, ebx
je 0x479c7a
push ebx
push dword [ebp - 0xc]
push edi
call fcn.004b4912
add esp, 0xc
add edi, ebx
push dword [ebp - 0x18]
mov esi, dword [0x4cf2b8]
call esi
push dword [ebp - 0x20]
call esi
pop ecx
mov eax, edi
sub eax, dword [ebp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
leave
ret