Function at 0x40ef80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [esp + 4], ebx
push esi
push edi
test edx, edx
jne 0x40efa5
mov eax, 0xffffff9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [edx + 0xe0]
test esi, esi
je 0x40ef99
cmp dword [esi], ebx
jne 0x40efbf
mov eax, 0xffffff9c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x40efcf
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
xor eax, eax
mov dword [esi + 0x14], ecx
cmp eax, dword [esi + 0x84]
jb 0x40effd
ja 0x40efec
cmp ecx, dword [esi + 0x80]
jbe 0x40effd
cmp dword [esi + 0xc8], eax
jne 0x40effd
mov eax, dword [esi + 0x80]
mov dword [esi + 0x14], eax
mov edi, dword [esi + 8]
xor eax, eax
mov edx, edi
add edx, dword [esi + 0x78]
adc eax, dword [esi + 0x7c]
cmp ebx, eax
jb 0x40f024
ja 0x40f014
cmp ecx, edx
jbe 0x40f024
cmp dword [esi + 0xc8], ebx
je 0x40f024
mov eax, dword [esi + 0x78]
add eax, edi
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], ebx
jbe 0x40f27b
nop dword [eax]
cmp dword [esi + 8], 0
jne 0x40f13a
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x78]
test ecx, ecx
jne 0x40f04c
test eax, eax
je 0x40f13a
mov edi, 0x4000
test ecx, ecx
ja 0x40f066
jb 0x40f05b
cmp eax, edi
jae 0x40f066
mov edi, dword [esi + 0x78]
test edi, edi
je 0x40efc6
mov ecx, dword [esi + 0xc0]
add ecx, dword [esi + 0x40]
mov eax, dword [esi + 0xc4]
adc eax, dword [esi + 0x44]
mov edx, dword [esi + 0xb4]
push 0
push eax
push ecx
lea ecx, [esi + 0x88]
call fcn.0040fd20
add esp, 0xc
test eax, eax
jne 0x40f284
mov eax, dword [esi + 0x8c]
push edi
push dword [esi]
push dword [esi + 0xb4]
push dword [esi + 0xa4]
call eax
add esp, 0x10
cmp eax, edi
jne 0x40f284
mov edx, dword [ebp + 8]
cmp dword [edx + 0xe4], 0
je 0x40f124
xor ebx, ebx
test edi, edi
je 0x40f120
nop dword [eax]
mov ecx, dword [edx + 0xf4]
mov edx, dword [esi]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
shr eax, 8
movzx ecx, al
movsx eax, byte [edx + ebx]
xor ecx, eax
mov byte [edx + ebx], cl
movsx eax, cl
mov ecx, dword [ebp + 8]
push eax
mov edx, dword [ecx + 0xf8]
lea ecx, [ecx + 0xec]
call fcn.0040cb30
mov ecx, dword [esi]
add esp, 4
mov edx, dword [ebp + 8]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x40f0d0
mov ebx, dword [esp + 0xc]
add dword [esi + 0x40], edi
mov eax, dword [esi]
adc dword [esi + 0x44], 0
sub dword [esi + 0x78], edi
mov dword [esi + 4], eax
sbb dword [esi + 0x7c], 0
mov dword [esi + 8], edi
mov eax, dword [esi + 0xb8]
test eax, eax
je 0x40f1f8
cmp dword [esi + 0xc8], 0
jne 0x40f1f8
cmp eax, 0xc
je 0x40f271
mov eax, dword [esi + 0x18]
lea ecx, [esi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
call fcn.00413060
mov edi, eax
test edi, edi
js 0x40f186
cmp dword [esi + 0x1c], 0
mov eax, 0xfffffffd
cmovne edi, eax
mov ebx, dword [esi + 0x18]
xor ecx, ecx
mov edx, dword [esp + 0x14]
mov eax, ebx
sub eax, dword [esp + 0x10]
mov dword [esp + 0x18], eax
sbb ecx, ecx
add dword [esi + 0x68], eax
mov dword [esp + 0x1c], ecx
adc dword [esi + 0x6c], ecx
test edx, edx
jne 0x40f1ad
xor ecx, ecx
jmp 0x40f1bf
mov ecx, dword [esi + 0x70]
push eax
call fcn.004124f0
mov ecx, eax
add esp, 4
mov eax, dword [esp + 0x18]
sub dword [esi + 0x80], eax
mov eax, dword [esp + 0x1c]
sbb dword [esi + 0x84], eax
sub ebx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
add eax, ebx
mov dword [esi + 0x70], ecx
mov dword [esp + 0xc], eax
cmp edi, 1
je 0x40f27d
test edi, edi
jne 0x40f28e
mov ebx, eax
jmp 0x40f271
mov edi, dword [esi + 8]
test edi, edi
jne 0x40f207
mov eax, dword [esi + 0x78]
or eax, dword [esi + 0x7c]
je 0x40f27b
cmp dword [esi + 0x14], edi
cmovb edi, dword [esi + 0x14]
xor edx, edx
test edi, edi
je 0x40f225
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, edi
jb 0x40f214
add dword [esi + 0x68], edi
mov ebx, dword [esi + 0x10]
adc dword [esi + 0x6c], 0
test ebx, ebx
jne 0x40f237
xor eax, eax
jmp 0x40f245
mov ecx, dword [esi + 0x70]
mov edx, ebx
push edi
call fcn.004124f0
add esp, 4
sub dword [esi + 0x80], edi
mov dword [esi + 0x70], eax
lea eax, [ebx + edi]
sbb dword [esi + 0x84], 0
mov ebx, dword [esp + 0xc]
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add ebx, edi
mov dword [esi + 0x10], eax
mov dword [esp + 0xc], ebx
cmp dword [esi + 0x14], 0
ja 0x40f030
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret