Function at 0x40d980
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push esi
mov esi, dword [esp + 0x1c]
push esi
call fcn.00404040
add esp, 4
test eax, eax
jne 0x40d99a
pop esi
add esp, 0x14
ret
mov eax, dword [0x41ee68]
mov ecx, dword [eax + 0x1d4]
push ebx
push ecx
push 1
call fcn.004033b0
mov edx, dword [0x41ee68]
mov eax, dword [edx + 0x1d8]
push eax
call fcn.00403300
mov ecx, dword [0x41ee68]
mov edx, dword [ecx + 0x1dc]
push edx
push esi
call fcn.00403ba0
mov eax, dword [0x41ee68]
mov ecx, dword [eax + 0x1e0]
mov edx, dword [eax + 0x138]
push ecx
push edx
call fcn.00403ba0
mov ecx, dword [0x41ee68]
mov eax, dword [ecx + 0x1dc]
mov esi, dword [eax + 4]
mov eax, dword [eax]
add esp, 0x1c
mov edx, 0x80000000
test eax, eax
jne 0x40da0c
xor ebx, ebx
jmp 0x40da27
mov ebx, eax
mov eax, dword [esi + eax*4 - 4]
shl ebx, 5
test eax, eax
js 0x40da27
lea esp, [esp]
shr edx, 1
dec ebx
test edx, eax
je 0x40da20
mov edx, dword [ecx + 0x15c]
inc edx
mov dword [esp + 8], ebx
mov dword [esp + 0x14], edx
cmp ebx, 1
je 0x40dd64
push ebp
push edi
jmp 0x40da47
mov edx, dword [esp + 0x1c]
mov esi, ebx
sub esi, edx
jns 0x40da9f
mov edi, dword [ecx + 0x1e0]
mov eax, dword [ecx + 0x1dc]
mov dword [ecx + 0x1dc], edi
mov ecx, dword [0x41ee68]
mov dword [ecx + 0x1e0], eax
mov eax, dword [0x41ee68]
mov ecx, dword [eax + 0x1d4]
mov edi, dword [eax + 0x1d8]
mov dword [eax + 0x1d4], edi
mov eax, dword [0x41ee68]
mov dword [esp + 0x1c], ebx
mov ebx, edx
mov dword [eax + 0x1d8], ecx
mov ecx, dword [0x41ee68]
neg esi
mov dword [esp + 0x10], ebx
mov eax, esi
cdq
and edx, 0x1f
lea ebp, [edx + eax]
sar ebp, 5
mov eax, esi
and eax, 0x8000001f
mov dword [esp + 0x20], ebp
jns 0x40dabd
dec eax
or eax, 0xffffffe0
inc eax
mov edx, dword [ecx + 0x1dc]
mov dword [esp + 0x14], eax
cmp ebx, 0x20
jge 0x40db25
mov ecx, dword [ecx + 0x1e0]
mov ecx, dword [ecx + 4]
mov esi, dword [ecx]
mov edx, dword [edx + 4]
mov ecx, eax
shl esi, cl
dec ebx
lea ecx, [ebx - 1]
mov dword [esp + 0x10], ebx
xor dword [edx], esi
and ecx, 0x8000001f
jns 0x40daf5
dec ecx
or ecx, 0xffffffe0
inc ecx
mov edx, 1
shl edx, cl
mov ecx, dword [0x41ee68]
mov esi, dword [ecx + 0x1dc]
mov esi, dword [esi + 4]
mov esi, dword [esi]
test edx, esi
jne 0x40dc67
shr edx, 1
dec ebx
test edx, esi
je 0x40db15
mov dword [esp + 0x10], ebx
jmp 0x40dc67
mov edi, dword [edx]
test eax, eax
jne 0x40db72
mov edx, ebp
cmp ebp, edi
jge 0x40dbf9
jmp 0x40db40
mov esi, dword [ecx + 0x1dc]
mov ecx, dword [ecx + 0x1e0]
mov ecx, dword [ecx + 4]
mov esi, dword [esi + 4]
mov ecx, dword [ecx + eax]
xor dword [esi + edx*4], ecx
mov ecx, dword [0x41ee68]
lea esi, [esi + edx*4]
inc edx
add eax, 4
cmp edx, edi
jl 0x40db40
mov eax, dword [esp + 0x14]
jmp 0x40dbf9
mov ecx, dword [ecx + 0x1e0]
mov ecx, dword [ecx + 4]
mov esi, dword [ecx]
mov edx, dword [edx + 4]
mov ecx, eax
shl esi, cl
lea edx, [edx + ebp*4]
xor dword [edx], esi
lea edx, [ebp + 1]
cmp edx, edi
jge 0x40dbf3
mov esi, edx
sub esi, ebp
mov ecx, 0x20
sub ecx, eax
add esi, esi
mov dword [esp + 0x18], ecx
add esi, esi
jmp 0x40dbb4
mov ecx, dword [esp + 0x18]
mov eax, dword [0x41ee68]
mov ebx, dword [eax + 0x1e0]
mov ebx, dword [ebx + 4]
mov ebp, dword [ebx + esi - 4]
mov ebx, dword [ebx + esi]
mov eax, dword [eax + 0x1dc]
mov eax, dword [eax + 4]
shr ebp, cl
mov ecx, dword [esp + 0x14]
shl ebx, cl
lea eax, [eax + edx*4]
inc edx
add esi, 4
or ebp, ebx
xor dword [eax], ebp
cmp edx, edi
jl 0x40dbb0
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x20]
mov eax, ecx
mov ecx, dword [0x41ee68]
mov ecx, dword [ecx + 0x1dc]
mov esi, dword [ecx + 4]
cmp dword [esi + edi*4 - 4], 0
mov dword [esp + 0x20], ecx
lea ecx, [esi + edi*4 - 4]
jne 0x40dc2a
sub ecx, 4
dec edi
cmp dword [ecx], 0
je 0x40dc11
mov ebx, edi
shl ebx, 5
mov edx, 0x80000000
mov dword [esp + 0x10], ebx
jmp 0x40dc46
dec ebx
lea ecx, [ebx - 1]
and ecx, 0x8000001f
mov dword [esp + 0x10], ebx
jns 0x40dc3f
dec ecx
or ecx, 0xffffffe0
inc ecx
mov edx, 1
shl edx, cl
mov ecx, dword [esi + edi*4 - 4]
test edx, ecx
jne 0x40dc5b
mov edi, edi
shr edx, 1
dec ebx
test edx, ecx
je 0x40dc50
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x20]
mov dword [ecx], edi
mov ecx, dword [0x41ee68]
mov edi, dword [ecx + 0x1d8]
mov edx, dword [edi]
lea esi, [edx + ebp + 1]
mov edx, dword [ecx + 0x1d4]
mov edx, dword [edx]
cmp edx, esi
jle 0x40dc81
mov esi, edx
test eax, eax
jne 0x40dcbc
mov eax, ebp
cmp ebp, esi
jge 0x40dd34
xor edi, edi
mov edx, dword [ecx + 0x1d4]
mov ecx, dword [ecx + 0x1d8]
mov ecx, dword [ecx + 4]
mov edx, dword [edx + 4]
mov ecx, dword [ecx + edi]
xor dword [edx + eax*4], ecx
mov ecx, dword [0x41ee68]
lea edx, [edx + eax*4]
inc eax
add edi, 4
cmp eax, esi
jl 0x40dc91
jmp 0x40dd34
mov edx, dword [ecx + 0x1d4]
mov ecx, dword [edx + 4]
lea edx, [ecx + ebp*4]
mov ecx, dword [edi + 4]
mov edi, dword [ecx]
mov ecx, eax
shl edi, cl
xor dword [edx], edi
lea edx, [ebp + 1]
cmp edx, esi
jge 0x40dd2e
mov edi, edx
sub edi, ebp
mov ecx, 0x20
sub ecx, eax
add edi, edi
mov dword [esp + 0x18], ecx
add edi, edi
jmp 0x40dcf4
mov ecx, dword [esp + 0x18]
mov ebx, dword [0x41ee68]
mov eax, dword [ebx + 0x1d8]
mov eax, dword [eax + 4]
mov ebp, dword [eax + edi - 4]
mov eax, dword [eax + edi]
mov ebx, dword [ebx + 0x1d4]
mov ebx, dword [ebx + 4]
shr ebp, cl
mov ecx, dword [esp + 0x14]
shl eax, cl
lea ebx, [ebx + edx*4]
inc edx
add edi, 4
or ebp, eax
xor dword [ebx], ebp
cmp edx, esi
jl 0x40dcf0
mov ebx, dword [esp + 0x10]
mov ecx, dword [0x41ee68]
mov ecx, dword [ecx + 0x1d4]
mov edx, dword [ecx + 4]
cmp dword [edx + esi*4 - 4], 0
lea eax, [edx + esi*4 - 4]
jne 0x40dd51
sub eax, 4
dec esi
cmp dword [eax], 0
je 0x40dd48
mov dword [ecx], esi
mov ecx, dword [0x41ee68]
cmp ebx, 1
jne 0x40da43
pop edi
pop ebp
mov eax, dword [esp + 0x24]
mov ecx, dword [ecx + 0x1d4]
push eax
push ecx
call fcn.00403ba0
add esp, 8
pop ebx
mov eax, 1
pop esi
add esp, 0x14
ret