Function at 0x408c30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov ebx, ecx
push edi
xor edi, edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x408c53
mov eax, 0xffffff9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0xe0]
test esi, esi
je 0x408c47
cmp dword [esi], edi
jne 0x408c6d
mov eax, 0xffffff9c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], 8
cmp dword [esi + 0x84], edi
ja 0x408c9b
jb 0x408c8a
cmp dword [esi + 0x80], 8
jae 0x408c9b
cmp dword [esi + 0xc8], edi
jne 0x408c9b
mov eax, dword [esi + 0x80]
mov dword [esi + 0x14], eax
mov edx, dword [esi + 8]
xor eax, eax
mov ecx, edx
add ecx, dword [esi + 0x78]
adc eax, dword [esi + 0x7c]
test eax, eax
ja 0x408cc3
jb 0x408cb3
cmp ecx, 8
jae 0x408cc3
cmp dword [esi + 0xc8], edi
je 0x408cc3
mov eax, dword [esi + 0x78]
add eax, edx
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edi
jbe 0x408f34
lea esp, [esp]
cmp dword [esi + 8], 0
jne 0x408dda
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x78]
test ecx, ecx
jne 0x408cec
test eax, eax
je 0x408dda
mov edi, 0x4000
test ecx, ecx
ja 0x408d06
jb 0x408cfb
cmp eax, edi
jae 0x408d06
mov edi, dword [esi + 0x78]
test edi, edi
je 0x408f14
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.00408fd0
add esp, 0xc
test eax, eax
jne 0x408f1d
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 0x408f1d
cmp dword [ebx + 0xe4], 0
je 0x408dc4
xor edx, edx
mov dword [ebp - 8], edx
test edi, edi
je 0x408dc4
lea esp, [esp]
mov ecx, dword [ebx + 0xf4]
add edx, dword [esi]
and ecx, 0xfffd
or ecx, 2
mov ebx, ecx
xor ebx, 1
movsx eax, byte [edx]
imul ebx, ecx
shr ebx, 8
and ebx, 0xff
xor ebx, eax
mov byte [edx], bl
movsx eax, bl
mov ebx, dword [ebp - 0xc]
push eax
mov edx, dword [ebx + 0xf8]
lea ecx, [ebx + 0xec]
call fcn.004071b0
mov edx, dword [ebp - 8]
add esp, 4
mov ecx, dword [esi]
mov byte [edx + ecx], al
inc edx
mov dword [ebp - 8], edx
cmp edx, edi
jb 0x408d70
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 0x408e88
cmp dword [esi + 0xc8], 0
jne 0x408e88
cmp eax, 0xc
je 0x408f06
mov eax, dword [esi + 0x18]
lea ecx, [esi + 4]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x10], eax
call fcn.004096a0
mov edi, eax
test edi, edi
js 0x408e24
cmp dword [esi + 0x1c], 0
mov eax, 0xfffffffd
cmovne edi, eax
mov ebx, dword [esi + 0x18]
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov eax, ebx
sub eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
sbb ecx, ecx
add dword [esi + 0x68], eax
mov dword [ebp - 0x18], ecx
adc dword [esi + 0x6c], ecx
test edx, edx
jne 0x408e47
xor ecx, ecx
jmp 0x408e58
mov ecx, dword [esi + 0x70]
push eax
call fcn.00409150
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x14]
sub dword [esi + 0x80], eax
mov eax, dword [ebp - 0x18]
sbb dword [esi + 0x84], eax
sub ebx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add eax, ebx
mov dword [esi + 0x70], ecx
mov dword [ebp - 4], eax
cmp edi, 1
je 0x408f36
test edi, edi
jne 0x408f34
jmp 0x408f06
mov edi, dword [esi + 8]
test edi, edi
jne 0x408e9b
mov eax, dword [esi + 0x78]
or eax, dword [esi + 0x7c]
je 0x408f27
cmp dword [esi + 0x14], edi
cmovb edi, dword [esi + 0x14]
xor edx, edx
test edi, edi
je 0x408ec1
jmp 0x408eb0
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 0x408eb0
add dword [esi + 0x68], edi
mov ebx, dword [esi + 0x10]
adc dword [esi + 0x6c], 0
test ebx, ebx
jne 0x408ed3
xor eax, eax
jmp 0x408ee1
mov ecx, dword [esi + 0x70]
mov edx, ebx
push edi
call fcn.00409150
add esp, 4
sub dword [esi + 0x80], edi
mov dword [esi + 0x70], eax
lea eax, [ebx + edi]
sbb dword [esi + 0x84], 0
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add dword [ebp - 4], edi
mov dword [esi + 0x10], eax
cmp dword [esi + 0x14], 0
jbe 0x408f31
mov ebx, dword [ebp - 0xc]
jmp 0x408cd0
xor eax, eax
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, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret