Function at 0x40bbc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 8]
push ebx
xor edx, edx
push esi
push edi
mov dword [esp + 0xc], edx
cmp eax, edx
jne 0x40bbe5
mov eax, 0xffffff9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0xe0]
cmp ebx, edx
je 0x40bbd9
cmp dword [ebx], edx
jne 0x40bbff
mov eax, 0xffffff9c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x10]
cmp edi, edx
jne 0x40bc0f
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edi
cmp edx, dword [ebx + 0x84]
jb 0x40bc3b
ja 0x40bc2a
cmp edi, dword [ebx + 0x80]
jbe 0x40bc3b
cmp dword [ebx + 0xc8], edx
jne 0x40bc3b
mov ecx, dword [ebx + 0x80]
mov dword [ebx + 0x14], ecx
mov esi, dword [ebx + 8]
xor eax, eax
mov ecx, esi
add ecx, dword [ebx + 0x78]
adc eax, dword [ebx + 0x7c]
cmp edx, eax
jb 0x40bc62
ja 0x40bc52
cmp edi, ecx
jbe 0x40bc62
cmp dword [ebx + 0xc8], edx
je 0x40bc62
mov edx, dword [ebx + 0x78]
add edx, esi
mov dword [ebx + 0x14], edx
cmp dword [ebx + 0x14], 0
jbe 0x40beb3
lea esp, [esp]
cmp dword [ebx + 8], 0
jne 0x40bd78
mov eax, dword [ebx + 0x7c]
mov ecx, dword [ebx + 0x78]
test eax, eax
jne 0x40bc8c
test ecx, ecx
je 0x40bd78
mov edi, 0x4000
mov dword [esp + 0x10], edi
test eax, eax
ja 0x40bcb0
jb 0x40bc9f
cmp ecx, edi
jae 0x40bcb0
mov eax, dword [ebx + 0x78]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40bc06
mov edi, eax
mov eax, dword [ebx + 0xc0]
add eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0xc4]
adc ecx, dword [ebx + 0x44]
mov esi, dword [ebx + 0xb4]
push ecx
push eax
lea eax, [ebx + 0x88]
xor edx, edx
call fcn.00404a30
add esp, 8
test eax, eax
jne 0x40bebe
mov edx, dword [ebx]
mov eax, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0xa4]
push edi
push edx
mov edx, dword [ebx + 0x8c]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, edi
jne 0x40bebe
mov esi, dword [ebp + 8]
cmp dword [esi + 0xe4], 0
je 0x40bd62
mov dword [esp + 0x14], 0
test edi, edi
je 0x40bd62
add esi, 0xec
mov edx, dword [ebx]
add edx, dword [esp + 0x14]
mov eax, esi
call fcn.00409880
movsx ecx, byte [edx]
xor eax, ecx
mov byte [edx], al
mov edx, dword [ebp + 8]
mov edi, dword [edx + 0xf8]
movsx eax, al
call fcn.004098a0
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx]
mov byte [ecx + edx], al
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x10]
jb 0x40bd25
mov edi, dword [esp + 0x10]
xor eax, eax
add dword [ebx + 0x40], edi
mov dword [ebx + 8], edi
adc dword [ebx + 0x44], eax
sub dword [ebx + 0x78], edi
sbb dword [ebx + 0x7c], eax
mov eax, dword [ebx]
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0xb8]
test eax, eax
je 0x40be2b
cmp dword [ebx + 0xc8], 0
jne 0x40be2b
cmp eax, 0xc
je 0x40bea9
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebx + 0x10]
lea eax, [ebx + 4]
push eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
call fcn.0040cc30
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
js 0x40bdcc
cmp dword [ebx + 0x1c], 0
je 0x40bdcc
mov dword [esp + 0x14], 0xfffffffd
mov edi, dword [ebx + 0x18]
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov esi, edi
sub esi, dword [esp + 0x18]
mov edx, ecx
sbb ecx, edx
add dword [ebx + 0x68], esi
mov dword [esp + 0x24], ecx
adc dword [ebx + 0x6c], ecx
test eax, eax
je 0x40bdfd
mov ecx, eax
mov eax, dword [ebx + 0x70]
mov edx, esi
call fcn.00404da0
mov ecx, dword [esp + 0x24]
sub dword [ebx + 0x80], esi
mov dword [ebx + 0x70], eax
mov eax, dword [esp + 0x14]
sbb dword [ebx + 0x84], ecx
sub edi, dword [esp + 0x18]
add dword [esp + 0xc], edi
cmp eax, 1
je 0x40beb3
test eax, eax
jne 0x40beb7
jmp 0x40bea9
mov eax, dword [ebx + 8]
test eax, eax
jne 0x40be3a
mov ecx, dword [ebx + 0x78]
or ecx, dword [ebx + 0x7c]
je 0x40beb3
mov esi, dword [ebx + 0x14]
cmp esi, eax
jb 0x40be43
mov esi, eax
xor eax, eax
test esi, esi
je 0x40be61
lea esp, [esp]
mov edx, dword [ebx + 4]
mov dl, byte [eax + edx]
mov ecx, dword [ebx + 0x10]
mov byte [eax + ecx], dl
inc eax
cmp eax, esi
jb 0x40be50
mov edi, dword [ebx + 0x10]
xor eax, eax
add dword [ebx + 0x68], esi
adc dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x70]
test edi, edi
jne 0x40be77
xor eax, eax
jmp 0x40be80
mov edx, esi
mov ecx, edi
call fcn.00404da0
sub dword [ebx + 0x80], esi
mov dword [ebx + 0x70], eax
mov eax, 0
sbb dword [ebx + 0x84], eax
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add edi, esi
add dword [esp + 0xc], esi
mov dword [ebx + 0x10], edi
cmp dword [ebx + 0x14], 0
ja 0x40bc70
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret