Function at 0x406e30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf4
mov eax, dword [0x5eae84]
xor eax, esp
mov dword [esp + 0xf0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov ebx, eax
mov ecx, dword [esi + 0x14]
push edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
test ecx, ecx
je 0x406e96
mov edi, dword [esp + 0x14]
mov esi, eax
cmp eax, ecx
mov eax, dword [edi + 0x10]
cmova esi, ecx
add eax, dword [edi + 0xc]
push esi
sub eax, ecx
push eax
push edx
call sub.MSVCR110.dll_memcpy
mov eax, ebx
sub ebx, esi
add esp, 0xc
sub dword [edi + 0x14], esi
mov dword [esp + 0x1c], ebx
mov esi, edi
test ebx, ebx
je 0x407370
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 1
mov dword [esp + 0x80], 2
mov dword [esp + 0x84], 3
mov dword [esp + 0x88], 4
mov dword [esp + 0x8c], 5
mov dword [esp + 0x90], 6
mov dword [esp + 0x94], 7
mov dword [esp + 0x98], 0xfffffff8
mov dword [esp + 0x9c], 0xfffffff9
mov dword [esp + 0xa0], 0xfffffffa
mov dword [esp + 0xa4], 0xfffffffb
mov dword [esp + 0xa8], 0xfffffffc
mov dword [esp + 0xac], 0xfffffffd
mov dword [esp + 0xb0], 0xfffffffe
mov dword [esp + 0xb4], 0xffffffff
mov dword [esp + 0xb8], 0xe6
mov dword [esp + 0xbc], 0xe6
mov dword [esp + 0xc0], 0xe6
mov dword [esp + 0xc4], 0xe6
mov dword [esp + 0xc8], 0x133
mov dword [esp + 0xcc], 0x199
mov dword [esp + 0xd0], 0x200
mov dword [esp + 0xd4], 0x266
mov dword [esp + 0xd8], 0x300
mov dword [esp + 0xdc], 0x266
mov dword [esp + 0xe0], 0x200
mov dword [esp + 0xe4], 0x199
mov dword [esp + 0xe8], 0x133
mov dword [esp + 0xec], 0xe6
mov dword [esp + 0xf0], 0xe6
mov dword [esp + 0xf4], 0xe6
mov dword [esp + 0x40], 0x100
mov dword [esp + 0x44], 0x200
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0xc0
mov dword [esp + 0x50], 0xf0
mov dword [esp + 0x54], 0x1cc
mov dword [esp + 0x58], 0x188
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0xffffff00
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0x40
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0xffffff30
mov dword [esp + 0x74], 0xffffff18
jmp 0x407070
mov ecx, dword [esi + 8]
cmp ecx, dword [esi + 4]
jae 0x40736a
movzx eax, word [esi + 0x20]
mov edi, dword [esi]
mov ebx, dword [esi + 0xc]
add edi, ecx
mov dword [esp + 0xc], edi
lea ecx, [edi + eax]
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x4070dc
mov dl, byte [esi + 8]
test eax, eax
je 0x4070cb
sub edi, ecx
mov esi, eax
jmp 0x4070b0
movzx eax, dl
inc dl
mov al, byte [eax + str.:222]
xor al, byte [edi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
dec esi
jne 0x4070b0
mov esi, dword [esp + 0x14]
movzx eax, word [esi + 0x20]
mov edi, dword [esi + 0x28]
add eax, edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x24], eax
movzx edx, byte [esi + 0x26]
xor ecx, ecx
mov dword [esp + 0x28], edx
test edx, edx
jle 0x407100
lea ebx, [ebx]
mov al, byte [edi]
mov byte [esp + ecx*8 + 0x30], al
inc ecx
inc edi
cmp ecx, edx
jl 0x4070f0
mov dword [esp + 0xc], edi
xor ecx, ecx
test edx, edx
jle 0x40711a
mov ax, word [edi]
mov word [esp + ecx*8 + 0x32], ax
inc ecx
add edi, 2
cmp ecx, edx
jl 0x407106
mov dword [esp + 0xc], edi
lea eax, [esp + 0x34]
mov ecx, 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
jmp 0x407130
test edx, edx
jle 0x407155
mov ecx, eax
mov ax, word [edi]
add edi, 2
mov word [ecx], ax
lea ecx, [ecx + 8]
dec edx
jne 0x407136
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], edi
add eax, 2
dec ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
jne 0x407130
xor edi, edi
xor ecx, ecx
cmp byte [esi + 0x26], cl
jbe 0x407197
lea eax, [edi + 1]
and eax, 0x80000001
jns 0x40717b
dec eax
or eax, 0xfffffffe
inc eax
lea edx, [esp + 0x34]
lea edx, [edx + eax*2]
mov ax, word [edx]
mov word [ebx], ax
movzx eax, byte [esi + 0x26]
inc ecx
add ebx, 2
add edx, 8
cmp ecx, eax
jl 0x407182
movzx ecx, word [esi + 0x24]
test cx, cx
je 0x4071b0
movzx eax, byte [esi + 0x26]
neg eax
lea ebx, [ebx + eax*2]
lea eax, [ecx - 1]
mov word [esi + 0x24], ax
inc edi
cmp edi, 2
jl 0x407165
mov edi, dword [esp + 0xc]
cmp edi, dword [esp + 0x24]
jae 0x4072db
xor edx, edx
mov dword [esp + 0x10], edx
lea ebx, [ebx]
xor edi, edi
cmp byte [esi + 0x26], 0
jbe 0x4072a6
lea ecx, [edx + 1]
mov dword [esp + 0x18], ecx
mov eax, ecx
and eax, 0x80000001
jns 0x4071f1
dec eax
or eax, 0xfffffffe
inc eax
mov ecx, dword [esp + 0xc]
movzx esi, byte [esp + edi*8 + 0x30]
mov dl, byte [ecx]
shl al, 2
mov cl, al
movzx eax, word [esp + edi*8 + 0x34]
shr dl, cl
movsx ecx, word [esp + edi*8 + 0x36]
imul ecx, dword [esp + esi*4 + 0x5c]
cwde
imul eax, dword [esp + esi*4 + 0x40]
movsx esi, word [esp + edi*8 + 0x32]
and dl, 0xf
movzx edx, dl
add eax, ecx
mov ecx, dword [esp + edx*4 + 0x78]
imul ecx, esi
sar eax, 8
add eax, ecx
cmp eax, 0x7fff
jle 0x40723f
mov eax, 0x7fff
jmp 0x40724c
cmp eax, 0xffff8000
mov ecx, 0xffff8000
cmovl eax, ecx
movzx ecx, word [esp + edi*8 + 0x34]
mov word [ebx], ax
mov word [esp + edi*8 + 0x34], ax
mov eax, dword [esp + edx*4 + 0xb8]
imul eax, esi
sar eax, 8
add ebx, 2
mov word [esp + edi*8 + 0x36], cx
mov word [esp + edi*8 + 0x32], ax
cmp ax, 0x10
jge 0x407283
mov eax, 0x10
mov word [esp + edi*8 + 0x32], ax
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
movzx eax, byte [esi + 0x26]
inc edi
inc edx
inc ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
cmp edi, eax
jl 0x4071e3
movzx ecx, word [esi + 0x24]
test cx, cx
je 0x4072bf
movzx eax, byte [esi + 0x26]
neg eax
lea ebx, [ebx + eax*2]
lea eax, [ecx - 1]
mov word [esi + 0x24], ax
cmp edx, 2
jl 0x4071d0
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, dword [esp + 0x24]
jb 0x4071c4
movzx edi, word [esi + 0x20]
mov ecx, dword [esi + 0x1c]
add dword [esi + 8], edi
mov ebx, dword [esi + 0x10]
mov dword [esi + 0x14], ebx
cmp ecx, dword [esi + 0x18]
jbe 0x407329
mov eax, dword [esi + 8]
xor edx, edx
div edi
movzx edx, word [esi + 0x22]
imul eax, edx
cmp eax, ecx
jb 0x407329
sub eax, ecx
movzx ecx, byte [esi + 0x26]
imul eax, ecx
add eax, eax
mov ecx, ebx
sub ecx, eax
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], ecx
movzx ecx, word [esi + 0x22]
xor edx, edx
div ecx
imul eax, edi
mov word [esi + 0x24], dx
mov dword [esi + 8], eax
mov eax, dword [esi + 0x14]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
cmp esi, eax
cmova esi, eax
sub ebx, eax
add ebx, dword [edi + 0xc]
mov eax, dword [esp + 0x20]
push esi
push ebx
mov ebx, dword [esp + 0x24]
sub eax, ebx
add eax, dword [esp + 0x34]
push eax
call sub.MSVCR110.dll_memcpy
sub dword [edi + 0x14], esi
sub ebx, esi
add esp, 0xc
mov dword [esp + 0x1c], ebx
mov esi, edi
test ebx, ebx
jne 0x407070
mov eax, dword [esp + 0x20]
sub eax, ebx
mov ecx, dword [esp + 0xfc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057d22e
mov esp, ebp
pop ebp
ret