Function at 0x405754
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
push esi
push edi
mov esi, eax
lea edi, [ebp - 0x3c]
push ecx
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
pop ecx
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, edx
sub eax, 0x80
je 0x405785
sub eax, 0x40
je 0x40578e
sub eax, 0x40
je 0x405797
jmp 0x4057a0
mov dword [ebp - 4], 4
jmp 0x4057a8
mov dword [ebp - 4], 6
jmp 0x4057a8
mov dword [ebp - 4], 8
jmp 0x4057a8
or eax, 0xffffffff
jmp 0x405a09
mov eax, ecx
sub eax, 0x80
je 0x4057bd
sub eax, 0x40
je 0x4057c6
sub eax, 0x40
je 0x4057cf
jmp 0x4057d8
mov dword [ebp - 8], 4
jmp 0x4057e2
mov dword [ebp - 8], 6
jmp 0x4057e2
mov dword [ebp - 8], 8
jmp 0x4057e2
mov eax, 0xfffffffe
jmp 0x405a09
cmp ecx, edx
setle al
call fcn.00405748
sub eax, 0x80
je 0x4057ff
sub eax, 0x40
je 0x405808
sub eax, 0x40
je 0x405811
jmp 0x40581a
mov dword [ebp - 0xc], 0xa
jmp 0x405824
mov dword [ebp - 0xc], 0xc
jmp 0x405824
mov dword [ebp - 0xc], 0xe
jmp 0x405824
mov eax, 0xfffffffd
jmp 0x405a09
mov esi, dword [ebp - 4]
dec esi
test esi, esi
jl 0x40585a
inc esi
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x1c], eax
mov ecx, 4
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov bl, byte [eax]
mov byte [edx], bl
add edx, 8
add eax, 8
dec ecx
jne 0x405844
inc dword [ebp - 0x1c]
inc dword [ebp - 0x18]
dec esi
jne 0x405839
xor eax, eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
jmp 0x40589a
mov ecx, 4
lea esi, [ebp - 0x5c]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
shl eax, 2
lea eax, [edi + eax*8]
push eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
pop eax
add eax, edx
push eax
mov al, byte [esi + ebx]
pop edx
mov byte [edx], al
add edi, 8
add esi, 8
dec ecx
jne 0x40586e
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x4059f7
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x405863
jmp 0x4059f7
xor ecx, ecx
lea eax, [ebp - 0x5c]
lea edx, [ecx + 1]
and edx, 0x80000003
jns 0x4058c9
dec edx
or edx, 0xfffffffc
inc edx
lea edx, [ebp + edx*8 - 0x5c]
mov ebx, dword [ebp - 4]
movzx edx, byte [edx + ebx - 1]
mov dl, byte [edx + 0x40b0b4]
xor byte [eax], dl
inc ecx
add eax, 8
cmp ecx, 4
jne 0x4058b9
mov eax, dword [ebp - 0x14]
mov al, byte [eax*4 + 0x40b2b4]
xor byte [ebp - 0x5c], al
inc dword [ebp - 0x14]
cmp dword [ebp - 4], 8
je 0x405926
mov esi, dword [ebp - 4]
dec esi
test esi, esi
jle 0x4059ab
lea edx, [ebp - 0x5c]
mov ecx, 4
mov eax, edx
mov bl, byte [eax]
xor byte [eax + 1], bl
add eax, 8
dec ecx
jne 0x405912
inc edx
dec esi
jne 0x40590b
jmp 0x4059ab
mov ebx, 1
jmp 0x405943
mov ecx, 4
lea eax, [ebp - 0x5c]
mov dl, byte [eax + ebx - 1]
xor byte [eax + ebx], dl
add eax, 8
dec ecx
jne 0x405935
inc ebx
mov dword [ebp - 0x60], ebx
fild dword [ebp - 0x60]
fild dword [ebp - 4]
fdiv dword [0x405a14]
fcompp
fnstsw ax
sahf
ja 0x40592d
mov ecx, 4
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 4]
sar edx, 1
jns 0x40596b
adc edx, 0
xor ebx, ebx
mov bl, byte [eax + edx - 1]
mov bl, byte [ebx + 0x40b0b4]
xor byte [eax + edx], bl
add eax, 8
dec ecx
jne 0x405961
mov ebx, dword [ebp - 4]
sar ebx, 1
jns 0x40598a
adc ebx, 0
inc ebx
cmp ebx, dword [ebp - 4]
jge 0x4059ab
mov ecx, 4
lea eax, [ebp - 0x5c]
mov dl, byte [eax + ebx - 1]
xor byte [eax + ebx], dl
add eax, 8
dec ecx
jne 0x405998
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x405990
xor ebx, ebx
jmp 0x4059e6
mov ecx, 4
lea esi, [ebp - 0x5c]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
shl eax, 2
lea eax, [edi + eax*8]
push eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
pop eax
add eax, edx
push eax
mov al, byte [esi + ebx]
pop edx
mov byte [edx], al
add edi, 8
add esi, 8
dec ecx
jne 0x4059ba
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x4059f7
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x4059af
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x4058b4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4