Function at 0x40a2b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov ecx, dword [edx + 4]
mov ebx, dword [eax]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov edx, ecx
sub edx, ebx
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp dl, 2
je 0x40a5ee
cmp dl, 3
mov eax, ebx
je 0x40a6ff
cmp dl, 4
jne 0x40a4dc
test edx, edx
je 0x40a4c0
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
cmp edi, esi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x4c], esi
je 0x40a4dc
cmp edx, 1
jbe 0x40a4a3
lea ebx, [ebp - 0x24]
mov edx, dword [eax + 0xc]
mov edi, dword [eax + 0x10]
cmp edx, edi
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x50], edi
je 0x40a474
mov edx, ecx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 2
jbe 0x40a45c
mov edx, dword [eax + 0x1c]
mov edi, dword [eax + 0x18]
cmp edi, edx
mov dword [ebp - 0x48], edx
je 0x40a440
mov edx, ecx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 3
jbe 0x40a420
mov esi, dword [eax + 0x24]
mov eax, dword [eax + 0x28]
cmp esi, eax
mov dword [ebp - 0x3c], eax
je 0x40a3f6
mov eax, dword [ebp - 0x24]
mov ecx, ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call fcn.00417180
mov eax, dword [ebp - 0x40]
sub esp, 4
mov ecx, ebx
mov dword [esp], eax
call fcn.00417180
sub esp, 4
mov ecx, ebx
mov dword [esp], edi
call fcn.00417180
sub esp, 4
mov ecx, ebx
mov dword [esp], esi
call fcn.00417180
sub esp, 4
lea ecx, [ebp - 0x30]
mov dword [esp], ebx
call fcn.00416400
sub esp, 4
add esi, 4
cmp dword [ebp - 0x3c], esi
jne 0x40a3a0
add edi, 4
cmp dword [ebp - 0x48], edi
je 0x40a440
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [edx + 4]
mov dword [ebp - 0x3c], edx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 3
ja 0x40a393
mov dword [esp + 8], edx
mov dword [esp + 4], 3
mov dword [esp], 0x41a488
call fcn.0040e888
nop
lea esi, [esi]
add dword [ebp - 0x40], 4
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x50], eax
je 0x40a474
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [edx + 4]
jmp 0x40a356
mov dword [esp + 8], edx
mov dword [esp + 4], 2
mov dword [esp], 0x41a488
call fcn.0040e888
add dword [ebp - 0x44], 4
mov eax, dword [ebp - 0x44]
cmp dword [ebp - 0x4c], eax
je 0x40a4dc
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 4]
mov eax, dword [eax]
mov edx, ecx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 1
ja 0x40a342
jmp 0x40a4a8
mov edx, 1
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], 0x41a488
call fcn.0040e888
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x41a488
call fcn.0040e888
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
mov edi, dword [eax + 4]
cmp esi, edi
je 0x40a4ff
mov ebx, esi
mov eax, dword [ebx]
test eax, eax
je 0x40a4f8
mov dword [esp], eax
call sub.libstdc_6.dll_operator_delete_void_
add ebx, 0xc
cmp edi, ebx
jne 0x40a4ea
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x2c]
mov dword [eax + 4], esi
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x44], edx
cmp edx, eax
mov dword [ebp - 0x40], eax
je 0x40a593
mov eax, dword [ebp - 0x40]
xor ecx, ecx
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], eax
sub eax, esi
sar eax, 2
mov edx, eax
sub eax, 1
mov dword [ebp - 0x4c], eax
xor eax, eax
cmp eax, dword [ebp - 0x4c]
mov edi, edx
je 0x40a57b
lea edx, [eax + 1]
mov ebx, edi
cmp edi, edx
mov dword [ebp - 0x48], edx
jbe 0x40a573
cmp edi, eax
jbe 0x40a5da
mov edi, dword [esi + edx*4 - 4]
mov dword [ebp - 0x3c], ebx
mov eax, edi
sub eax, dword [esi + edx*4]
mov ebx, eax
sar ebx, 0x1f
xor eax, ebx
sub eax, ebx
cmp ecx, eax
cmovb ecx, eax
add edx, 1
cmp dword [ebp - 0x3c], edx
jne 0x40a553
mov eax, dword [ebp - 0x3c]
mov edi, eax
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x4c]
jne 0x40a538
mov eax, dword [ebp - 0x54]
cmp dword [eax + 8], ecx
jae 0x40a83f
add dword [ebp - 0x40], 0xc
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x44], eax
jne 0x40a515
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40a5a2
mov dword [esp], eax
call sub.libstdc_6.dll_operator_delete_void_
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
cmp ebx, esi
je 0x40a5c4
mov eax, dword [esi]
test eax, eax
je 0x40a5ba
mov dword [esp], eax
call sub.libstdc_6.dll_operator_delete_void_
add esi, 0xc
cmp ebx, esi
jne 0x40a5ac
mov ebx, dword [ebp - 0x30]
test ebx, ebx
je 0x40a5d0
mov dword [esp], ebx
call sub.libstdc_6.dll_operator_delete_void_
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], 0x41a488
call fcn.0040e888
test edx, edx
je 0x40a69c
mov eax, dword [ebx + 4]
mov edi, dword [ebx]
cmp edi, eax
mov dword [ebp - 0x40], eax
je 0x40a4dc
cmp edx, 1
jbe 0x40a67f
lea esi, [ebp - 0x24]
mov eax, dword [ebx + 0x10]
mov ebx, dword [ebx + 0xc]
cmp ebx, eax
mov dword [ebp - 0x3c], eax
je 0x40a656
nop
lea esi, [esi]
mov eax, dword [ebp - 0x24]
mov dword [esp], edi
mov ecx, esi
mov dword [ebp - 0x20], eax
call fcn.00417180
sub esp, 4
mov ecx, esi
mov dword [esp], ebx
call fcn.00417180
sub esp, 4
lea ecx, [ebp - 0x30]
mov dword [esp], esi
call fcn.00416400
sub esp, 4
add ebx, 4
cmp dword [ebp - 0x3c], ebx
jne 0x40a620
add edi, 4
cmp dword [ebp - 0x40], edi
je 0x40a4dc
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], eax
sub eax, ebx
sar eax, 2
imul eax, eax, 0xaaaaaaab
cmp eax, 1
ja 0x40a60e
jmp 0x40a684
mov eax, 1
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0x41a488
call fcn.0040e888
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x41a488
call fcn.0040e888
mov edi, eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40a6c9
mov dword [esp], eax
call sub.libstdc_6.dll_operator_delete_void_
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
cmp ebx, esi
je 0x40a6eb
mov eax, dword [esi]
test eax, eax
je 0x40a6e1
mov dword [esp], eax
call sub.libstdc_6.dll_operator_delete_void_
add esi, 0xc
cmp ebx, esi
jne 0x40a6d3
mov ebx, dword [ebp - 0x30]
test ebx, ebx
je 0x40a6f7
mov dword [esp], ebx
call sub.libstdc_6.dll_operator_delete_void_
mov dword [esp], edi
call sub.libgcc_s_dw2_1.dll__Unwind_Resume
test edx, edx
je 0x40a823
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
cmp edi, esi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x48], esi
je 0x40a4dc
cmp edx, 1
jbe 0x40a855
lea esi, [ebp - 0x24]
mov edx, dword [eax + 0x10]
mov edi, dword [eax + 0xc]
cmp edi, edx
mov dword [ebp - 0x44], edx
je 0x40a7f0
mov edx, ecx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 2
jbe 0x40a7d0
mov ebx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
cmp ebx, eax
mov dword [ebp - 0x3c], eax
je 0x40a7a6
lea esi, [esi]
mov eax, dword [ebp - 0x24]
mov ecx, esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.00417180
sub esp, 4
mov ecx, esi
mov dword [esp], edi
call fcn.00417180
sub esp, 4
mov ecx, esi
mov dword [esp], ebx
call fcn.00417180
sub esp, 4
lea ecx, [ebp - 0x30]
mov dword [esp], esi
call fcn.00416400
sub esp, 4
add ebx, 4
cmp dword [ebp - 0x3c], ebx
jne 0x40a760
add edi, 4
cmp dword [ebp - 0x44], edi
je 0x40a7f0
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [edx + 4]
mov dword [ebp - 0x3c], edx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 2
ja 0x40a74d
mov dword [esp + 8], edx
mov dword [esp + 4], 2
mov dword [esp], 0x41a488
call fcn.0040e888
nop
lea esi, [esi]
add dword [ebp - 0x40], 4
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x48], eax
je 0x40a4dc
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 4]
mov eax, dword [eax]
mov edx, ecx
sub edx, eax
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, 1
ja 0x40a726
jmp 0x40a85a
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x41a488
call fcn.0040e888
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00416400
sub esp, 4
jmp 0x40a587
mov edx, 1
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], 0x41a488
call fcn.0040e888
lea esi, [esi]
lea edi, [edi]