Function at 0x410670
Capabilities:
Encode data using xor

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
test edi, edi
mov dword [esp + 4], 0
jne 0x41068a
lea eax, [edi - 0x66]
pop edi
pop ecx
ret 0xc
push ebx
mov ebx, dword [edi + 0x9c]
test ebx, ebx
jne 0x41069e
lea eax, [ebx - 0x66]
pop ebx
pop edi
pop ecx
ret 0xc
cmp dword [ebx], 0
jne 0x4106ae
pop ebx
mov eax, 0xffffff9c
pop edi
pop ecx
ret 0xc
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4106bc
pop ebx
pop edi
pop ecx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dword [ebx + 0x10], ecx
mov ecx, dword [ebx + 0x5c]
cmp eax, ecx
mov dword [ebx + 0x14], eax
jbe 0x4106d9
cmp dword [ebx + 0x8c], 0
jne 0x4106d9
mov dword [ebx + 0x14], ecx
mov edx, dword [ebx + 0x58]
mov ecx, dword [ebx + 8]
add ecx, edx
cmp eax, ecx
jbe 0x4106f1
cmp dword [ebx + 0x8c], 0
je 0x4106f1
mov dword [ebx + 0x14], ecx
cmp dword [ebx + 0x14], 0
push ebp
push esi
jbe 0x41088a
lea ecx, [ecx]
cmp dword [ebx + 8], 0
jne 0x4107c6
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x4107c6
mov esi, 0x4000
cmp eax, esi
mov dword [esp + 0x20], esi
jae 0x410728
mov dword [esp + 0x20], eax
mov esi, eax
mov edx, dword [ebx + 0x88]
add edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x7c]
push 0
push edx
mov edx, dword [ebx + 0x70]
push eax
push ecx
call edx
add esp, 0x10
test eax, eax
jne 0x410896
mov eax, dword [ebx]
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0x7c]
push esi
push eax
mov eax, dword [ebx + 0x64]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, esi
jne 0x410896
cmp dword [edi + 0xa0], 0
je 0x4107b8
xor ebp, ebp
test esi, esi
jbe 0x4107b8
lea esi, [edi + 0xa4]
mov ecx, dword [ebx]
mov eax, esi
lea edx, [ecx + ebp]
call fcn.0040fc90
xor byte [edx], al
mov edx, dword [ebx]
movsx eax, byte [edx + ebp]
mov edi, dword [edi + 0xb0]
call fcn.0040fcb0
mov ecx, dword [ebx]
mov edi, dword [esp + 0x18]
mov byte [ecx + ebp], al
add ebp, 1
cmp ebp, dword [esp + 0x20]
jb 0x410783
mov esi, dword [esp + 0x20]
mov edx, dword [ebx]
add dword [ebx + 0x3c], esi
sub dword [ebx + 0x58], esi
mov dword [ebx + 4], edx
mov dword [ebx + 8], esi
cmp dword [ebx + 0x84], 0
je 0x41082b
cmp dword [ebx + 0x8c], 0
jne 0x41082b
mov eax, dword [ebx + 0x10]
mov edi, dword [ebx + 0x18]
push 2
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x28], eax
call fcn.00411340
mov ebp, eax
test ebp, ebp
jl 0x4107fe
cmp dword [ebx + 0x1c], 0
je 0x4107fe
mov ebp, 0xfffffffd
mov esi, dword [ebx + 0x18]
mov edx, dword [esp + 0x20]
mov eax, dword [ebx + 0x50]
sub esi, edi
push esi
push edx
push eax
call fcn.004110d0
sub dword [ebx + 0x5c], esi
add dword [esp + 0x10], esi
cmp ebp, 1
mov dword [ebx + 0x50], eax
je 0x41088a
test ebp, ebp
jne 0x4108a1
mov edi, dword [esp + 0x18]
jmp 0x410880
mov eax, dword [ebx + 8]
test eax, eax
jne 0x410837
cmp dword [ebx + 0x58], eax
je 0x41088a
mov esi, dword [ebx + 0x14]
cmp esi, eax
jb 0x410840
mov esi, eax
xor eax, eax
test esi, esi
jbe 0x410859
mov ecx, dword [ebx + 4]
mov cl, byte [eax + ecx]
mov edx, dword [ebx + 0x10]
mov byte [eax + edx], cl
add eax, 1
cmp eax, esi
jb 0x410846
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x50]
push esi
push edx
push eax
call fcn.004110d0
sub dword [ebx + 0x5c], esi
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 0x10], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add dword [esp + 0x10], esi
mov dword [ebx + 0x50], eax
cmp dword [ebx + 0x14], 0
ja 0x410700
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret 0xc
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
pop ecx
ret 0xc
pop esi
mov eax, ebp
pop ebp
pop ebx
pop edi
pop ecx
ret 0xc