Function at 0x5035a0
Capabilities:
Encrypt data using aes

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x5038e3
sub esp, 0x14
mov ecx, dword [esp + 0x1c]
mov edx, ecx
shr ecx, 2
mov dword [esp + 8], ecx
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
xor eax, eax
jmp 0x5035fc
mov dword [ebx + edx*4], ecx
lea eax, [edx + 1]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 8]
mov ecx, edi
mov edx, esi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
cmp eax, ecx
jge 0x503657
mov dword [esp + 0xc], eax
shl eax, 2
cmp eax, edx
ja 0x5038dc
nop
sub edx, eax
sub edi, eax
xchg edi, ebx
neg ebx
xchg edi, ebx
sar edi, 0x1f
and eax, edi
cmp edx, 3
jbe 0x5038d5
movzx edx, byte [esi + eax + 1]
movzx edi, byte [esi + eax]
movzx ecx, byte [esi + eax + 3]
movzx esi, byte [esi + eax + 2]
shl esi, 8
or ecx, esi
shl edx, 0x10
or ecx, edx
shl edi, 0x18
or ecx, edi
mov edx, dword [esp + 0xc]
cmp edx, ebp
jb 0x5035da
jmp 0x5038ce
jmp 0x503661
mov dword [ebx + esi*4], ebp
lea eax, [esi + 1]
mov ebp, edx
cmp eax, ebp
jge 0x5037b4
lea edx, [eax - 1]
cmp edx, ebp
jae 0x5038c7
mov edx, dword [ebx + eax*4 - 4]
test ecx, ecx
je 0x5038c0
mov dword [esp + 0xc], eax
mov esi, edx
cmp ecx, 0xffffffff
je 0x503690
cdq
idiv ecx
jmp 0x503692
xor edx, edx
test edx, edx
jne 0x503743
nop
nop
mov eax, dword [esp + 0xc]
mov edi, eax
cmp ecx, 0xffffffff
je 0x5036ac
cdq
idiv ecx
jmp 0x5036ae
neg eax
lea edx, [eax - 1]
rol esi, 8
mov dword [esp + 4], esi
shr esi, 0x18
lea ebx, str.cw
movzx esi, byte [esi + ebx]
shl esi, 0x18
mov ebp, dword [esp + 4]
shr ebp, 0x10
and ebp, 0xff
movzx ebp, byte [ebp + ebx]
shl ebp, 0x10
or esi, ebp
mov ebp, dword [esp + 4]
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + ebx]
shl ebp, 8
or ebp, esi
mov esi, dword [esp + 4]
and esi, 0xff
movzx esi, byte [esi + ebx]
or esi, ebp
cmp edx, 0x10
jae 0x5038b9
lea edx, [0xb4a8c0]
movzx ebp, byte [eax + edx - 1]
shl ebp, 0x18
xor ebp, esi
mov esi, edi
sub edi, ecx
mov edx, dword [esp + 0x28]
cmp edi, edx
jae 0x5038b2
mov ebx, dword [esp + 0x24]
xor ebp, dword [ebx + edi*4]
cmp esi, edx
jb 0x503659
jmp 0x5038b2
cmp ecx, 6
jle 0x5037aa
cmp edx, 4
jne 0x5037aa
nop
mov edx, esi
shr esi, 0x18
lea edi, str.cw
movzx esi, byte [edi + esi]
shl esi, 0x18
mov eax, edx
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + edi]
shl edx, 0x10
or esi, edx
mov edx, eax
shr eax, 8
and eax, 0xff
movzx ebx, byte [eax + edi]
shl ebx, 8
or ebx, esi
and edx, 0xff
movzx edx, byte [edx + edi]
or ebx, edx
lea edx, [0xb4a8c0]
mov edi, dword [esp + 0xc]
mov ebp, ebx
lea ebx, str.cw
jmp 0x50371f
lea edi, str.cw
mov ebx, esi
jmp 0x503793
mov eax, dword [esp + 0x30]
test eax, eax
je 0x5038a0
mov ecx, dword [esp + 0x34]
xor edx, edx
jmp 0x503889
mov ecx, dword [esp + 0x30]
mov dword [ecx + ebx*4], ebp
inc edi
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x34]
mov eax, ecx
mov ecx, ebp
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
cmp edi, 4
jge 0x503884
lea ebp, [edi + ebp - 4]
cmp ebp, esi
jae 0x5038ab
mov ebp, dword [ebx + ebp*4]
test edx, edx
jle 0x503876
lea ebx, [edx + 4]
cmp ebx, esi
jge 0x503876
mov dword [esp], ebp
mov ebx, ebp
shr ebp, 0x18
lea esi, str.cw
movzx ebp, byte [ebp + esi]
lea eax, [0xb56c80]
mov ebp, dword [eax + ebp*4]
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [esi + ebx]
xor ebp, dword [ebx*4 + 0xb57080]
mov ebx, dword [esp]
shr ebx, 8
and ebx, 0xff
movzx ebx, byte [ebx + esi]
xor ebp, dword [ebx*4 + 0xb57480]
mov ebx, dword [esp]
and ebx, 0xff
movzx ebx, byte [ebx + esi]
xor ebp, dword [ebx*4 + 0xb57880]
lea ebx, [edi + edx]
cmp ebx, ecx
jb 0x5037cb
jmp 0x5038a4
lea eax, [0xb56c80]
lea esi, str.cw
jmp 0x503869
add edx, 4
mov ebp, esi
cmp edx, ebp
jge 0x50389c
mov esi, ebp
sub ebp, edx
mov dword [esp + 0x10], ebp
xor edi, edi
jmp 0x5037eb
add esp, 0x14
ret
add esp, 0x14
ret
call fcn.004287c0
ud2
call fcn.004287c0
ud2
call fcn.004287c0
ud2
call fcn.004287c0
ud2
call fcn.004289c0
ud2
call fcn.004287c0
ud2
call fcn.004287c0
ud2
call fcn.004287c0
ud2
call fcn.004288c0
ud2
call fcn.0044d880
jmp fcn.005035a0