Function at 0x406fd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov eax, dword [esp + 0xa8]
mov esi, dword [esp + 0x64]
mov ecx, dword [esi + 0x48]
mov ebx, dword [ecx + 4]
mov dword [esp + 0x4c], ebx
test eax, eax
je 0x407002
cmp dword [ecx + 0x34], 0
jne 0x407002
mov dword [esi + 0x1c], 3
jmp 0x40752a
mov dword [esp], ecx
movzx ecx, word [esp + 0x74]
movzx edx, word [esp + 0x6c]
movzx ecx, cx
movzx ebp, word [esp + 0x7c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x48], edx
add ecx, edx
add ecx, ebp
mov edi, dword [esp + 0xb4]
xor edx, edx
add ecx, edi
setb dl
add ecx, ebx
adc edx, 0
add ecx, 0x2e
adc edx, 0
cmp ecx, 0xffffffff
sbb edx, 0
jb 0x407050
mov dword [esi + 0x1c], 0xf
jmp 0x40752a
mov dword [esp + 0x38], ebp
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0x8c]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x40], ecx
mov dword [esp + 0xe], 0
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov word [esp + 0x2e], 0
mov dword [esp + 0xa], 0x2014b50
movzx esi, word [esp + 0x94]
mov ebx, dword [esp + 0x90]
movzx ecx, word [esp + 0x74]
add ecx, edi
mov dword [esp + 0x44], ecx
xor ecx, ecx
mov edx, 0
mov edi, esi
test si, si
je 0x4070e3
mov dl, 0x14
mov byte [esp + 0x10], dl
movzx edx, word [esp + 0x98]
mov byte [esp + 0x12], dl
mov byte [esp + 0x13], dh
mov edx, edi
mov byte [esp + 0x14], dl
mov byte [esp + 0x15], dh
movzx edx, word [esp + 0x9c]
mov byte [esp + 0x16], dl
mov byte [esp + 0x17], dh
movzx edx, word [esp + 0xa0]
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], dh
mov byte [esp + 0x1a], bl
mov byte [esp + 0x1b], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x1c], dl
shr ebx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x1d], bl
or edx, dword [esp + 0x88]
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x20], bl
shr edx, 0x18
neg dword [esp + 0x40]
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x21], dl
or ebx, dword [esp + 0x80]
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x24], dl
shr ebx, 0x18
mov byte [esp + 0x25], bl
movzx edx, word [esp + 0x6c]
mov byte [esp + 0x26], dl
mov byte [esp + 0x27], dh
mov edx, dword [esp + 0x44]
mov byte [esp + 0x28], dl
mov byte [esp + 0x29], dh
movzx edx, word [esp + 0x7c]
mov byte [esp + 0x2a], dl
mov byte [esp + 0x2b], dh
mov ebx, dword [esp + 0xac]
mov byte [esp + 0x30], bl
mov byte [esp + 0x31], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x32], dl
shr ebx, 0x18
neg eax
sbb ecx, ecx
mov byte [esp + 0x33], bl
or ecx, dword [esp + 0xa4]
mov byte [esp + 0x34], cl
mov byte [esp + 0x35], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x36], al
shr ecx, 0x18
mov byte [esp + 0x37], cl
mov ebx, dword [esp + 4]
lea esi, [ebx + 0x2e]
mov edx, dword [esp]
mov eax, dword [edx + 8]
cmp eax, esi
mov edi, dword [esp + 0x48]
jae 0x40723e
cmp eax, 1
adc eax, 0
cmp esi, 2
jb 0x407242
mov ebx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
or ecx, 2
and ebx, 2
imul ecx, ebx
and eax, 0xfffffffd
xor ebx, 2
imul ebx, eax
add ebx, ecx
mov eax, ebx
cmp ebx, esi
jb 0x407220
jmp 0x407244
mov eax, dword [edx]
jmp 0x40726c
mov ebx, eax
push ebx
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x4074f7
mov dword [edx], eax
mov dword [edx + 8], ebx
mov ebx, dword [esp + 4]
mov dword [edx + 4], esi
mov ecx, dword [edx + 0xc]
imul edx, ecx, 0x2e
imul ecx, ebx
add ecx, eax
lea eax, [esp + 0xa]
push edx
push eax
push ecx
call fcn.004096e0
mov edx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [edx + 4]
mov eax, dword [edx + 8]
lea ebp, [esi + edi]
cmp eax, ebp
jae 0x4072ce
cmp eax, 1
adc eax, 0
cmp ebp, 2
jb 0x4072d2
mov ebx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
or ecx, 2
and ebx, 2
imul ecx, ebx
and eax, 0xfffffffd
xor ebx, 2
imul ebx, eax
add ebx, ecx
mov eax, ebx
cmp ebx, ebp
jb 0x4072b0
jmp 0x4072d4
mov ebx, eax
jmp 0x4072f8
mov ebx, eax
push ebx
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x4074f7
mov dword [edx], eax
mov dword [edx + 8], ebx
mov dword [edx + 4], ebp
cmp word [esp + 0x6c], 0
je 0x407326
mov eax, dword [edx + 0xc]
imul esi, eax
add esi, dword [edx]
imul edi, eax
push edi
push dword [esp + 0x6c]
push esi
call fcn.004096e0
mov edx, dword [esp + 0xc]
add esp, 0xc
mov ebp, dword [edx + 4]
mov ebx, dword [edx + 8]
mov eax, dword [esp + 0x3c]
lea edi, [eax + ebp]
cmp ebx, edi
jae 0x40735e
cmp ebx, 1
adc ebx, 0
cmp edi, 2
jb 0x407362
mov esi, ebx
nop
nop
mov eax, ebx
or eax, 2
and esi, 2
imul eax, esi
and ebx, 0xfffffffd
xor esi, 2
imul esi, ebx
add esi, eax
mov ebx, esi
cmp esi, edi
jb 0x407340
jmp 0x407364
mov esi, ebx
jmp 0x407388
mov esi, ebx
push esi
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x4074f7
mov dword [edx], eax
mov dword [edx + 8], esi
movzx eax, word [esp + 0x74]
mov dword [edx + 4], edi
test ax, ax
je 0x4073bc
mov eax, dword [edx + 0xc]
imul ebp, eax
add ebp, dword [edx]
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x74]
push ebp
call fcn.004096e0
mov edx, dword [esp + 0xc]
add esp, 0xc
mov edi, dword [edx + 4]
mov esi, dword [edx + 8]
mov eax, dword [esp + 0xb4]
lea ebp, [edi + eax]
cmp esi, ebp
jae 0x4073fe
cmp esi, 1
adc esi, 0
cmp ebp, 2
jb 0x407402
mov ebx, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, esi
or eax, 2
and ebx, 2
imul eax, ebx
and esi, 0xfffffffd
xor ebx, 2
imul ebx, esi
add ebx, eax
mov esi, ebx
cmp ebx, ebp
jb 0x4073e0
jmp 0x407404
mov ebx, esi
jmp 0x407428
mov ebx, esi
push ebx
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x4074f7
mov dword [edx], eax
mov dword [edx + 8], ebx
mov dword [edx + 4], ebp
mov ecx, dword [esp + 0xb4]
test ecx, ecx
je 0x40745c
mov eax, dword [edx + 0xc]
imul edi, eax
add edi, dword [edx]
imul ecx, eax
push ecx
push dword [esp + 0xb4]
push edi
call fcn.004096e0
mov edx, dword [esp + 0xc]
add esp, 0xc
mov ebp, dword [edx + 4]
mov ebx, dword [edx + 8]
mov eax, dword [esp + 0x38]
lea esi, [eax + ebp]
cmp ebx, esi
jae 0x407481
mov ecx, dword [esp + 0x64]
mov edx, dword [esp]
push 1
push esi
call fcn.00409600
mov edx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x4074f7
mov dword [edx + 4], esi
cmp word [esp + 0x7c], 0
je 0x4074ad
mov eax, dword [edx + 0xc]
imul ebp, eax
add ebp, dword [edx]
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x7c]
push ebp
call fcn.004096e0
mov edx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [edx + 0x14]
lea edi, [esi + 1]
cmp dword [edx + 0x18], edi
jae 0x4074d5
mov eax, dword [esp]
lea edx, [eax + 0x10]
mov ecx, dword [esp + 0x64]
push 1
push edi
call fcn.00409600
mov edx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x4074f7
mov dword [edx + 0x14], edi
mov eax, dword [edx + 0x1c]
imul esi, eax
add esi, dword [edx + 0x10]
lea ecx, [esp + 0x4c]
push eax
push ecx
push esi
call fcn.004096e0
add esp, 0xc
mov eax, 1
jmp 0x40752c
mov ebx, dword [esp + 4]
cmp dword [edx + 8], ebx
mov edi, dword [esp + 0x64]
jae 0x407520
push ebx
push dword [edx + 0xc]
push dword [edx]
push dword [edi + 0x34]
mov esi, edx
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x407523
mov dword [esi], eax
mov dword [esi + 8], ebx
mov edx, esi
mov dword [edx + 4], ebx
mov dword [edi + 0x1c], 0x10
xor eax, eax
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret