Function at 0x40d1d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98
mov eax, dword [0x72b228]
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x40d1ef
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 0x72b228
call fcn.005a3005
mov eax, dword [0x72b184]
mov edx, dword [eax]
push 0x712eb0
push eax
call dword [edx + 0x1c]
mov edx, dword [0x72b1b0]
mov eax, dword [0x72b180]
mov ecx, dword [eax]
push 0x712a60
push 2
push edx
push eax
call dword [ecx + 0x14]
mov eax, dword [0x712e8c]
mov ecx, dword [0x712e88]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
jmp 0x40d241
mov eax, dword [esp + 0x14]
mov ebx, eax
imul ebx, ebx, 0xe0
mov ebp, eax
shl ebp, 7
mov ecx, dword [ebp + 0x6f3270]
add ebx, 0x7123f8
lea edx, [ebp + 0x6f3270]
mov dword [ebx], eax
xor eax, eax
xor esi, esi
cmp ecx, 8
mov dword [esp + 0x10], ebp
je 0x40d2d3
mov ebp, edx
mov edi, edx
lea edx, [esp + 0x2a]
sub ebp, edx
lea esp, [esp]
mov dl, byte [ecx*4 + 0x6f3620]
mov edi, dword [edi + 4]
mov byte [esp + eax*8 + 0x2c], dl
mov dl, byte [edi*4 + 0x6f3640]
mov byte [esp + eax*8 + 0x2e], dl
mov dl, byte [edi + 0x6f3664]
mov byte [esp + eax*8 + 0x2f], dl
mov edx, dword [ecx*4 + 0x6f3670]
mov word [esp + eax*8 + 0x2a], si
add esi, edx
mov word [esp + eax*8 + 0x28], 0
mov byte [esp + eax*8 + 0x2d], 0
inc eax
lea edi, [ebp + eax*8]
mov ecx, dword [esp + edi + 0x2a]
cmp ecx, 8
lea edi, [esp + edi + 0x2a]
jne 0x40d280
mov ebp, dword [esp + 0x10]
lea edx, [ebx + 4]
push edx
mov word [esp + eax*8 + 0x2c], 0xff
mov word [esp + eax*8 + 0x2e], 0
mov byte [esp + eax*8 + 0x30], 0x11
mov byte [esp + eax*8 + 0x31], 0
mov byte [esp + eax*8 + 0x32], 0
mov byte [esp + eax*8 + 0x33], 0
mov eax, dword [0x72b184]
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
push edx
push eax
call dword [ecx + 0x158]
push 1
lea eax, [ebp + 0x6f3690]
push 1
push eax
mov dword [ebx + 8], esi
call fcn.0056fe00
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40d32f
mov edi, dword [esi + 4]
test edi, edi
jge 0x40d331
xor edi, edi
lea ecx, [edi + 1]
push ecx
call fcn.0059e170
mov ebp, eax
push edi
mov ecx, ebp
mov eax, esi
mov dword [esp + 0x18], ebp
call fcn.0056ff80
add esp, 8
test esi, esi
je 0x40d398
mov eax, dword [esi + 0x1c]
test eax, eax
jle 0x40d361
mov dword [esi + 0x14], 1
jmp 0x40d398
mov eax, dword [esi + 4]
test eax, eax
jl 0x40d389
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40d374
dec dword [eax + 8]
jmp 0x40d382
mov edx, dword [esi + 0xc]
push 0x64
push edx
call fcn.0062f880
add esp, 8
mov dword [esi + 4], 0xffffffff
mov eax, dword [0x7294dc]
push esi
push eax
call fcn.00599a60
add esp, 8
xor eax, eax
test edi, edi
jle 0x40d3a9
mov edi, edi
xor byte [eax + ebp], 0xaa
inc eax
cmp eax, edi
jl 0x40d3a0
mov eax, dword [esp + 0x10]
mov byte [edi + ebp], 0
mov edx, dword [0x72b228]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [0x72b184]
lea ebp, [ebx + 0x18]
push ebp
push edx
push 0
push 0
push 0
push edi
push eax
push ecx
call fcn.005a314f
mov eax, dword [0x6f90e8]
xor esi, esi
cmp eax, esi
mov dword [ebx + 0x10], esi
mov dword [esp + 0x10], esi
jle 0x40d550
jmp 0x40d3f0
mov eax, dword [ebp]
mov edx, dword [eax]
push esi
push eax
call dword [edx + 0x30]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40d550
mov eax, dword [esp + 0x14]
cmp eax, 2
je 0x40d414
cmp eax, 3
jne 0x40d448
mov ecx, dword [esp + 0x1c]
cmp ecx, 0x1039
jne 0x40d42b
cmp esi, 3
jl 0x40d509
jmp 0x40d44c
cmp ecx, 0x8086
jne 0x40d44c
cmp dword [esp + 0x18], 0x2572
jne 0x40d44c
cmp esi, 3
jl 0x40d509
jmp 0x40d44c
mov ecx, dword [esp + 0x1c]
cmp eax, 1
jne 0x40d481
cmp ecx, 0x10de
jne 0x40d4a8
mov eax, dword [esp + 0x18]
cmp eax, 0x153
jbe 0x40d472
cmp eax, 0x170
jb 0x40d4a8
cmp eax, 0x1f0
ja 0x40d4a8
test esi, esi
jle 0x40d4a8
cmp esi, 3
jl 0x40d509
jmp 0x40d4a8
cmp eax, 5
je 0x40d48b
cmp eax, 6
jne 0x40d4a8
cmp ecx, 0x102b
jne 0x40d497
test esi, esi
je 0x40d509
cmp eax, 6
jne 0x40d4a8
cmp ecx, 0x1039
jne 0x40d4a8
test esi, esi
je 0x40d509
mov esi, 0x6f3a10
lea edi, [ebx + 0x1c]
mov eax, dword [ebp]
mov ecx, dword [eax]
push esi
push 0
push eax
call dword [ecx + 0x24]
mov dword [edi], eax
add esi, 0x40
add edi, 4
cmp esi, 0x6f45d0
jl 0x40d4b0
mov ecx, dword [ebx + 0xc8]
mov eax, dword [ebp]
mov edx, dword [eax]
push 5
push ecx
push eax
call dword [edx + 0x68]
mov ecx, dword [ebx + 0xcc]
mov eax, dword [ebp]
mov edx, dword [eax]
push 6
push ecx
push eax
call dword [edx + 0x68]
mov eax, dword [ebp]
mov esi, dword [esp + 0x20]
mov edx, dword [eax]
push esi
push eax
call dword [edx + 0xf4]
test eax, eax
je 0x40d51d
mov esi, dword [esp + 0x10]
mov eax, dword [0x6f90e8]
inc esi
cmp esi, eax
mov dword [esp + 0x10], esi
jl 0x40d3f0
jmp 0x40d550
mov eax, dword [ebp]
mov edi, dword [esp + 0x10]
push esi
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0xec]
test edi, edi
jle 0x40d544
mov dword [0x72b22c], 1
jmp 0x40d550
jne 0x40d550
mov dword [0x72b230], 1
xor esi, esi
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebp]
mov edx, dword [eax]
push esi
push ecx
push eax
call dword [edx + 0x38]
test eax, eax
je 0x40d56a
inc esi
cmp esi, 0x10
jl 0x40d552
mov eax, dword [ebx + 0x10]
test eax, eax
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x14], esi
je 0x40d592
mov edx, dword [eax*4 + 0x6f45d0]
mov ecx, dword [eax*4 + 0x6f45ec]
mov dword [ebx + 0xd8], edx
mov dword [ebx + 0xdc], ecx
inc eax
cmp eax, 6
mov dword [esp + 0x14], eax
jle 0x40d23d
call fcn.0040d5b0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret