Function at 0x437f76
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov edx, dword [esp + 0x44]
movzx eax, word [esp + 0x40]
mov ecx, dword [0x4c1074]
xor ecx, esp
mov dword [esp + 0x20], ecx
test edx, edx
je 0x437fa1
mov dword [esp + 0xc], edx
movzx ecx, word [esp + 0x48]
jmp 0x437faf
lea ecx, [esp + 0x17]
mov dword [esp + 0xc], ecx
mov byte [ecx], 0
xor ecx, ecx
inc ecx
mov dword [esp], ecx
mov esi, dword [esp + 0x3c]
movsx edi, ax
xor ecx, ecx
mov eax, ecx
cwd
idiv di
movsx eax, dx
movzx ebp, byte [esi + eax]
shl ebp, 0x18
mov eax, dword [esp + 0x38]
xor ebp, dword [eax + ecx + 0x1000]
mov eax, dword [esp + 0x38]
mov dword [eax + ecx + 0x1000], ebp
lea eax, [ecx + 1]
cdq
idiv edi
movzx ebx, byte [esi + edx]
shl ebx, 0x10
xor ebx, ebp
mov eax, dword [esp + 0x38]
mov dword [eax + ecx + 0x1000], ebx
lea eax, [ecx + 2]
cdq
idiv edi
movzx ebp, byte [esi + edx]
shl ebp, 8
xor ebp, ebx
mov eax, dword [esp + 0x38]
mov dword [eax + ecx + 0x1000], ebp
lea eax, [ecx + 3]
cdq
idiv edi
movzx eax, byte [esi + edx]
xor eax, ebp
mov ebp, dword [esp + 0x38]
mov dword [ebp + ecx + 0x1000], eax
add ecx, 4
cmp ecx, 0x48
jne 0x437fbb
xor eax, eax
lea ecx, [esp + 0x18]
mov dword [ecx + 4], eax
mov dword [ecx], eax
movsx ecx, word [esp]
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ebp, dword [esp + 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
xor ebx, ebx
xor edi, edi
mov esi, dword [esp + 0x10]
mov eax, dword [esp]
add eax, edi
cdq
idiv esi
movzx eax, byte [ebp + edx]
mov ecx, ebx
not cl
and cl, 0x18
shl eax, cl
mov ecx, edi
and ecx, 0xfffffffc
xor dword [esp + ecx + 0x18], eax
inc edi
add ebx, 8
cmp edi, 8
jne 0x43805d
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x38]
push esi
lea eax, [esp + 0x1c]
push eax
call fcn.00437bdc
add esp, 8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 4]
lea ecx, [edx*4]
mov dword [esi + edx*4 + 0x1000], eax
mov eax, dword [esp + 0x1c]
or ecx, 4
mov dword [esi + ecx + 0x1000], eax
lea ecx, [edx + 2]
mov eax, dword [esp]
add eax, edi
cmp edx, 0x10
jb 0x43804e
add dword [esp], edi
xor eax, eax
mov ebp, dword [esp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [esp]
mov dword [esp + 4], eax
xor ebx, ebx
xor esi, esi
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 4]
add eax, esi
cdq
idiv ebp
movzx eax, byte [edi + edx]
mov ecx, ebx
not cl
and cl, 0x18
shl eax, cl
mov ecx, esi
and ecx, 0xfffffffc
xor dword [esp + ecx + 0x18], eax
inc esi
add ebx, 8
cmp esi, 8
jne 0x4380f0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
push edi
lea eax, [esp + 0x1c]
push eax
call fcn.00437bdc
add esp, 8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
lea ecx, [edx*4]
mov dword [edi + edx*4], eax
mov eax, dword [esp + 0x1c]
or ecx, 4
mov dword [edi + ecx], eax
lea eax, [edx + 2]
mov ecx, dword [esp + 4]
add ecx, esi
mov dword [esp], ecx
cmp edx, 0xfe
jb 0x4380dd
add dword [esp + 4], esi
xor eax, eax
mov ebp, dword [esp + 0x10]
mov dword [esp], eax
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
xor ebx, ebx
xor esi, esi
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 8]
add eax, esi
cdq
idiv ebp
movzx eax, byte [edi + edx]
mov ecx, ebx
not cl
and cl, 0x18
shl eax, cl
mov ecx, esi
and ecx, 0xfffffffc
xor dword [esp + ecx + 0x18], eax
inc esi
add ebx, 8
cmp esi, 8
jne 0x438183
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
push edi
lea eax, [esp + 0x1c]
push eax
call fcn.00437bdc
add esp, 8
mov eax, dword [esp + 0x18]
mov edx, dword [esp]
lea ecx, [edx*4]
mov dword [edi + edx*4 + 0x400], eax
mov eax, dword [esp + 0x1c]
or ecx, 4
mov dword [edi + ecx + 0x400], eax
lea eax, [edx + 2]
mov ecx, dword [esp + 8]
add ecx, esi
mov dword [esp + 4], ecx
cmp edx, 0xfe
jb 0x438170
add dword [esp + 8], esi
xor ecx, ecx
mov ebp, dword [esp + 0xc]
mov dword [esp + 4], ecx
mov eax, dword [esp + 8]
mov dword [esp], eax
xor ebx, ebx
xor edi, edi
mov esi, dword [esp + 0x10]
mov eax, dword [esp]
add eax, edi
cdq
idiv esi
movzx eax, byte [ebp + edx]
mov ecx, ebx
not cl
and cl, 0x18
shl eax, cl
mov ecx, edi
and ecx, 0xfffffffc
xor dword [esp + ecx + 0x18], eax
inc edi
add ebx, 8
cmp edi, 8
jne 0x43821e
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x38]
push ebx
lea eax, [esp + 0x1c]
push eax
call fcn.00437bdc
add esp, 8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 4]
lea ecx, [edx*4]
mov dword [ebx + edx*4 + 0x800], eax
mov eax, dword [esp + 0x1c]
or ecx, 4
mov dword [ebx + ecx + 0x800], eax
lea eax, [edx + 2]
mov esi, dword [esp]
lea ecx, [esi + edi]
mov dword [esp + 8], ecx
cmp edx, 0xfe
mov ecx, eax
jb 0x43820b
mov eax, esi
add eax, edi
xor ecx, ecx
mov ebp, dword [esp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
xor ebx, ebx
xor edi, edi
mov esi, dword [esp + 0x10]
mov eax, dword [esp]
add eax, edi
cdq
idiv esi
movzx eax, byte [ebp + edx]
mov ecx, ebx
not cl
and cl, 0x18
shl eax, cl
mov ecx, edi
and ecx, 0xfffffffc
xor dword [esp + ecx + 0x18], eax
inc edi
add ebx, 8
cmp edi, 8
jne 0x4382b8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x38]
push ebx
lea eax, [esp + 0x1c]
push eax
call fcn.00437bdc
add esp, 8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 4]
lea ecx, [edx*4]
mov dword [ebx + edx*4 + 0xc00], eax
mov eax, dword [esp + 0x1c]
or ecx, 4
mov dword [ebx + ecx + 0xc00], eax
lea ecx, [edx + 2]
mov esi, dword [esp]
add esi, edi
cmp edx, 0xfe
mov eax, esi
jb 0x4382a9
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00475526
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret