Function at 0x405824
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x594
xor eax, eax
mov ecx, 0x11
mov dword [ebp - 0x3c], 0
push ebx
push esi
push edi
lea edi, [ebp - 0x90]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax]
add eax, 4
inc dword [ebp + edx*4 - 0x90]
dec ecx
jne 0x40584c
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x28]
cmp dword [ebp - 0x90], edi
jne 0x405874
mov dword [esi], 0
jmp 0x405be3
mov eax, dword [esi]
mov ecx, 1
mov dword [ebp - 4], eax
lea eax, [ebp - 0x8c]
cmp dword [eax], 0
jne 0x405894
add eax, 4
inc ecx
lea edx, [ebp - 0x50]
cmp eax, edx
jbe 0x405884
mov dword [ebp - 0x14], ecx
mov edi, ecx
cmp dword [ebp - 4], ecx
jae 0x4058a1
mov dword [ebp - 4], edi
mov edx, 0x10
lea eax, [ebp - 0x50]
cmp dword [eax], 0
jne 0x4058bc
sub eax, 4
dec edx
lea ebx, [ebp - 0x90]
cmp eax, ebx
jne 0x4058a9
mov dword [ebp - 0x24], edx
cmp edx, dword [ebp - 4]
jae 0x4058c7
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, 1
shl eax, cl
mov dword [ebp - 0x18], eax
cmp edx, ecx
jbe 0x4058f8
lea eax, [ebp + ecx*4 - 0x90]
mov esi, dword [eax]
sub dword [ebp - 0x18], esi
js 0x405910
add eax, 4
inc ecx
mov esi, dword [ebp - 0x18]
add esi, esi
cmp edx, ecx
mov dword [ebp - 0x18], esi
ja 0x4058e1
lea ecx, [ebp + edx*4 - 0x90]
mov eax, dword [ecx]
sub dword [ebp - 0x18], eax
jns 0x40591a
mov eax, 2
jmp 0x405be5
mov eax, 2
jmp 0x405be5
add eax, dword [ebp - 0x18]
lea esi, [ebp - 0x8c]
mov dword [ecx], eax
xor ecx, ecx
lea eax, [ebp - 0xcc]
dec edx
mov dword [ebp - 0xd0], ecx
je 0x405943
add ecx, dword [esi]
add esi, 4
mov dword [eax], ecx
add eax, 4
dec edx
jne 0x405936
mov esi, dword [ebp + 0xc]
xor edx, edx
mov eax, dword [esi]
add esi, 4
test eax, eax
je 0x405964
lea ecx, [ebp + eax*4 - 0xd4]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [ebp + eax*4 - 0x598], edx
inc edx
cmp edx, dword [ebp + 0x10]
jb 0x405948
xor esi, esi
lea ebx, [ebp - 0x594]
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0xd4], esi
mov dword [ebp - 0x2c], ebx
xor eax, eax
mov dword [ebp - 0x114], esi
neg edx
mov dword [ebp - 0x10], esi
cmp dword [ebp - 0x24], edi
mov dword [ebp - 0x28], 0xffffffff
jl 0x405bc9
mov ecx, dword [ebp - 0x14]
lea ebx, [ebp + ecx*4 - 0x90]
mov dword [ebp - 0x44], ebx
mov ecx, dword [ebx]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x30]
dec dword [ebp - 0x30]
test ecx, ecx
je 0x405bba
mov ecx, dword [ebp - 4]
add ecx, edx
cmp ecx, dword [ebp - 0x14]
jge 0x405ab5
mov edi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
shl edi, 2
inc ecx
movzx eax, word [ebp - 0x24]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], ecx
add edi, 4
add edx, dword [ebp - 4]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 4]
sub eax, edx
inc dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
cmp eax, ecx
jbe 0x4059fe
movzx eax, cx
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x14]
mov ebx, 1
sub ecx, edx
shl ebx, cl
cmp ebx, dword [ebp - 0x38]
jbe 0x405a36
mov eax, dword [ebp - 0x30]
inc ecx
inc eax
sub ebx, eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x10], ecx
jbe 0x405a36
add dword [ebp - 8], 4
add ebx, ebx
mov eax, dword [ebp - 8]
cmp ebx, dword [eax]
jbe 0x405a36
sub ebx, dword [eax]
inc ecx
cmp dword [ebp - 0x10], ecx
ja 0x405a21
mov eax, 1
mov ebx, dword [ebp - 0x3c]
shl eax, cl
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x20]
lea eax, [eax + ebx*8]
mov ebx, dword [ebp - 0x10]
add dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0x3c]
cmp ebx, dword [ebp + 0x24]
ja 0x405bdc
mov dword [ebp + edi - 0x114], eax
test edi, edi
je 0x405aa7
mov ebx, dword [ebp - 0xc]
add cl, 0x10
mov dword [ebp + edi - 0xd4], ebx
mov byte [ebp - 0x20], cl
mov bl, byte [ebp - 4]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x1f], bl
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x34], ecx
mov ecx, edx
sub cl, byte [ebp - 4]
shr ebx, cl
shl ebx, 3
mov ecx, dword [ebp - 0x34]
add ebx, dword [ebp + edi - 0x118]
mov dword [ebx], ecx
mov ecx, dword [ebp - 8]
mov dword [ebx + 4], ecx
mov ecx, dword [ebp - 4]
add ecx, edx
cmp ecx, dword [ebp - 0x14]
jl 0x4059e0
mov cl, byte [ebp - 0x14]
mov edi, dword [ebp + 0x10]
sub cl, dl
lea ebx, [ebp + edi*4 - 0x594]
mov byte [ebp - 0x1f], cl
cmp ebx, dword [ebp - 0x2c]
ja 0x405ad2
mov byte [ebp - 0x20], 0x63
jmp 0x405b09
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebx]
cmp dword [ebp + 0x14], edi
jbe 0x405aec
mov bl, 0x10
cmp edi, 0x100
adc bl, 0xff
mov byte [ebp - 0x20], bl
jmp 0x405b01
sub edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x1c]
add edi, edi
mov bl, byte [edi + ebx]
mov byte [ebp - 0x20], bl
mov ebx, dword [ebp + 0x18]
mov di, word [edi + ebx]
add dword [ebp - 0x2c], 4
mov word [ebp - 0x1c], di
mov edi, 1
shl edi, cl
mov cl, dl
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0xc]
shr edi, cl
cmp dword [ebp - 0x10], edi
jbe 0x405b5e
lea ecx, [eax + edi*8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 8]
shl ecx, 3
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
add edi, dword [ebp - 8]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x48], ebx
mov ebx, ecx
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebx], ecx
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x48]
mov dword [ebx + 4], ecx
mov ebx, dword [ebp - 0x40]
add dword [ebp - 0x34], ebx
cmp dword [ebp - 0x10], edi
ja 0x405b2e
mov edi, 1
mov cl, byte [ebp - 0x14]
dec cl
shl edi, cl
test dword [ebp - 0xc], edi
je 0x405b79
xor dword [ebp - 0xc], edi
shr edi, 1
test dword [ebp - 0xc], edi
jne 0x405b6f
mov ecx, dword [ebp - 0x28]
mov ebx, 1
xor dword [ebp - 0xc], edi
lea edi, [ebp + ecx*4 - 0xd4]
mov cl, dl
shl ebx, cl
dec ebx
and ebx, dword [ebp - 0xc]
cmp ebx, dword [edi]
je 0x4059b0
sub edi, 4
sub edx, dword [ebp - 4]
mov ebx, 1
mov cl, dl
shl ebx, cl
dec ebx
dec dword [ebp - 0x28]
and ebx, dword [ebp - 0xc]
cmp ebx, dword [edi]
jne 0x405b9b
jmp 0x4059b0
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0x24], ecx
jge 0x40599e
cmp dword [ebp - 0x18], 0
je 0x405be3
cmp dword [ebp - 0x24], 1
je 0x405be3
mov eax, 1
jmp 0x405be5
mov eax, 3
jmp 0x405be5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24