Function at 0x61b407
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
and dword [esp + 0xc], 0
cmp dword [esi + 0x48], 0
push ebx
mov ebx, dword [ebp + 8]
push edi
mov dword [esp + 0x10], ebx
je 0x61b42e
mov dword [esp + 8], 2
jmp 0x61b43a
mov eax, dword [esi + 0x10]
xor edx, edx
div dword [esi + 8]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov edx, eax
or edx, ecx
je 0x61b46a
sub eax, dword [esi + 0x40]
sbb ecx, dword [esi + 0x44]
xor edx, edx
cmp edx, ecx
jb 0x61b46a
ja 0x61b459
cmp dword [ebp + 0xc], eax
jbe 0x61b46a
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x61b46a
mov eax, 0x80000000
jmp 0x61b759
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 8]
cmp edi, ecx
je 0x61b4aa
jbe 0x61b49c
push 4
pop eax
cmp edi, eax
jbe 0x61b480
mov eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div ecx
push eax
call fcn.005ff90d
mov dword [ebp + 8], eax
test eax, eax
je 0x61b759
mov ebx, dword [ebp + 8]
mov eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div dword [esi + 0xc]
mov dword [ebp + 0xc], eax
cmp dword [esi + 0x48], 0
je 0x61b595
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
cmp dword [esi + 0x70], 0
jg 0x61b54b
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0xa0]
sub ecx, eax
push ecx
mov ecx, dword [esi + 0x58]
add ecx, eax
push ecx
push dword [esi]
call fcn.00603127
add dword [esi + 0x5c], eax
mov eax, dword [esi + 0x5c]
cmp eax, dword [esi + 0xa0]
jae 0x61b4ff
push dword [esi]
call fcn.0060377b
test eax, eax
je 0x61b58c
push 0x20
jmp 0x61b501
push 4
cmp dword [esi + 0x70], 0
pop eax
je 0x61b50b
or eax, 0x10
push eax
lea eax, [esi + 0x4c]
push eax
push dword [esi + 0x48]
call dword [0x7b3cd0]
test eax, eax
jne 0x61b584
mov ecx, dword [esi + 0x60]
test ecx, ecx
jne 0x61b529
cmp dword [esi + 0x70], ecx
je 0x61b584
sub dword [esi + 0x5c], ecx
mov edx, dword [esi + 0x5c]
je 0x61b542
mov eax, dword [esi + 0x58]
push edx
add ecx, eax
push ecx
push eax
call dword [0x7b3d38]
add esp, 0xc
mov eax, dword [esi + 0x68]
mov dword [esi + 0xa4], eax
mov ebx, dword [esi + 0x70]
cmp dword [esp + 0xc], ebx
jae 0x61b558
mov ebx, dword [esp + 0xc]
push ebx
push dword [esi + 0xa4]
push dword [ebp + 8]
call fcn.00624d4e
sub dword [esi + 0x70], ebx
add dword [esi + 0xa4], ebx
add dword [ebp + 8], ebx
add esp, 0xc
sub dword [esp + 0xc], ebx
mov ebx, dword [ebp + 8]
je 0x61b58c
jmp 0x61b4bb
mov dword [esp + 0x14], 0x80000000
mov eax, dword [esp + 0xc]
sub dword [ebp + 0xc], eax
jmp 0x61b609
mov edi, dword [esi + 0xac]
test edi, edi
je 0x61b5af
push edi
push dword [esi + 0xa8]
push ebx
call fcn.00624d4e
add esp, 0xc
mov eax, dword [ebp + 0xc]
sub eax, edi
push eax
lea eax, [edi + ebx]
push eax
push dword [esi]
call fcn.00603127
mov ecx, dword [esi + 0x10]
add eax, edi
xor edx, edx
mov dword [ebp + 0xc], eax
div ecx
mov dword [esi + 0xac], edx
test edx, edx
je 0x61b609
cmp dword [esi + 0xa8], 0
jne 0x61b5eb
push ecx
call fcn.005ff90d
mov dword [esi + 0xa8], eax
mov eax, dword [esi + 0xac]
sub dword [ebp + 0xc], eax
push eax
mov eax, dword [ebp + 0xc]
add eax, ebx
push eax
push dword [esi + 0xa8]
call fcn.00624d4e
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x61b73a
push 3
pop edi
cmp dword [esp + 8], edi
jne 0x61b658
mov eax, dword [ebp + 0xc]
xor edx, edx
mov ecx, edi
div ecx
mov ecx, eax
imul ecx, ecx, 3
add ecx, ebx
shl eax, 2
lea edx, [eax + ebx]
mov dword [ebp + 0xc], eax
sub ecx, edi
mov eax, dword [ecx]
and eax, 0xffffff
cmp dword [esi + 0x20], 1
je 0x61b647
shl eax, 8
sub edx, 4
mov dword [edx], eax
cmp edx, ebx
jne 0x61b635
mov dword [esp + 8], 4
cmp dword [esp + 8], 1
jne 0x61b673
cmp dword [esi + 0x20], 0
je 0x61b68e
mov ecx, dword [ebp + 0xc]
mov eax, ebx
xor byte [eax], 0x80
inc eax
dec ecx
jne 0x61b66a
jmp 0x61b68e
cmp dword [esi + 0x20], 1
jne 0x61b68e
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [esp + 8]
push dword [esp + 8]
push eax
push ebx
push ebx
call fcn.0061b378
cmp dword [esi + 4], edi
jne 0x61b6e4
cmp dword [esp + 8], 8
jne 0x61b6c0
cmp dword [esi + 0xc], 4
mov edx, dword [esp + 0x10]
je 0x61b6a6
mov edx, ebx
mov ecx, dword [ebp + 0xc]
shr ecx, 3
xor eax, eax
test ecx, ecx
je 0x61b6bd
fld qword [ebx + eax*8]
fstp dword [edx + eax*4]
inc eax
cmp eax, ecx
jb 0x61b6b2
shr dword [ebp + 0xc], 1
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x61b73a
push eax
mov eax, dword [ebp + 0xc]
shr eax, 2
push eax
push dword [esp + 0x18]
push ebx
call fcn.0061b198
mov ecx, edi
sub ecx, dword [esi + 0xc]
shr dword [ebp + 0xc], cl
jmp 0x61b73a
cmp dword [esi + 0xc], 4
jne 0x61b711
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [esp + 8]
push dword [esp + 8]
mov edi, eax
push edi
push dword [esp + 0x18]
push dword [esp + 0x1c]
call fcn.0061b0a8
mov eax, edi
shl eax, 2
mov dword [ebp + 0xc], eax
jmp 0x61b73a
cmp dword [esp + 8], 4
jne 0x61b73a
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x10]
shr eax, 2
lea edi, [eax + eax]
lea ecx, [ebx + 2]
mov dword [ebp + 0xc], edi
mov di, word [ecx]
mov word [edx], di
add edx, 2
add ecx, 4
dec eax
jne 0x61b72b
mov eax, dword [esp + 8]
cmp eax, dword [esi + 0xc]
jbe 0x61b749
push ebx
call fcn.005ff97a
mov ecx, dword [ebp + 0xc]
add dword [esi + 0x40], ecx
mov eax, dword [esp + 0x14]
adc dword [esi + 0x44], 0
or eax, ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8