Function at 0x10037c80
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
push esi
push edi
lea edi, [ebp - 4]
mov ecx, edi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], edi
call edx
mov ebx, eax
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
mov dword [esp + 0x24], ebx
call edx
mov ecx, dword [ebp + 0x40]
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x40]
mov dword [esp + 0x1c], eax
test ecx, ecx
jbe 0x10037d1b
mov edx, dword [esp + 0x38]
cmp edx, ecx
lea edx, [esp + 0x38]
jb 0x10037ccd
mov edx, eax
mov esi, dword [edx]
test esi, esi
je 0x10037d05
mov eax, dword [edi + 0x40]
add eax, dword [edi + 0x3c]
mov edi, dword [esp + 0x34]
sub eax, ecx
mov ecx, dword [esp + 0x30]
push esi
push ecx
mov edx, edi
call fcn.10040ed0
mov eax, dword [esp + 0x24]
add dword [esp + 0x38], esi
sub dword [esp + 0x40], esi
add edi, esi
add esp, 8
sub dword [eax], esi
mov dword [esp + 0x34], edi
jmp 0x10037d1f
mov edi, dword [esp + 0x34]
add dword [esp + 0x30], esi
sub dword [esp + 0x38], esi
add edi, esi
sub dword [eax], esi
mov dword [esp + 0x34], edi
jmp 0x10037d1f
mov edi, dword [esp + 0x34]
cmp dword [esp + 0x38], 0
je 0x10037f0a
mov edx, dword [ebx]
mov eax, dword [edx + 4]
mov ecx, ebx
call eax
mov ecx, eax
cmp ecx, 1
je 0x10037d6a
test ecx, ecx
jbe 0x10037d54
lea edx, [ecx - 1]
test ecx, edx
jne 0x10037d54
mov eax, 1
cmp eax, ecx
sbb eax, eax
and eax, edx
and eax, edi
jmp 0x10037d5c
mov eax, edi
xor edx, edx
div ecx
mov eax, edx
neg eax
sbb eax, eax
inc eax
mov byte [esp + 0x13], 0
test eax, eax
je 0x10037d6f
mov byte [esp + 0x13], 1
cmp ecx, 1
je 0x10037da8
test ecx, ecx
jbe 0x10037d90
lea edx, [ecx - 1]
test ecx, edx
jne 0x10037d90
mov eax, 1
cmp eax, ecx
sbb eax, eax
and eax, edx
and eax, dword [esp + 0x30]
jmp 0x10037d9a
mov eax, dword [esp + 0x30]
xor edx, edx
div ecx
mov eax, edx
neg eax
sbb eax, eax
inc eax
mov byte [esp + 0x12], 0
test eax, eax
je 0x10037dad
mov byte [esp + 0x12], 1
mov edx, dword [ebx]
mov eax, dword [edx + 0x18]
mov ecx, ebx
call eax
test al, al
je 0x10037e09
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jb 0x10037e09
xor edx, edx
div ecx
mov edx, dword [ebx]
mov edx, dword [edx + 0x1c]
xor ecx, ecx
cmp byte [esp + 0x12], cl
setne cl
mov esi, eax
mov eax, dword [esp + 0x30]
push esi
push edi
push eax
movzx eax, byte [esp + 0x1f]
neg eax
sbb eax, eax
and eax, 2
or ecx, eax
push ecx
mov ecx, ebx
call edx
mov eax, esi
imul eax, dword [esp + 0x14]
add dword [esp + 0x30], eax
add edi, eax
sub dword [esp + 0x38], eax
mov dword [esp + 0x34], edi
mov edi, dword [ebp + 0x38]
xor edx, edx
mov eax, edi
div dword [esp + 0x14]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x38], edi
jb 0x10037ead
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx]
mov edx, dword [ebp + 0x3c]
mov eax, dword [eax + 0x14]
push ecx
push edx
mov ecx, ebx
call eax
mov eax, dword [ebp + 0x3c]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov esi, edi
test edi, edi
je 0x10037e93
cmp edi, 4
jb 0x10037e70
mov ebp, edi
shr ebp, 2
nop
mov ebx, dword [edx]
xor ebx, dword [eax]
add ecx, 4
mov dword [ecx - 4], ebx
add edx, 4
add eax, 4
sub esi, 4
sub ebp, 1
jne 0x10037e50
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x18]
test esi, esi
jbe 0x10037e93
mov ebp, ecx
sub edx, eax
sub ebp, eax
lea ebx, [ebx]
mov cl, byte [edx + eax]
xor cl, byte [eax]
inc eax
sub esi, 1
mov byte [eax + ebp - 1], cl
jne 0x10037e80
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
add dword [esp + 0x34], edi
add dword [esp + 0x30], edi
sub eax, edi
mov dword [esp + 0x38], eax
cmp eax, edi
jae 0x10037e22
cmp dword [esp + 0x38], 0
jbe 0x10037f0a
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x3c]
call fcn.10032c30
mov esi, eax
xor edx, edx
div dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov ebp, dword [ebx]
mov edx, dword [ebp + 0x14]
add esp, 4
mov ecx, ebx
push eax
mov eax, dword [edi + 0x40]
add eax, dword [edi + 0x3c]
sub eax, esi
push eax
call edx
mov eax, dword [edi + 0x40]
mov ebx, dword [esp + 0x38]
add eax, dword [edi + 0x3c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push ebx
sub eax, esi
push ecx
call fcn.10040ed0
mov edx, dword [esp + 0x24]
add esp, 8
sub esi, ebx
mov dword [edx], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc