Function at 0x107e1cc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
mov edi, dword [esi + 0x30]
cmp dword [edi + 0x64], 0
je 0x107e217
mov eax, dword [edi]
mov ecx, dword [edi + 0x54]
mov edx, dword [edi + 0x50]
push 0
push eax
push ecx
push edx
call fcn.01082a0c
xor ebx, ebx
add eax, dword [edi + 0x60]
adc edx, ebx
cmp dword [esi + 0x110], eax
jne 0x107e217
cmp dword [esi + 0x114], edx
jne 0x107e217
mov ecx, dword [ebp + 8]
mov dword [ecx], 0xffffffff
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x48]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
shr edx, 1
xor ebx, ebx
add edx, eax
adc ebx, ecx
mov dword [ebp - 0x14], ecx
mov ecx, edx
mov dword [ebp - 4], ebx
mov ebx, dword [esi + 0xf8]
add ecx, ebx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 4]
mov edx, 0
adc ecx, edx
add eax, ebx
adc edx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ebx
shld edx, eax, 1
add eax, eax
cmp edx, ecx
ja 0x107e265
jb 0x107e25e
cmp eax, dword [ebp - 0x20]
jae 0x107e265
mov ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x107e272
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
mov edx, ecx
mov dword [ebp - 0x18], eax
mov ecx, eax
mov eax, dword [esi + 0x114]
mov ebx, dword [esi + 0x110]
cmp eax, edx
jb 0x107e29c
ja 0x107e288
cmp ebx, ecx
jbe 0x107e29c
mov eax, dword [ebp + 8]
mov edx, ebx
sub edx, ecx
add edx, dword [ebp - 0xc]
mov dword [eax], edx
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x154]
mov ebx, dword [esi + 0x150]
cmp ecx, eax
jb 0x107e2c2
ja 0x107e2b6
cmp ebx, dword [esi + 0x110]
jbe 0x107e2c2
mov dword [esi + 0x110], ebx
mov dword [esi + 0x114], ecx
mov eax, dword [esi + 0x114]
mov ecx, dword [esi + 0x110]
cmp edx, eax
ja 0x107e2e1
jb 0x107e2d9
cmp dword [ebp - 0x18], ecx
jae 0x107e2e1
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
mov edx, eax
mov ecx, dword [edi]
add dword [ebp - 0x18], ecx
adc edx, 0
mov dword [ebp - 0x14], edx
cmp eax, edx
ja 0x107e454
jb 0x107e305
mov edx, dword [ebp - 0x18]
cmp dword [esi + 0x110], edx
jae 0x107e454
cmp dword [edi + 0x64], 0
je 0x107e33e
mov eax, dword [edi]
mov ecx, dword [edi + 0x54]
mov edx, dword [edi + 0x50]
push 0
push eax
push ecx
push edx
call fcn.01082a0c
xor ebx, ebx
add eax, dword [edi + 0x60]
adc edx, ebx
cmp dword [esi + 0x114], edx
ja 0x107e454
jb 0x107e33e
cmp dword [esi + 0x110], eax
jae 0x107e454
mov eax, dword [esi + 0x110]
mov edx, dword [esi + 0x114]
mov ecx, dword [edi + 0x30]
call fcn.01082a4c
mov edi, dword [edi + 0x34]
and edi, dword [esi + 0x110]
mov ebx, eax
push edx
push ebx
mov ecx, esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], edi
call fcn.0107b2ec
add esp, 8
test eax, eax
jne 0x107e4a7
mov edi, dword [esi + 0x30]
mov edx, dword [ebp - 0x1c]
cmp ebx, dword [edi + 0x50]
jne 0x107e38f
cmp edx, dword [edi + 0x54]
jne 0x107e38f
mov eax, dword [edi + 0x60]
jmp 0x107e391
mov eax, dword [edi]
mov ecx, dword [esi + 0x98]
cmp eax, ecx
jge 0x107e3ad
mov eax, dword [edi]
push 0
add ebx, 1
push eax
adc edx, 0
push edx
push ebx
jmp 0x107e427
mov edx, dword [ebp - 0x1c]
sub eax, ecx
mov ecx, dword [edi]
push edx
mov ebx, eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push ecx
call fcn.01082a0c
mov edi, eax
mov dword [ebp - 0xc], edx
lea esp, [esp]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x98]
mov eax, dword [edx + 0x1c]
push ecx
add eax, ebx
call fcn.0107849c
mov ecx, dword [esi + 0xbc]
mov dword [ebp - 0xc], eax
shr eax, cl
mov ecx, dword [esi + 0xc0]
and ecx, dword [ebp - 0xc]
lea edx, [edi + ebx + 1]
xor eax, ecx
mov ecx, dword [esi + 0xb4]
mov dword [ecx + eax*4], edx
sub ebx, dword [esi + 0x9c]
add esp, 4
cmp ebx, dword [ebp - 4]
jge 0x107e3cc
mov edi, dword [esi + 0x30]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [edi]
push 0
add eax, 1
push edx
adc ecx, 0
push ecx
push eax
call fcn.01082a0c
mov dword [esi + 0x110], eax
mov eax, edx
mov dword [esi + 0x114], edx
cmp eax, dword [ebp - 0x14]
jb 0x107e305
ja 0x107e454
mov ecx, dword [esi + 0x110]
cmp ecx, dword [ebp - 0x18]
jb 0x107e305
mov edi, dword [esi + 0x30]
cmp dword [edi + 0x64], 0
je 0x107e4b9
mov edx, dword [edi]
mov eax, dword [edi + 0x54]
mov ecx, dword [edi + 0x50]
push 0
push edx
push eax
push ecx
call fcn.01082a0c
mov ecx, dword [edi + 0x60]
xor edi, edi
add eax, ecx
adc edx, edi
cmp dword [esi + 0x114], edx
jb 0x107e4b9
ja 0x107e48a
cmp dword [esi + 0x110], eax
jb 0x107e4b9
mov dword [esi + 0x114], edx
mov edx, dword [ebp + 8]
mov dword [esi + 0x110], eax
mov dword [edx], 0xffffffff
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xffffbad3
jne 0x107e4d3
mov eax, 0xffffbad2
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x110]
sub eax, dword [ebp - 0x18]
mov ecx, dword [esi + 0xf8]
lea edx, [eax + ecx + 1]
mov eax, dword [ebp + 8]
mov dword [eax], edx
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret