Function at 0x402732
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x3b0]
sub esp, 0x430
mov eax, dword [0x417010]
xor eax, ebp
mov dword [ebp + 0x3ac], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x10]
push edi
xor ebx, ebx
xor edi, edi
cmp dword [eax + 0x10], ebx
jle 0x402798
mov ecx, esi
call fcn.004022e1
test eax, eax
je 0x40277e
mov ecx, esi
call fcn.004023a2
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 4]
xor eax, ebx
mov dword [ecx + edi*8 + 4], eax
jmp 0x402788
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 4]
mov dword [eax + edi*8 + 4], ebx
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 4]
mov ebx, dword [ecx + edi*8 + 4]
inc edi
cmp edi, dword [eax + 0x10]
jl 0x40275e
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
push 8
or eax, edx
lea edi, [esi + 0x6e]
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 0x10]
xor ecx, ecx
cmp dword [eax + 0x10], ecx
jle 0x4027e0
mov eax, dword [eax + 4]
cmp dword [eax + ecx*8 + 4], 0x10
jg 0x40287f
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*8 + 4]
lea eax, [esi + eax*2 + 0x6e]
inc word [eax]
mov eax, dword [esi + 0x10]
inc ecx
cmp ecx, dword [eax + 0x10]
jl 0x4027b8
push dword [esi + 0x10]
mov ecx, esi
call fcn.004018af
push dword [esi + 0x10]
mov ecx, esi
call fcn.00401b3c
mov dword [ebp - 0x7c], eax
test eax, eax
js 0x40287f
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jle 0x402821
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
or eax, edx
shr ecx, 1
lea edi, [ebp - 0x74]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, esi
call fcn.004022e1
mov ecx, dword [esi + 0xc]
xor ebx, ebx
cmp dword [ecx + 0x10], ebx
jle 0x4028ce
mov ecx, esi
test eax, eax
je 0x402886
call fcn.004023a2
mov dword [ebp - 0x80], eax
cmp eax, 0x1ff
ja 0x40287f
lea edi, [eax + ebx]
cmp edi, 0x210
jg 0x40287f
test eax, eax
jle 0x402879
lea ebx, [ebp + ebx*2 - 0x74]
mov dword [ebp - 0x78], eax
push dword [ebp - 0x7c]
mov ecx, esi
push dword [esi + 0x10]
call fcn.004026fe
mov word [ebx], ax
add ebx, 2
dec dword [ebp - 0x78]
jne 0x402861
mov ebx, edi
xor eax, eax
jmp 0x4028c2
xor eax, eax
jmp 0x4029eb
call fcn.004023a2
mov dword [ebp - 0x78], eax
test eax, eax
js 0x40287f
mov ecx, dword [ebp - 0x80]
lea eax, [ecx + ebx]
cmp eax, 0x210
jg 0x40287f
test ecx, ecx
jle 0x4028bc
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
or eax, edx
shr ecx, 1
lea edi, [ebp + ebx*2 - 0x74]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
add ebx, dword [ebp - 0x78]
xor eax, eax
inc eax
mov ecx, dword [esi + 0xc]
cmp ebx, dword [ecx + 0x10]
jl 0x402836
mov ecx, dword [esi + 0xc]
xor edx, edx
xor eax, eax
cmp dword [ecx + 0x10], edx
jle 0x4028fb
mov ecx, dword [ecx + 4]
movzx edi, word [ebp + eax*2 - 0x74]
xor edi, edx
mov dword [ecx + eax*8 + 4], edi
mov ecx, dword [esi + 0xc]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax*8 + 4]
mov edi, dword [esi + 0xc]
inc eax
cmp eax, dword [edi + 0x10]
jl 0x4028dd
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
push 8
or eax, edx
pop ecx
lea edi, [esi + 0x6e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp dword [eax + 0x10], ecx
jle 0x402943
mov eax, dword [eax + 4]
cmp dword [eax + ecx*8 + 4], 0x10
jg 0x40287f
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*8 + 4]
lea eax, [esi + eax*2 + 0x6e]
inc word [eax]
mov eax, dword [esi + 0xc]
inc ecx
cmp ecx, dword [eax + 0x10]
jl 0x40291b
push dword [esi + 0xc]
mov ecx, esi
call fcn.004018af
mov eax, dword [esi + 8]
xor ebx, ebx
xor edi, edi
cmp dword [eax + 0x10], ebx
jle 0x402996
mov ecx, esi
call fcn.004022e1
test eax, eax
je 0x402983
mov ecx, esi
call fcn.004023a2
mov ecx, dword [esi + 8]
mov ecx, dword [ecx + 4]
xor eax, ebx
mov dword [ecx + edi*8 + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 4]
mov ebx, dword [eax + edi*8 + 4]
jmp 0x40298d
mov eax, dword [esi + 8]
mov eax, dword [eax + 4]
mov dword [eax + edi*8 + 4], ebx
mov eax, dword [esi + 8]
inc edi
cmp edi, dword [eax + 0x10]
jl 0x402959
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
push 8
or eax, edx
pop ecx
lea edi, [esi + 0x6e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 8]
xor ecx, ecx
cmp dword [eax + 0x10], ecx
jle 0x4029de
mov eax, dword [eax + 4]
cmp dword [eax + ecx*8 + 4], 0x10
jg 0x40287f
mov eax, dword [esi + 8]
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*8 + 4]
lea eax, [esi + eax*2 + 0x6e]
inc word [eax]
mov eax, dword [esi + 8]
inc ecx
cmp ecx, dword [eax + 0x10]
jl 0x4029b6
push dword [esi + 8]
mov ecx, esi
call fcn.004018af
xor eax, eax
inc eax
mov ecx, dword [ebp + 0x3ac]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405d65
add ebp, 0x3b0
leave
ret