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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x733f52
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x819540]
xor eax, ebp
mov dword [ebp - 0x24], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x43c], ecx
cmp dword [ebp + 8], 0
jne 0x4cbd0b
mov eax, dword [str.FileCrypt_ERROR:_No_Key_DataSpecified_]
push eax
lea ecx, [ebp - 0xa0]
call fcn.00419e90
mov dword [ebp - 0x440], eax
mov ecx, dword [ebp - 0x440]
mov dword [ebp - 0x444], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x444]
push edx
lea ecx, [ebp - 0x84]
call fcn.004c23d0
push 0x7eb13c
lea eax, [ebp - 0x84]
push eax
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xa0]
call fcn.0041a030
cmp dword [ebp + 0xc], 1
jge 0x4cbd75
mov ecx, dword [str.FileCrypt_ERROR:_Key_Data_Length_should_be___0_]
push ecx
lea ecx, [ebp - 0xe4]
call fcn.00419e90
mov dword [ebp - 0x448], eax
mov edx, dword [ebp - 0x448]
mov dword [ebp - 0x44c], edx
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x44c]
push eax
lea ecx, [ebp - 0xc8]
call fcn.004c23d0
push 0x7eb13c
lea ecx, [ebp - 0xc8]
push ecx
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xe4]
call fcn.0041a030
cmp dword [ebp + 0x14], 0x10
je 0x4cbde9
cmp dword [ebp + 0x14], 0x18
je 0x4cbde9
cmp dword [ebp + 0x14], 0x20
je 0x4cbde9
push str.Illegal_Key_Length_
lea ecx, [ebp - 0x128]
call fcn.00419e90
mov dword [ebp - 0x450], eax
mov edx, dword [ebp - 0x450]
mov dword [ebp - 0x454], edx
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x454]
push eax
lea ecx, [ebp - 0x10c]
call fcn.004c23d0
push 0x7eb13c
lea ecx, [ebp - 0x10c]
push ecx
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x128]
call fcn.0041a030
cmp dword [ebp + 0x18], 0x10
je 0x4cbe5f
cmp dword [ebp + 0x18], 0x18
je 0x4cbe5f
cmp dword [ebp + 0x18], 0x20
je 0x4cbe5f
mov edx, dword [str.Illegal_Block_Size_]
push edx
lea ecx, [ebp - 0x16c]
call fcn.00419e90
mov dword [ebp - 0x458], eax
mov eax, dword [ebp - 0x458]
mov dword [ebp - 0x45c], eax
mov dword [ebp - 4], 3
mov ecx, dword [ebp - 0x45c]
push ecx
lea ecx, [ebp - 0x150]
call fcn.004c23d0
push 0x7eb13c
lea edx, [ebp - 0x150]
push edx
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x16c]
call fcn.0041a030
cmp dword [ebp + 0x1c], 0
jl 0x4cbe6b
cmp dword [ebp + 0x1c], 2
jle 0x4cbece
mov eax, dword [str.FileCrypt_ERROR:_Illegal_Operation_Mode_]
push eax
lea ecx, [ebp - 0x1b0]
call fcn.00419e90
mov dword [ebp - 0x460], eax
mov ecx, dword [ebp - 0x460]
mov dword [ebp - 0x464], ecx
mov dword [ebp - 4], 4
mov edx, dword [ebp - 0x464]
push edx
lea ecx, [ebp - 0x194]
call fcn.004c23d0
push 0x7eb13c
lea eax, [ebp - 0x194]
push eax
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x1b0]
call fcn.0041a030
cmp dword [ebp + 0x20], 0
jl 0x4cbeda
cmp dword [ebp + 0x20], 2
jle 0x4cbf3e
mov ecx, dword [str.FileCrypt_ERROR:_Illegal_Padding_Mode_]
push ecx
lea ecx, [ebp - 0x1f4]
call fcn.00419e90
mov dword [ebp - 0x468], eax
mov edx, dword [ebp - 0x468]
mov dword [ebp - 0x46c], edx
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x46c]
push eax
lea ecx, [ebp - 0x1d8]
call fcn.004c23d0
push 0x7eb13c
lea ecx, [ebp - 0x1d8]
push ecx
call fcn.005b3dd1
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x1f4]
call fcn.0041a030
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp + 0x1c]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ebp + 0x20]
mov dword [ecx + 0x14], edx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x58], 0
jmp 0x4cbf7c
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x58]
add eax, 1
cdq
idiv dword [ebp + 0xc]
mov dword [ebp - 0x58], edx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + 0x14]
jge 0x4cbf95
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x1c]
mov cl, byte [edx]
mov byte [ebp + eax - 0x44], cl
jmp 0x4cbf66
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp + 0x18]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x43c]
add ecx, 0x3dc
push ecx
call fcn.005b2260
add esp, 0xc
mov edx, dword [ebp - 0x43c]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x43c]
add ecx, 0x3dc
push ecx
mov edx, dword [ebp - 0x43c]
add edx, 0x3fc
push edx
call fcn.005b2260
add esp, 0xc
mov eax, dword [ebp - 0x43c]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 0x43c]
mov eax, dword [edx + 0xc]
push eax
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x43c]
add edx, 0x18
push edx
call fcn.005b2260
add esp, 0xc
mov eax, dword [ebp - 0x43c]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x470], ecx
cmp dword [ebp - 0x470], 0x10
je 0x4cc03f
cmp dword [ebp - 0x470], 0x18
je 0x4cc084
jmp 0x4cc0a5
mov edx, dword [ebp - 0x43c]
cmp dword [edx + 8], 0x10
jne 0x4cc057
mov dword [ebp - 0x474], 0xa
jmp 0x4cc070
mov eax, dword [ebp - 0x43c]
xor ecx, ecx
cmp dword [eax + 8], 0x18
setne cl
lea ecx, [ecx + ecx + 0xc]
mov dword [ebp - 0x474], ecx
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x474]
mov dword [edx + 0x3d8], eax
jmp 0x4cc0b5
mov ecx, dword [ebp - 0x43c]
xor edx, edx
cmp dword [ecx + 8], 0x20
sete dl
lea edx, [edx + edx + 0xc]
mov eax, dword [ebp - 0x43c]
mov dword [eax + 0x3d8], edx
jmp 0x4cc0b5
mov ecx, dword [ebp - 0x43c]
mov dword [ecx + 0x3d8], 0xe
mov edx, dword [ebp - 0x43c]
mov eax, dword [edx + 8]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], 0
jmp 0x4cc0dc
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 0x3d8]
jg 0x4cc125
mov dword [ebp - 0x58], 0
jmp 0x4cc0ff
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
cmp ecx, dword [ebp - 0x10]
jge 0x4cc123
mov edx, dword [ebp - 0x1c]
shl edx, 5
mov eax, dword [ebp - 0x43c]
lea ecx, [eax + edx + 0x38]
mov edx, dword [ebp - 0x58]
mov dword [ecx + edx*4], 0
jmp 0x4cc0f6
jmp 0x4cc0d3
mov dword [ebp - 0x1c], 0
jmp 0x4cc137
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 0x3d8]
jg 0x4cc183
mov dword [ebp - 0x58], 0
jmp 0x4cc15a
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
cmp ecx, dword [ebp - 0x10]
jge 0x4cc181
mov edx, dword [ebp - 0x1c]
shl edx, 5
mov eax, dword [ebp - 0x43c]
lea ecx, [eax + edx + 0x1f8]
mov edx, dword [ebp - 0x58]
mov dword [ecx + edx*4], 0
jmp 0x4cc151
jmp 0x4cc12e
mov eax, dword [ebp - 0x43c]
mov ecx, dword [eax + 0x3d8]
add ecx, 1
imul ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x43c]
mov eax, dword [edx + 0xc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x43c]
add eax, 0x41c
mov dword [ebp - 0x48], eax
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], 0
jmp 0x4cc1d4
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x4c]
jge 0x4cc252
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx]
shl edx, 0x18
mov eax, dword [ebp - 0x48]
mov dword [eax], edx
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
movzx eax, byte [edx]
shl eax, 0x10
mov ecx, dword [ebp - 0x48]
or eax, dword [ecx]
mov edx, dword [ebp - 0x48]
mov dword [edx], eax
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx]
shl edx, 8
mov eax, dword [ebp - 0x48]
or edx, dword [eax]
mov ecx, dword [ebp - 0x48]
mov dword [ecx], edx
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
mov edx, dword [ebp - 0x48]
or ecx, dword [edx]
mov eax, dword [ebp - 0x48]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x48]
add edx, 4
mov dword [ebp - 0x48], edx
jmp 0x4cc1cb
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
jmp 0x4cc274
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x4c]
jge 0x4cc2f6
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x18]
jge 0x4cc2f6
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
shl eax, 5
mov ecx, dword [ebp - 0x43c]
lea ecx, [ecx + eax + 0x38]
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov eax, dword [esi + eax*4 + 0x41c]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ecx + 0x3d8]
sub edx, eax
shl edx, 5
mov eax, dword [ebp - 0x43c]
lea ecx, [eax + edx + 0x1f8]
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov eax, dword [esi + eax*4 + 0x41c]
mov dword [ecx + edx*4], eax
jmp 0x4cc262
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x54]
cmp ecx, dword [ebp - 0x18]
jge 0x4cc639
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x43c]
mov ecx, dword [eax + edx*4 + 0x418]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
sar edx, 0x10
and edx, 0xff
movsx eax, byte [edx + str.cw]
and eax, 0xff
shl eax, 0x18
mov ecx, dword [ebp - 0x50]
sar ecx, 8
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
and edx, 0xff
shl edx, 0x10
xor eax, edx
mov ecx, dword [ebp - 0x50]
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
and edx, 0xff
shl edx, 8
xor eax, edx
mov ecx, dword [ebp - 0x50]
sar ecx, 0x18
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
and edx, 0xff
xor eax, edx
mov ecx, dword [ebp - 0x14]
movsx edx, byte [ecx + 0x765c98]
and edx, 0xff
shl edx, 0x18
xor eax, edx
mov ecx, dword [ebp - 0x43c]
xor eax, dword [ecx + 0x41c]
mov edx, dword [ebp - 0x43c]
mov dword [edx + 0x41c], eax
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x4c], 8
je 0x4cc426
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x58], 0
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x4c]
jge 0x4cc421
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x43c]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov edx, dword [eax + edx*4 + 0x41c]
xor edx, dword [esi + ecx*4 + 0x41c]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x43c]
mov dword [ecx + eax*4 + 0x41c], edx
mov edx, dword [ebp - 0x58]
add edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x4cc3d5
jmp 0x4cc597
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x1c], eax
jge 0x4cc485
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov ecx, dword [edx + ecx*4 + 0x41c]
xor ecx, dword [esi + eax*4 + 0x41c]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x43c]
mov dword [eax + edx*4 + 0x41c], ecx
mov ecx, dword [ebp - 0x58]
add ecx, 1
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
jmp 0x4cc434
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ecx + eax*4 + 0x418]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x50]
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
mov edx, dword [ebp - 0x50]
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 - 0x50]
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 - 0x50]
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 - 0x43c]
xor ecx, dword [edx + eax*4 + 0x41c]
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x43c]
mov dword [edx + eax*4 + 0x41c], ecx
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x4c]
jge 0x4cc597
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x43c]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov edx, dword [eax + edx*4 + 0x41c]
xor edx, dword [esi + ecx*4 + 0x41c]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x43c]
mov dword [ecx + eax*4 + 0x41c], edx
mov edx, dword [ebp - 0x58]
add edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x4cc54b
mov dword [ebp - 0x58], 0
jmp 0x4cc5b2
mov ecx, dword [ebp - 0x58]
add ecx, 1
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x4c]
jge 0x4cc634
mov ecx, dword [ebp - 0x54]
cmp ecx, dword [ebp - 0x18]
jge 0x4cc634
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
shl eax, 5
mov edx, dword [ebp - 0x43c]
lea ecx, [edx + eax + 0x38]
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov eax, dword [esi + eax*4 + 0x41c]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ecx + 0x3d8]
sub edx, eax
shl edx, 5
mov eax, dword [ebp - 0x43c]
lea ecx, [eax + edx + 0x1f8]
mov eax, dword [ebp - 0x54]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0x58]
mov esi, dword [ebp - 0x43c]
mov eax, dword [esi + eax*4 + 0x41c]
mov dword [ecx + edx*4], eax
jmp 0x4cc5a0
jmp 0x4cc2fd
mov dword [ebp - 0x5c], 1
jmp 0x4cc64b
mov ecx, dword [ebp - 0x5c]
add ecx, 1
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x5c]
cmp eax, dword [edx + 0x3d8]
jge 0x4cc704
mov dword [ebp - 0x58], 0
jmp 0x4cc672
mov ecx, dword [ebp - 0x58]
add ecx, 1
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x10]
jge 0x4cc6ff
mov eax, dword [ebp - 0x5c]
shl eax, 5
mov ecx, dword [ebp - 0x43c]
lea edx, [ecx + eax + 0x1f8]
mov eax, dword [ebp - 0x58]
mov ecx, dword [edx + eax*4]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
sar edx, 0x18
and edx, 0xff
mov eax, dword [ebp - 0x50]
sar eax, 0x10
and eax, 0xff
mov ecx, dword [edx*4 + 0x764c98]
xor ecx, dword [eax*4 + 0x765098]
mov edx, dword [ebp - 0x50]
sar edx, 8
and edx, 0xff
xor ecx, dword [edx*4 + 0x765498]
mov eax, dword [ebp - 0x50]
and eax, 0xff
xor ecx, dword [eax*4 + 0x765898]
mov edx, dword [ebp - 0x5c]
shl edx, 5
mov eax, dword [ebp - 0x43c]
lea edx, [eax + edx + 0x1f8]
mov eax, dword [ebp - 0x58]
mov dword [edx + eax*4], ecx
jmp 0x4cc669
jmp 0x4cc642
mov ecx, dword [ebp - 0x43c]
mov byte [ecx + 4], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.005b2a44
mov esp, ebp
pop ebp
ret 0x1c