Function at 0x4186e6
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push esi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
je 0x41871a
cmp dword [ebp + 0x10], 0x10
je 0x418708
cmp dword [ebp + 0x10], 0x18
je 0x418708
cmp dword [ebp + 0x10], 0x20
jne 0x41871a
cmp dword [ebp + 0x14], 0x10
je 0x41871f
cmp dword [ebp + 0x14], 0x18
je 0x41871f
cmp dword [ebp + 0x14], 0x20
je 0x41871f
jmp 0x418da0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x3c8], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x3cc], ecx
mov eax, dword [ebp - 4]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add eax, 0x3d4
push eax
call fcn.00649f00
add esp, 0xc
mov eax, dword [ebp - 4]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add eax, 0x3f4
push eax
call fcn.00649f00
add esp, 0xc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c8]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x10
je 0x41878b
cmp dword [ebp - 0x34], 0x18
je 0x4187d0
jmp 0x4187fa
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x10
jne 0x4187a0
mov dword [ebp - 0x3c], 0xa
jmp 0x4187c2
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x18
jne 0x4187b5
mov dword [ebp - 0x38], 0xc
jmp 0x4187bc
mov dword [ebp - 0x38], 0xe
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x3d0], ecx
jmp 0x418807
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x20
je 0x4187e5
mov dword [ebp - 0x40], 0xc
jmp 0x4187ec
mov dword [ebp - 0x40], 0xe
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x40]
mov dword [eax + 0x3d0], ecx
jmp 0x418807
mov eax, dword [ebp - 4]
mov dword [eax + 0x3d0], 0xe
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x20], eax
and dword [ebp - 0xc], 0
jmp 0x418829
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x3d0]
jg 0x418864
and dword [ebp - 8], 0
jmp 0x418844
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x418862
mov eax, dword [ebp - 0xc]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 8]
mov ecx, dword [ebp - 8]
and dword [eax + ecx*4], 0
jmp 0x41883d
jmp 0x418822
and dword [ebp - 0xc], 0
jmp 0x418871
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x3d0]
jg 0x4188af
and dword [ebp - 8], 0
jmp 0x41888c
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x4188ad
mov eax, dword [ebp - 0xc]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 8]
and dword [eax + ecx*4], 0
jmp 0x418885
jmp 0x41886a
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3d0]
inc eax
imul eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c8]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
add eax, 0x414
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
and dword [ebp - 0xc], 0
jmp 0x4188f3
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x418966
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 0x18
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 0x10
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 8
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x24], eax
jmp 0x4188ec
and dword [ebp - 0x10], 0
and dword [ebp - 8], 0
jmp 0x41897e
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jge 0x4189ee
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x4189ee
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
shl eax, 5
mov ecx, dword [ebp - 4]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x418970
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x418ce1
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x14], eax
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x14]
sar ecx, 0x10
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [ebp - 0x14]
sar edx, 8
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [ebp - 0x14]
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x18
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
xor ecx, edx
mov edx, dword [ebp - 0x2c]
movsx edx, byte [edx + 0x690650]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov edx, dword [ebp - 4]
xor ecx, dword [edx + eax + 0x414]
push 4
pop eax
imul eax, eax, 0
mov edx, dword [ebp - 4]
mov dword [edx + eax + 0x414], ecx
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 8
je 0x418b0f
mov dword [ebp - 0xc], 1
and dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x418b0a
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x418acb
jmp 0x418c58
mov dword [ebp - 0xc], 1
and dword [ebp - 8], 0
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0xc], eax
jge 0x418b5e
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x418b1a
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
mov edx, dword [ebp - 0x14]
sar edx, 8
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x10
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x18
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov edx, dword [ebp - 4]
xor ecx, dword [edx + eax*4 + 0x414]
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 4]
mov dword [edx + eax*4 + 0x414], ecx
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x418c58
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x418c19
and dword [ebp - 8], 0
jmp 0x418c6c
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jge 0x418cdc
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x418cdc
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
shl eax, 5
mov ecx, dword [ebp - 4]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x418c5e
jmp 0x4189f2
mov dword [ebp - 0x28], 1
jmp 0x418cf1
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [eax + 0x3d0]
jge 0x418d99
and dword [ebp - 8], 0
jmp 0x418d10
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x418d94
mov eax, dword [ebp - 0x28]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x14]
sar ecx, 0x10
and ecx, 0xff
mov eax, dword [eax*4 + 0x68f650]
xor eax, dword [ecx*4 + 0x68fa50]
mov ecx, dword [ebp - 0x14]
sar ecx, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x68fe50]
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x690250]
mov ecx, dword [ebp - 0x28]
shl ecx, 5
mov edx, dword [ebp - 4]
lea ecx, [edx + ecx + 0x1e8]
mov edx, dword [ebp - 8]
mov dword [ecx + edx*4], eax
jmp 0x418d09
jmp 0x418cea
mov eax, dword [ebp - 4]
mov byte [eax + 4], 1
pop esi
leave
ret 0x10