Function at 0x437520
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
add ecx, esi
sub ecx, dword [esp + 0x4c]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x20], ecx
cmp ecx, esi
jbe 0x43789b
mov ebp, dword [esp + 0x50]
xor edx, edx
mov dword [esp + 4], 0
mov dword [esp + 0x10], 0
jmp 0x4375b5
mov edx, dword [esp + 8]
mov edi, edx
mov ecx, dword [esp + 4]
sub edi, ecx
cmp edx, dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
je 0x4376e9
mov dword [ecx + edi], esi
add edx, 4
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x4c]
add esi, ecx
dec esi
inc esi
cmp esi, dword [esp + 0x20]
jae 0x43789b
test ebp, ebp
mov dword [esp + 8], edx
je 0x43761c
movzx ecx, byte [ebp]
mov byte [esp + 0x18], 0xff
lea eax, [esp + 0x19]
mov byte [eax + 4], 0
mov dword [eax], 0
mov edx, 0xda709020
mov ebx, 0xdf
nop
nop
movzx eax, byte [esp + edx + 0x258f6ff8]
mov edi, ebx
xor edi, edx
and edi, eax
xor edi, edx
add edi, 0xbbcd2f5f
mov eax, edi
and eax, 1
xor edi, 1
lea eax, [edi + eax*2]
mov byte [esp + edx + 0x258f6ff8], al
inc edx
dec ebx
cmp edx, 0xda709026
jne 0x4375e0
cmp cl, byte [esp + 0x18]
mov edx, dword [esp + 8]
je 0x43762b
movzx eax, byte [esi]
mov ecx, dword [esp + 0x48]
cmp al, byte [ecx]
jne 0x4376e0
cmp dword [esp + 0x4c], 2
jb 0x437580
mov ecx, 1
mov dword [esp + 0x24], esi
jmp 0x43766c
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x48]
cmp al, byte [edx + ecx]
jne 0x437796
inc ecx
cmp ecx, dword [esp + 0x4c]
je 0x437580
test ebp, ebp
je 0x437650
mov esi, ebp
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x14], 0xfd
lea eax, [esp + 0x15]
mov byte [eax + 2], 0
mov word [eax], 0
mov ebx, 0xcb
mov edi, 0x34
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebp, byte [esp + ebx - 0xb7]
mov eax, edi
xor eax, ebx
and eax, ebp
xor eax, ebx
add al, 9
mov byte [esp + ebx - 0xb7], al
inc ebx
dec edi
cmp ebx, 0xcf
jne 0x4376a0
cmp dl, byte [esp + 0x14]
mov ebp, esi
mov esi, dword [esp + 0x24]
jne 0x437650
jmp 0x437661
mov eax, dword [esp + 0x3c]
jmp 0x4375aa
mov ecx, edi
sar ecx, 2
lea eax, [ecx + 1]
mov ebx, ecx
shr ebx, 1
add ebx, ecx
cmp ebx, eax
ja 0x4376fd
mov ebx, eax
mov eax, ebx
and eax, 0xfffffffb
mov ecx, ebx
and ecx, 4
mov edx, ebx
or edx, 4
imul edx, ecx
xor ecx, 4
imul ecx, eax
add edx, ecx
push edx
call fcn.004081b0
add esp, 4
mov ecx, eax
mov eax, dword [esp + 4]
test eax, eax
mov dword [esp], ecx
je 0x437874
mov dword [esp + 0x10], ebx
cmp ecx, eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc], edi
jbe 0x4377a6
cmp eax, ecx
jbe 0x4377a6
test edi, edi
je 0x43785d
mov ebx, dword [esp + 0xc]
lea ecx, [ebx - 0x420eadad]
mov eax, dword [esp]
add eax, ecx
add eax, 0x420eadac
mov edx, dword [esp + 4]
add ecx, edx
add ecx, 0x420eadac
mov edi, ebx
and edi, 7
je 0x4377f8
neg edi
xor edx, edx
nop
nop
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x437780
add ecx, edx
add eax, edx
add edx, dword [esp + 0xc]
jmp 0x4377fa
add esi, ecx
dec esi
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 8]
jmp 0x4375aa
mov eax, edi
mov edi, ecx
mov ecx, eax
shr ecx, 2
mov ebx, dword [esp + 4]
mov eax, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, dword [esp + 0xc]
mov edx, ecx
and edx, 0xfffffffc
mov eax, dword [esp]
add eax, edx
add edx, ebx
shr ecx, 1
and ecx, 1
mov ebx, edx
mov dword [esp + 8], eax
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test byte [esp + 0xc], 1
je 0x43785d
mov ecx, dword [esp + 0xc]
and ecx, 2
movzx edx, byte [edx + ecx]
mov eax, dword [esp + 8]
mov byte [eax + ecx], dl
jmp 0x43785d
mov edx, ebx
mov edi, dword [esp + 4]
sub edi, dword [esp + 8]
cmp edi, 0xfffffff8
ja 0x43785d
neg edx
xor edi, edi
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edi]
mov byte [eax + edi], bl
movzx ebx, byte [ecx + edi - 1]
mov byte [eax + edi - 1], bl
movzx ebx, byte [ecx + edi - 2]
mov byte [eax + edi - 2], bl
movzx ebx, byte [ecx + edi - 3]
mov byte [eax + edi - 3], bl
movzx ebx, byte [ecx + edi - 4]
mov byte [eax + edi - 4], bl
movzx ebx, byte [ecx + edi - 5]
mov byte [eax + edi - 5], bl
movzx ebx, byte [ecx + edi - 6]
mov byte [eax + edi - 6], bl
movzx ebx, byte [ecx + edi - 7]
mov byte [eax + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x437810
push dword [esp + 4]
call fcn.004081c0
add esp, 4
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp]
mov eax, dword [esp + 0x3c]
mov dword [eax], ecx
mov ecx, dword [esp]
lea ecx, [ecx + ebx*4]
mov edx, dword [esp]
add edx, edi
mov dword [esp + 0x10], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
jmp 0x43759a
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret