Function at 0x100046fa
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x168
mov edi, dword [esp + 0x184]
mov esi, dword [esp + 0x180]
cmp edi, 6
jbe 0x100049b0
cmp byte [esi + 6], 0xbf
jle 0x100049be
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 6
mov eax, edi
add eax, 0xfffffff9
je 0x100049a6
cmp byte [esi + eax], 0xbf
jle 0x100049b5
lea ecx, [esi + eax]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 7
cmp eax, 5
jbe 0x100049a6
add esi, 6
add edi, 0xfffffff3
lea eax, [esp + 0x1c]
lea edx, [esp + 0xc]
mov dword [edx], eax
mov eax, 0x100087b0
mov dword [edx + 4], eax
lea ecx, [esp + 0x24]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
lea ecx, [esp + 0x64]
mov dword [ecx], 0x1004ab34
mov eax, 2
mov dword [ecx + 4], eax
mov dword [ecx + 0x10], 0
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
lea eax, [esp + 0x2c]
push ecx
push eax
call fcn.1001dbd0
add esp, 8
lea ebx, [esp + 0x38]
push edi
push esi
push 0x1004ab44
push ebx
call fcn.10001851
add esp, 0x10
cmp dword [ebx], 0x80000000
je 0x100049ce
mov esi, dword [esp + 0x40]
mov dword [esp + 0x4c], esi
movsd xmm0, qword [esp + 0x38]
movsd qword [esp + 0x44], xmm0
mov edi, dword [esp + 0x34]
mov eax, 0xfffffeff
lea ecx, [edi + eax]
cmp ecx, eax
jbe 0x100049dc
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov ebp, dword [esp + 0x30]
push 0x102
push 0
lea eax, [esp + 0x6c]
push eax
call fcn.10034910
add esp, 0xc
xor eax, eax
mov byte [esp + eax + 0x64], al
lea ecx, [eax + 1]
mov eax, ecx
cmp ecx, 0x100
jne 0x10004817
xor ebx, ebx
xor ecx, ecx
mov al, byte [esp + ecx + 0x64]
mov byte [esp], al
add bl, al
mov eax, ecx
xor edx, edx
div edi
add bl, byte [ebp + edx]
movzx eax, bl
mov dl, byte [esp + eax + 0x64]
mov byte [esp + ecx + 0x64], dl
mov dl, byte [esp]
mov byte [esp + eax + 0x64], dl
inc ecx
cmp ecx, 0x100
jne 0x1000482c
push esi
mov ebp, dword [esp + 8]
push ebp
lea eax, [esp + 0x14]
push eax
call fcn.10003266
add esp, 0xc
cmp dword [esp + 0x14], esi
jne 0x100049ed
mov eax, dword [esp + 0xc]
mov dword [esp + 8], eax
mov ebx, dword [esp + 0x10]
test esi, esi
je 0x100048db
mov dh, byte [esp + 0x164]
mov dl, byte [esp + 0x165]
inc dh
movzx ecx, dh
mov dword [esp], ecx
xor edi, edi
mov dh, byte [ebp + edi]
mov ecx, dword [esp]
add ecx, edi
movzx ecx, cl
mov al, byte [esp + ecx + 0x64]
add dl, al
mov ebp, esi
movzx esi, dl
mov ah, byte [esp + esi + 0x64]
mov byte [esp + ecx + 0x64], ah
mov byte [esp + esi + 0x64], al
mov esi, ebp
mov ebp, dword [esp + 4]
add al, byte [esp + ecx + 0x64]
movzx eax, al
xor dh, byte [esp + eax + 0x64]
mov byte [ebx + edi], dh
inc edi
cmp esi, edi
jne 0x1000489f
mov ecx, dword [esp + 8]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], esi
push esi
push ebx
lea esi, [esp + 0x14]
push esi
call fcn.1001ddd0
add esp, 0xc
lea eax, [esp + 0x5c]
mov dword [eax], esi
mov dword [eax + 4], 0x10001726
mov dword [esp + 0x64], 0x1004ac88
xor ecx, ecx
inc ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x74], 0
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], ecx
lea eax, [esp + 0x64]
push eax
mov edi, dword [esp + 0x180]
push edi
call fcn.1001dbd0
add esp, 8
cmp dword [esp + 0xc], 0x80000000
je 0x10004957
push esi
call fcn.10001352
add esp, 4
push esi
call fcn.1000556f
add esp, 4
lea esi, [esp + 0x50]
push esi
call fcn.10001352
add esp, 4
push esi
call fcn.1000556f
add esp, 4
lea esi, [esp + 0x44]
push esi
call fcn.10001352
add esp, 4
push esi
call fcn.1000556f
add esp, 4
lea esi, [esp + 0x2c]
push esi
call fcn.10001352
add esp, 4
push esi
call fcn.1000556f
add esp, 4
mov eax, edi
add esp, 0x168
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1004ab24
push eax
push 6
jmp 0x100049c7
jne 0x100049be
xor eax, eax
dec eax
push 0x1004ab14
push edi
push eax
jmp 0x100049c7
push 0x1004ab04
push 6
push 0
push edi
push esi
call fcn.10049a20
lea ecx, [esp + 0x38]
call fcn.10004520
call fcn.10048873
push 0x1004ace8
push 0x47
push str.assertion_failed:__hzgvddixmepm.is_empty____hzgvddixmepm.len_____256
call fcn.10049640
push 0x1004ad28
push 0x2d
push str.assertion_failed:_input.len____output.len__
call fcn.10049640