Function at 0x437020
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [eax + ecx], 0
lea ecx, [ecx + 2]
jne 0x437040
add ecx, 0xfffffffe
and ecx, 0xfffe
mov word [esp + 0x28], cx
add ecx, 2
mov word [esp + 0x2a], cx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], 0x62656467
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov byte [esp + 0x1c], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 0xc
ja 0x4370de
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x10]
mov edx, 0xee
sub edx, eax
add eax, 0x9c90311
xor edx, eax
and edx, ecx
xor edx, eax
mov dword [esp + 8], edx
mov eax, dword [esp + 8]
add al, 0x89
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0xd
jb 0x4370a0
mov ebx, dword [esp + 0x10]
mov eax, dword [0x44132c]
test eax, eax
je 0x43713e
xor ecx, ecx
mov edx, dword [0x441330]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edx + ecx*8], 0xd07a397f
je 0x437110
inc ecx
cmp eax, ecx
jne 0x437100
jmp 0x43713e
mov eax, dword [edx + ecx*8 + 4]
cmp eax, ebx
je 0x43713e
lea ecx, [esp + 0x24]
lea edx, [esp + 0x28]
push ecx
push 0
push 0
push 2
push edx
push dword [ebp + 8]
push 6
push dword [0x441334]
push eax
call fcn.00433920
add esp, 0x24
mov ebx, eax
mov dword [esp + 0x10], 0xd310113b
mov dword [esp + 0x14], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 7
ja 0x43719e
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x10]
mov edx, 0x7c
sub edx, eax
add eax, 0x1a433f83
xor edx, eax
and edx, ecx
xor edx, eax
mov dword [esp + 8], edx
mov eax, dword [esp + 8]
add al, 0x6b
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 8
jb 0x437160
cmp ebx, dword [esp + 0x10]
jne 0x437316
push dword [esp + 0x24]
call fcn.00431ff0
add esp, 4
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], 0x62656467
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov byte [esp + 0x1c], 0
mov dword [esp + 4], 0
mov ecx, dword [esp + 4]
cmp ecx, 0xc
ja 0x437230
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 4]
mov edx, dword [esp + 4]
movzx edx, byte [esp + edx + 0x10]
mov edi, 0xee
sub edi, ecx
add ecx, 0x9c90311
xor edi, ecx
and edi, edx
xor edi, ecx
mov dword [esp + 8], edi
mov ecx, dword [esp + 8]
add cl, 0x89
mov edx, dword [esp + 4]
mov byte [esp + edx + 0x10], cl
inc dword [esp + 4]
mov ecx, dword [esp + 4]
cmp ecx, 0xd
jb 0x4371f0
mov ebx, dword [esp + 0x10]
mov ecx, dword [0x44132c]
test ecx, ecx
je 0x43728f
xor edx, edx
mov edi, dword [0x441330]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + edx*8], 0xd07a397f
je 0x437260
inc edx
cmp ecx, edx
jne 0x437250
jmp 0x43728f
mov ecx, dword [edi + edx*8 + 4]
cmp ecx, ebx
je 0x43728f
lea edx, [esp + 0x24]
lea edi, [esp + 0x28]
push edx
push eax
push dword [esp + 0x14]
push 2
push edi
push dword [ebp + 8]
push 6
push dword [0x441334]
push ecx
call fcn.00433920
add esp, 0x24
mov ebx, eax
test ebx, ebx
mov edx, dword [ebp + 0x18]
mov edi, dword [esp + 0xc]
js 0x43730d
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4372a6
mov eax, dword [edi + 4]
mov dword [ecx], eax
test edx, edx
je 0x43730d
mov eax, esi
test esi, esi
je 0x437308
mov eax, dword [edx]
mov ecx, dword [edi + 8]
cmp eax, ecx
jb 0x4372bb
mov eax, ecx
lea edx, [edi + 0xc]
mov ecx, eax
shr ecx, 2
mov edi, esi
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov ecx, eax
and ecx, 0xfffffffc
add esi, ecx
mov edx, dword [esp + 0xc]
add edx, ecx
add edx, 0xc
mov ecx, eax
shr ecx, 1
and ecx, 1
mov dword [esp + 0x30], edx
mov edi, esi
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edi, dword [esp + 0xc]
test al, 1
mov edx, dword [ebp + 0x18]
je 0x437308
and eax, 2
mov ecx, dword [esp + 0x30]
movzx ecx, byte [ecx + eax]
mov byte [esi + eax], cl
mov eax, dword [edi + 8]
mov dword [edx], eax
push edi
call fcn.00432090
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret