Function at 0x496d70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x58be1c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x48], eax
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x4c], esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
test edx, edx
je 0x4970ea
test esi, esi
jne 0x496dca
mov eax, dword [ebx]
mov ecx, ebx
push str.NULL_passed_to_CBC_decryptor
call dword [eax + 0x14]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4dea
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi + 0x80], 1
ja 0x496df6
mov eax, dword [edi]
push ebx
push dword [ebp - 0x48]
mov eax, dword [eax + 0x1c]
push edx
push esi
push ecx
mov ecx, edi
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4dea
mov esp, ebp
pop ebp
ret 0x14
mov eax, edx
xor edx, edx
div dword [edi + 0x80]
mov dword [ebp - 0x38], eax
test edx, edx
je 0x496e4a
mov eax, dword [ebx]
mov ecx, ebx
push str.CBC_decrypt_input_not_a_multiple_of_the_cipher_block_size.
call dword [eax + 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, ebx
push eax
push str.inputLen
call fcn.00438450
push dword [edi + 0x80]
mov ecx, ebx
push str.cipherBlockSize
call fcn.00438450
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4dea
mov esp, ebp
pop ebp
ret 0x14
mov al, byte [0x58ee62]
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 0x3d], al
call fcn.0040d5b0
mov ecx, eax
mov eax, dword [ebp + 0x10]
add eax, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x50], eax
lea ecx, [eax + 0x20]
push ecx
mov ecx, dword [ebp - 0x48]
call fcn.0040d230
test al, al
jne 0x496e98
mov eax, dword [ebx]
mov ecx, ebx
push str.Unable_to_allocate_CBC_decrypt_output_buffer.
call dword [eax + 0x14]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4dea
mov esp, ebp
pop ebp
ret 0x14
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x48]
call fcn.0040d560
cmp byte [ebp - 0x3d], 0
mov ebx, eax
mov ecx, dword [edi + 0x80]
mov dword [ebp - 8], ebx
je 0x496fbc
push ecx
lea eax, [ebp - 0x34]
push esi
push eax
call fcn.004a8910
mov eax, dword [edi]
lea ecx, [ebp - 0x24]
add esp, 0xc
push ecx
lea ecx, [ebp - 0x34]
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov eax, dword [edi + 0x80]
xor edx, edx
test eax, eax
je 0x496f13
mov esi, dword [ebp - 0x44]
lea eax, [ebp - 0x24]
add esi, 8
lea ecx, [ebp - 0x24]
sub esi, eax
mov eax, ebx
sub eax, ecx
mov ebx, eax
lea ecx, [ebp - 0x24]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, byte [ecx]
mov byte [ebx + ecx], al
mov eax, dword [edi + 0x80]
cmp edx, eax
jb 0x496ef5
mov esi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 8]
lea edx, [eax + ebx]
mov ebx, dword [ebp - 0x38]
lea ecx, [eax + esi]
mov dword [ebp - 0x4c], edx
sub ebx, 1
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ebx
je 0x496f93
nop word [eax + eax]
push eax
push ecx
lea eax, [ebp - 0x34]
push eax
call fcn.004a8910
mov eax, dword [edi]
lea ecx, [ebp - 0x24]
add esp, 0xc
push ecx
lea ecx, [ebp - 0x34]
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov eax, dword [edi + 0x80]
xor edx, edx
test eax, eax
je 0x496f7e
mov ebx, dword [ebp - 0x4c]
lea eax, [ebp - 0x24]
sub esi, eax
sub ebx, eax
lea ecx, [ebp - 0x24]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, byte [ecx]
mov byte [ebx + ecx], al
mov eax, dword [edi + 0x80]
cmp edx, eax
jb 0x496f63
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
mov esi, ecx
add dword [ebp - 0x4c], eax
add ecx, eax
sub ebx, 1
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ebx
jne 0x496f30
xor edx, edx
test eax, eax
je 0x4970df
mov ecx, dword [ebp - 0x44]
add ecx, 8
sub esi, ecx
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
inc edx
cmp edx, dword [edi + 0x80]
jb 0x496fa5
jmp 0x4970df
cmp ecx, 0x10
jne 0x497065
mov eax, dword [edi]
lea ecx, [ebp - 0x14]
push ecx
push esi
mov ecx, edi
call dword [eax + 0x14]
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
xor ecx, dword [ebp - 0x14]
xor eax, dword [ebp - 0x10]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov ecx, dword [edx + 0x10]
mov eax, dword [edx + 0x14]
xor ecx, dword [ebp - 0xc]
xor eax, dword [ebp - 8]
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x10]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], ecx
je 0x49704c
mov eax, dword [edi]
lea edx, [ebp - 0x14]
push edx
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov ecx, dword [esi]
lea ebx, [ebx + 0x10]
mov eax, dword [esi + 4]
xor ecx, dword [ebp - 0x14]
xor eax, dword [ebp - 0x10]
mov dword [ebx - 0x10], ecx
mov dword [ebx - 0xc], eax
mov ecx, dword [esi + 8]
xor ecx, dword [ebp - 0xc]
mov eax, dword [esi + 0xc]
xor eax, dword [ebp - 8]
mov dword [ebx - 8], ecx
mov ecx, dword [ebp - 0x3c]
mov esi, ecx
add ecx, 0x10
mov dword [ebx - 4], eax
sub dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], ecx
jne 0x497006
mov edx, dword [ebp - 0x44]
mov eax, dword [esi]
mov dword [edx + 8], eax
mov eax, dword [esi + 4]
mov dword [edx + 0xc], eax
mov eax, dword [esi + 8]
mov dword [edx + 0x10], eax
mov eax, dword [esi + 0xc]
mov dword [edx + 0x14], eax
jmp 0x4970df
cmp ecx, 8
jne 0x4970ea
mov eax, dword [edi]
lea ecx, [ebp - 0xc]
push ecx
push esi
mov ecx, edi
call dword [eax + 0x14]
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
xor ecx, dword [ebp - 0xc]
xor eax, dword [ebp - 8]
mov dword [ebx], ecx
lea ecx, [esi + 8]
mov dword [ebx + 4], eax
add ebx, 8
sub dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], ecx
je 0x4970d4
nop dword [eax]
mov eax, dword [edi]
lea edx, [ebp - 0xc]
push edx
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov ecx, dword [esi]
lea ebx, [ebx + 8]
xor ecx, dword [ebp - 0xc]
mov eax, dword [esi + 4]
xor eax, dword [ebp - 8]
mov dword [ebx - 8], ecx
mov ecx, dword [ebp - 0x3c]
mov esi, ecx
add ecx, 8
mov dword [ebx - 4], eax
sub dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], ecx
jne 0x4970a0
mov edx, dword [ebp - 0x44]
mov eax, dword [esi]
mov dword [edx + 8], eax
mov eax, dword [esi + 4]
mov dword [edx + 0xc], eax
push dword [ebp - 0x50]
mov ecx, dword [ebp - 0x48]
call fcn.0040ddd0
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4dea
mov esp, ebp
pop ebp
ret 0x14