Function at 0x410340
Capabilities:
Encode data using xor

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
test edi, edi
mov dword [esp + 4], 0
jne 0x41035a
lea eax, [edi - 0x66]
pop edi
pop ecx
ret 8
push ebx
mov ebx, dword [edi + 0x9c]
test ebx, ebx
jne 0x41036e
lea eax, [ebx - 0x66]
pop ebx
pop edi
pop ecx
ret 8
cmp dword [ebx], 0
jne 0x41037e
pop ebx
mov eax, 0xffffff9c
pop edi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x5c]
cmp eax, 0x2000
mov dword [ebx + 0x14], 0x2000
jae 0x4103a2
cmp dword [ebx + 0x8c], 0
jne 0x4103a2
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx + 0x58]
mov edx, dword [ebx + 8]
lea eax, [ecx + edx]
cmp eax, 0x2000
jae 0x4103be
cmp dword [ebx + 0x8c], 0
je 0x4103be
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0x14], 0
push ebp
push esi
jbe 0x41055f
lea ebx, [ebx]
cmp dword [ebx + 8], 0
jne 0x410495
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x410495
mov esi, 0x4000
cmp eax, esi
mov dword [esp + 0x1c], esi
jae 0x4103f8
mov dword [esp + 0x1c], eax
mov esi, eax
mov eax, dword [ebx + 0x88]
add eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0x7c]
push 0
push eax
mov eax, dword [ebx + 0x70]
push ecx
push edx
call eax
add esp, 0x10
test eax, eax
jne 0x41056b
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x7c]
push esi
push ecx
mov ecx, dword [ebx + 0x64]
push edx
push eax
call ecx
add esp, 0x10
cmp eax, esi
jne 0x41056b
cmp dword [edi + 0xa0], 0
je 0x410487
xor ebp, ebp
test esi, esi
jbe 0x410487
lea esi, [edi + 0xa4]
mov edx, dword [ebx]
mov eax, esi
add edx, ebp
call fcn.0040f650
xor byte [edx], al
mov eax, dword [ebx]
movsx eax, byte [eax + ebp]
mov edi, dword [edi + 0xb0]
call fcn.0040f670
mov ecx, dword [ebx]
mov edi, dword [esp + 0x18]
mov byte [ecx + ebp], al
add ebp, 1
cmp ebp, dword [esp + 0x1c]
jb 0x410453
mov esi, dword [esp + 0x1c]
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 0x4104fc
cmp dword [ebx + 0x8c], 0
jne 0x4104fc
mov eax, dword [ebx + 0x10]
mov edi, dword [ebx + 0x18]
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x20], eax
call fcn.00410e90
mov ebp, eax
test ebp, ebp
jl 0x4104cb
cmp dword [ebx + 0x1c], 0
je 0x4104cb
mov ebp, 0xfffffffd
mov esi, dword [ebx + 0x18]
mov edx, dword [ebx + 0x50]
mov ecx, dword [esp + 0x1c]
sub esi, edi
push edx
mov edx, esi
call fcn.00410890
sub dword [ebx + 0x5c], esi
add dword [esp + 0x10], esi
cmp ebp, 1
mov dword [ebx + 0x50], eax
je 0x41055f
test ebp, ebp
jne 0x410576
mov edi, dword [esp + 0x18]
jmp 0x410555
mov eax, dword [ebx + 8]
test eax, eax
jne 0x410508
cmp dword [ebx + 0x58], eax
je 0x41055f
mov esi, dword [ebx + 0x14]
cmp esi, eax
jb 0x410511
mov esi, eax
xor eax, eax
test esi, esi
jbe 0x41052a
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 0x410517
mov edx, dword [ebx + 0x50]
mov ebp, dword [ebx + 0x10]
push edx
mov edx, esi
mov ecx, ebp
call fcn.00410890
sub dword [ebx + 0x5c], esi
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add ebp, esi
add dword [esp + 0x10], esi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x10], ebp
cmp dword [ebx + 0x14], 0
ja 0x4103d0
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret 8
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
pop ecx
ret 8
pop esi
mov eax, ebp
pop ebp
pop ebx
pop edi
pop ecx
ret 8