Function at 0x416c40
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov esi, eax
mov dword [esp + 0x24], 0
test ebp, ebp
jne 0x416c66
mov eax, 0xffffff9a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov eax, dword [ebp + 0xe8]
test eax, eax
je 0x416c59
cmp dword [eax], 0
jne 0x416c82
mov eax, 0xffffff9c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test esi, esi
jne 0x416c90
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp esi, 0xffffffff
ja 0x416c59
mov dword [eax + 0x10], ecx
mov edx, dword [ebp + 0xe8]
mov dword [edx + 0x14], esi
mov eax, dword [ebp + 0xe8]
cmp word [eax + 0xc0], 0
je 0x416cbc
mov ecx, eax
cmp dword [ecx + 0xd0], 0
je 0x416cf0
mov edx, dword [eax + 8]
xor ecx, ecx
add edx, dword [eax + 0x78]
adc ecx, dword [eax + 0x7c]
xor eax, eax
cmp eax, ecx
jb 0x416cf0
ja 0x416cd3
cmp esi, edx
jbe 0x416cf0
mov eax, dword [ebp + 0xe8]
mov edx, dword [eax + 0x78]
add edx, dword [eax + 8]
mov dword [eax + 0x14], edx
jmp 0x416cf0
mov eax, dword [ebp + 0xe8]
cmp dword [eax + 8], 0
jne 0x416f1a
xor edi, edi
xor esi, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edi
cmp dword [eax + 4], edi
je 0x416d23
mov ecx, eax
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
add eax, 0xffff
mov dword [esp + 0x14], eax
mov esi, eax
mov ebx, 0xffff
sub ebx, esi
mov dword [esp + 0x18], ebx
test esi, esi
jbe 0x416d48
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push esi
push ecx
push edx
call sub.MSVCR90.dll_memmove
add esp, 0xc
mov eax, dword [ebp + 0xe8]
mov edx, dword [eax + 0x7c]
xor ecx, ecx
cmp edx, ecx
ja 0x416d69
jb 0x416d60
mov ecx, dword [eax + 0x78]
cmp ecx, ebx
jae 0x416d69
mov edx, dword [eax + 0x78]
mov dword [esp + 0x18], edx
mov ebx, edx
test ebx, ebx
je 0x416e82
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax + 0xc8]
add ecx, dword [eax + 0x40]
mov edx, dword [eax + 0xcc]
mov esi, dword [eax + 0x9c]
adc edx, dword [eax + 0x44]
mov ebx, dword [eax + 0xbc]
test esi, esi
je 0x416dac
mov eax, dword [eax + 0xa8]
push 0
push edx
push ecx
push ebx
push eax
call esi
add esp, 0x14
jmp 0x416dd3
xor esi, esi
cmp ecx, ecx
jne 0x4170b8
cmp esi, edx
jne 0x4170b8
mov edx, dword [eax + 0xb8]
push esi
push ecx
mov ecx, dword [eax + 0xa8]
push ebx
push ecx
call edx
add esp, 0x10
test eax, eax
jne 0x4170b8
mov eax, dword [ebp + 0xe8]
mov edx, dword [eax]
mov ebx, dword [esp + 0x18]
add edx, edi
add edx, dword [esp + 0x14]
mov ecx, ebx
sub ecx, edi
push ecx
mov ecx, dword [eax + 0xbc]
push edx
mov edx, dword [eax + 0xa8]
mov eax, dword [eax + 0x90]
push ecx
push edx
call eax
mov ecx, dword [ebp + 0xe8]
add edi, eax
add esp, 0x10
add dword [ecx + 0x40], eax
mov dword [esp + 0x1c], edi
adc dword [ecx + 0x44], 0
test eax, eax
jne 0x416e76
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax + 0xbc]
mov edx, dword [eax + 0xa8]
mov eax, dword [eax + 0xa4]
push ecx
push edx
call eax
add esp, 8
test eax, eax
jne 0x4170b8
mov esi, ebp
call fcn.00416010
xor ecx, ecx
cmp eax, ecx
jne 0x416fd7
mov eax, dword [ebp + 0xe8]
mov dword [eax + 0x40], ecx
mov dword [eax + 0x44], ecx
mov ecx, dword [ebp + 0xe8]
mov edx, dword [ebp + 0x34]
mov dword [ecx + 0xbc], edx
cmp edi, ebx
jne 0x416d71
mov esi, dword [esp + 0x14]
test byte [ebp + 0x94], 1
je 0x416ef7
cmp dword [ebp + 0xfc], 0
je 0x416ef7
xor ebx, ebx
test edi, edi
jbe 0x416ef7
lea esi, [ebp + 0xf0]
mov eax, dword [ebp + 0xf8]
mov ecx, dword [ebp + 0xe8]
mov edx, dword [ecx]
and eax, 0xfffd
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
lea edi, [edx + ebx]
shr ecx, 8
xor byte [edi], cl
mov edx, dword [ebp + 0xe8]
mov eax, dword [edx]
movzx eax, byte [eax + ebx]
mov edi, dword [ebp + 0xfc]
call fcn.00417a80
mov ecx, dword [ebp + 0xe8]
mov edx, dword [ecx]
mov byte [ebx + edx], al
inc ebx
cmp ebx, dword [esp + 0x1c]
jb 0x416ea0
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov eax, dword [ebp + 0xe8]
sub dword [eax + 0x78], edi
sbb dword [eax + 0x7c], 0
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0xe8]
add edi, esi
mov dword [edx + 8], edi
mov eax, dword [ebp + 0xe8]
movzx ecx, word [eax + 0xc0]
test cx, cx
je 0x416fdf
cmp dword [eax + 0xd0], 0
jne 0x416fdf
cmp cx, 0xc
je 0x41709c
mov ecx, dword [eax + 0x10]
mov edi, dword [eax + 0x18]
add eax, 4
push 2
push eax
mov dword [esp + 0x24], ecx
call fcn.00417d70
mov ebx, eax
add esp, 8
test ebx, ebx
jl 0x416f76
mov edx, dword [ebp + 0xe8]
cmp dword [edx + 0x1c], 0
je 0x416f76
mov ebx, 0xfffffffd
mov eax, dword [ebp + 0xe8]
mov esi, dword [eax + 0x18]
xor ecx, ecx
sub esi, edi
mov edx, ecx
sbb ecx, edx
add dword [eax + 0x68], esi
push esi
adc dword [eax + 0x6c], ecx
mov eax, dword [ebp + 0xe8]
sub dword [eax + 0x80], esi
sbb dword [eax + 0x84], ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0xe8]
mov edx, dword [ecx + 0x70]
push eax
push edx
call fcn.00417780
mov ecx, dword [ebp + 0xe8]
add dword [esp + 0x30], esi
add esp, 0xc
mov dword [ecx + 0x70], eax
cmp ebx, 1
je 0x4170ac
test ebx, ebx
je 0x41709c
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov esi, dword [eax + 8]
test esi, esi
jne 0x416ff2
mov edx, dword [eax + 0x78]
or edx, dword [eax + 0x7c]
je 0x4170ac
mov ecx, eax
mov edx, dword [ecx + 0x14]
cmp edx, dword [ecx + 8]
jae 0x416fff
mov esi, dword [eax + 0x14]
xor eax, eax
test esi, esi
jbe 0x417027
jmp 0x417010
mov ecx, dword [ebp + 0xe8]
mov edx, dword [ecx + 4]
mov dl, byte [eax + edx]
mov ecx, dword [ecx + 0x10]
mov byte [eax + ecx], dl
inc eax
cmp eax, esi
jb 0x417010
mov eax, dword [ebp + 0xe8]
xor ecx, ecx
add dword [eax + 0x68], esi
adc dword [eax + 0x6c], ecx
mov eax, dword [ebp + 0xe8]
sub dword [eax + 0x80], esi
sbb dword [eax + 0x84], ecx
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x70]
test ecx, ecx
jne 0x41705b
xor eax, eax
jmp 0x417062
mov edx, esi
call fcn.004177a0
mov ecx, dword [ebp + 0xe8]
mov dword [ecx + 0x70], eax
mov eax, dword [ebp + 0xe8]
sub dword [eax + 8], esi
mov eax, dword [ebp + 0xe8]
sub dword [eax + 0x14], esi
mov eax, dword [ebp + 0xe8]
add dword [eax + 0x10], esi
mov eax, dword [ebp + 0xe8]
add dword [eax + 4], esi
mov eax, dword [ebp + 0xe8]
add dword [eax + 0x18], esi
add dword [esp + 0x24], esi
mov edx, dword [ebp + 0xe8]
cmp dword [edx + 0x14], 0
ja 0x416cf0
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret