Function at 0x43d720
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, ecx
mov al, byte [ebp + 4]
test al, al
jne 0x43d74a
push 0x4bb0c0
lea ecx, [esp + 0x28]
call fcn.0044ee54
push 0x4b3ed8
lea eax, [esp + 0x28]
push eax
call fcn.0044e8d9
mov eax, dword [ebp + 0x3cc]
cmp eax, 0x10
jne 0x43d76d
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push ecx
push edx
mov ecx, ebp
call fcn.0043d020
pop ebp
add esp, 0x2c
ret 8
cdq
and edx, 3
add eax, edx
push ebx
mov ebx, eax
sar ebx, 2
xor eax, eax
cmp ebx, 4
je 0x43d787
cmp ebx, 6
setne al
inc eax
shl eax, 5
test ebx, ebx
mov edx, dword [eax + 0x49f770]
push esi
push edi
mov edi, dword [eax + 0x49f778]
mov eax, dword [eax + 0x49f780]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x14], edi
lea eax, [ebp + 0x454]
jle 0x43d812
mov esi, dword [esp + 0x40]
lea ecx, [ebp + 8]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ebx
movzx ecx, byte [esi]
shl ecx, 0x18
mov dword [eax], ecx
movzx ecx, byte [esi + 1]
mov edi, dword [eax]
inc esi
shl ecx, 0x10
or edi, ecx
mov dword [eax], edi
xor ecx, ecx
mov ch, byte [esi + 1]
inc esi
or edi, ecx
mov dword [eax], edi
movzx edi, byte [esi + 1]
or dword [eax], edi
mov edi, dword [esp + 0x10]
mov edi, dword [edi]
inc esi
mov ecx, eax
xor dword [ecx], edi
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add edi, 4
inc esi
add eax, 4
dec ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
jne 0x43d7c3
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x3d0]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x1c], eax
jle 0x43d92a
lea eax, [ebp + 0x28]
mov dword [esp + 0x40], eax
test ebx, ebx
jle 0x43d8e3
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
sub eax, edx
sub edi, edx
mov ecx, edx
lea esi, [ebp + 0x434]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x10], ebx
jmp 0x43d866
mov eax, dword [esp + 0x24]
add eax, ecx
cdq
idiv ebx
mov eax, ecx
add esi, 4
movzx edi, byte [ebp + edx*4 + 0x455]
cdq
idiv ebx
mov edi, dword [edi*4 + 0x49cf48]
movsx edx, byte [ebp + edx*4 + 0x456]
and edx, 0xff
xor edi, dword [edx*4 + 0x49cb48]
mov eax, dword [esp + 0x28]
add eax, ecx
cdq
idiv ebx
mov edx, dword [ebp + edx*4 + 0x454]
and edx, 0xff
xor edi, dword [edx*4 + 0x49d348]
movzx eax, byte [esi + 0x1f]
mov edx, dword [eax*4 + 0x49c748]
mov eax, dword [esp + 0x18]
xor edi, edx
mov edx, dword [eax]
add eax, 4
xor edi, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
mov dword [esi - 4], edi
inc ecx
dec eax
mov dword [esp + 0x10], eax
jne 0x43d862
mov edx, dword [esp + 0x2c]
lea ecx, [ebx*4]
mov eax, ecx
shr ecx, 2
lea esi, [ebp + 0x434]
lea edi, [ebp + 0x454]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x40]
mov ecx, dword [ebp + 0x3d0]
inc eax
add esi, 0x20
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x40], esi
jl 0x43d830
mov edi, dword [esp + 0x14]
test ebx, ebx
mov dword [esp + 0x40], 0
jle 0x43da07
mov esi, dword [esp + 0x44]
lea eax, [ebp + 0x454]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
sub edx, edi
sub eax, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
jmp 0x43d960
mov ecx, dword [ebp + 0x3d0]
mov edx, dword [esp + 0x40]
lea eax, [edx + ecx*8]
mov ecx, dword [ebp + eax*4 + 8]
mov edx, dword [esp + 0x44]
movzx eax, byte [edx + 3]
mov edx, ecx
sar edx, 0x18
xor dl, byte [eax + 0x49c548]
mov eax, dword [esp + 0x2c]
add eax, edi
mov byte [esi], dl
cdq
idiv ebx
mov eax, ecx
sar eax, 0x10
inc esi
movsx edx, byte [ebp + edx*4 + 0x456]
and edx, 0xff
xor al, byte [edx + 0x49c548]
inc esi
mov byte [esi - 1], al
mov eax, edi
cdq
idiv ebx
mov eax, ecx
sar eax, 8
movzx edx, byte [ebp + edx*4 + 0x455]
xor al, byte [edx + 0x49c548]
mov edx, dword [esp + 0x28]
mov byte [esi], al
lea eax, [edi + edx]
cdq
idiv ebx
inc esi
mov eax, dword [ebp + edx*4 + 0x454]
and eax, 0xff
mov dl, byte [eax + 0x49c548]
mov eax, dword [esp + 0x40]
xor dl, cl
mov ecx, dword [esp + 0x44]
inc esi
mov byte [esi - 1], dl
inc eax
add ecx, 4
inc edi
cmp eax, ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jl 0x43d960
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x2c
ret 8