Function at 0x49c010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov edx, dword [edi + 8]
test edx, edx
jne 0x49c078
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x49c033
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x10]
mov byte [edi + 4], 6
mov dword [edi + 8], 0x40
mov eax, dword [eax]
push 0x100
call eax
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x49c02a
push 0x100
push 0
push eax
call fcn.00472dd0
push dword [ebp + 0xc]
call fcn.0049bf90
mov edx, eax
mov eax, dword [edi + 8]
dec eax
add esp, 0x10
and edx, eax
jmp 0x49c289
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov al, byte [eax]
xor esi, esi
mov dword [ebp - 8], esi
mov byte [ebp - 1], al
test al, al
je 0x49c0a5
jmp 0x49c090
imul esi, esi, 0xf4243
movzx eax, al
inc ecx
xor esi, eax
mov al, byte [ecx]
test al, al
jne 0x49c090
mov dword [ebp - 8], esi
lea eax, [edx - 1]
mov edx, esi
and edx, eax
mov eax, dword [edi]
xor bl, bl
cmp dword [eax + edx*4], 0
lea eax, [eax + edx*4]
je 0x49c11e
lea esp, [esp]
mov eax, dword [eax]
mov cl, byte [ebp - 1]
mov eax, dword [eax]
cmp cl, byte [eax]
jne 0x49c0e4
mov esi, dword [ebp + 0xc]
sub esi, eax
test cl, cl
je 0x49c1ec
mov cl, byte [esi + eax + 1]
inc eax
cmp cl, byte [eax]
je 0x49c0d0
mov esi, dword [ebp - 8]
test bl, bl
jne 0x49c101
mov eax, dword [edi + 8]
movzx ecx, byte [edi + 4]
dec eax
mov ebx, eax
not ebx
and ebx, esi
dec ecx
shr ebx, cl
shr eax, 2
and bl, al
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x49c111
mov eax, dword [edi + 8]
sub eax, ecx
add edx, eax
jmp 0x49c113
sub edx, ecx
mov eax, dword [edi]
cmp dword [eax + edx*4], 0
lea eax, [eax + edx*4]
jne 0x49c0c0
cmp dword [ebp + 0x10], 0
je 0x49c02a
mov bl, byte [edi + 4]
mov eax, dword [edi + 0xc]
movzx ecx, bl
dec ecx
shr eax, cl
test eax, eax
je 0x49c286
inc bl
movzx eax, bl
mov ecx, eax
mov edx, 1
shl edx, cl
mov dword [ebp - 0x18], eax
mov byte [ebp - 1], bl
mov dword [ebp - 0x10], edx
lea eax, [edx - 1]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x10]
lea esi, [edx*4]
mov eax, dword [eax]
push esi
call eax
mov ebx, eax
add esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x49c02a
push esi
push 0
push ebx
call fcn.00472dd0
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x14], ecx
cmp dword [edi + 8], ecx
jbe 0x49c21c
mov eax, dword [edi]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x49c20f
push dword [eax]
call fcn.0049bf90
mov esi, eax
and esi, dword [ebp - 0xc]
add esp, 4
xor dl, dl
cmp dword [ebx + esi*4], 0
mov dword [ebp - 0x1c], eax
je 0x49c206
mov edi, dword [ebp - 0xc]
jmp 0x49c1c0
test dl, dl
jne 0x49c1dc
mov ecx, dword [ebp - 0x18]
mov edx, edi
not edx
and edx, eax
lea ecx, [ecx - 1]
shr edx, cl
mov eax, edi
shr eax, 2
and dl, al
or dl, 1
movzx ecx, dl
cmp esi, ecx
jae 0x49c1f8
mov eax, dword [ebp - 0x10]
sub eax, ecx
add esi, eax
jmp 0x49c1fa
mov eax, dword [edi]
pop edi
mov eax, dword [eax + edx*4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub esi, ecx
cmp dword [ebx + esi*4], 0
mov eax, dword [ebp - 0x1c]
jne 0x49c1c0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov dword [ebx + esi*4], eax
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, dword [edi + 8]
jb 0x49c192
mov eax, dword [edi + 0x10]
push dword [edi]
mov eax, dword [eax + 8]
call eax
mov al, byte [ebp - 1]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 0x24]
mov byte [edi + 4], al
mov eax, dword [ebp - 0x10]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [edi], ebx
and edx, eax
add esp, 4
xor bl, bl
cmp dword [esi + edx*4], 0
je 0x49c286
mov edi, dword [ebp - 8]
lea ecx, [ecx]
test bl, bl
jne 0x49c268
mov ecx, dword [ebp - 0x18]
mov ebx, eax
not ebx
and ebx, edi
dec ecx
shr ebx, cl
shr eax, 2
and bl, al
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x49c278
mov eax, dword [ebp - 0x10]
sub eax, ecx
add edx, eax
jmp 0x49c27a
sub edx, ecx
cmp dword [esi + edx*4], 0
mov eax, dword [ebp - 0xc]
jne 0x49c250
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov eax, dword [edi + 0x10]
push ebx
mov eax, dword [eax]
lea esi, [edx*4]
call eax
mov ecx, dword [edi]
add esp, 4
mov dword [esi + ecx], eax
mov eax, dword [edi]
mov eax, dword [esi + eax]
test eax, eax
je 0x49c02a
push ebx
push 0
push eax
call fcn.00472dd0
mov ecx, dword [edi]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + ecx]
add esp, 0xc
mov dword [ecx], eax
mov eax, dword [edi]
inc dword [edi + 0xc]
mov eax, dword [esi + eax]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret