Function at 0x4049f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x580
lea eax, [esp + 0x100]
push ebx
push esi
push edi
push ebp
push 0x480
push 0
push eax
call fcn.00405bb0
lea eax, [esp + 0xd8]
add esp, 0xc
push 0x44
push 0
push eax
call fcn.00405bb0
mov edx, dword [esp + 0x5a0]
mov ecx, dword [esp + 0x5a4]
add esp, 0xc
mov eax, edx
mov esi, dword [eax]
add eax, 4
inc dword [esp + esi*4 + 0xcc]
dec ecx
jne 0x404a35
mov eax, dword [esp + 0x598]
cmp eax, dword [esp + 0xcc]
jne 0x404a7b
mov ecx, dword [esp + 0x5a8]
mov ebx, dword [esp + 0x5ac]
xor eax, eax
pop ebp
pop edi
mov dword [ecx], 0
pop esi
mov dword [ebx], 0
pop ebx
add esp, 0x580
ret
mov ebx, dword [esp + 0x5ac]
mov ecx, 1
mov eax, dword [ebx]
mov dword [esp + 0x14], eax
lea eax, [esp + 0xd0]
cmp dword [eax], 0
jne 0x404aa8
add eax, 4
inc ecx
lea esi, [esp + 0x10c]
cmp eax, esi
jbe 0x404a94
mov dword [esp + 0x1c], ecx
mov esi, ecx
cmp dword [esp + 0x14], ecx
jae 0x404ab8
mov dword [esp + 0x14], esi
mov edi, 0x10
lea eax, [esp + 0x10c]
cmp dword [eax], 0
jne 0x404ad8
sub eax, 4
dec edi
lea ebp, [esp + 0xcc]
cmp eax, ebp
jne 0x404ac4
mov dword [esp + 0x30], edi
cmp dword [esp + 0x14], edi
jbe 0x404ae6
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x14]
mov dword [ebx], eax
mov eax, 1
shl eax, cl
mov dword [esp + 0x3c], eax
cmp ecx, edi
jae 0x404b1c
lea eax, [esp + ecx*4 + 0xcc]
mov ebx, dword [eax]
sub dword [esp + 0x3c], ebx
js 0x404b3b
add eax, 4
inc ecx
mov ebx, dword [esp + 0x3c]
add ebx, ebx
cmp ecx, edi
mov dword [esp + 0x3c], ebx
jb 0x404b02
lea eax, [esp + edi*4 + 0xcc]
mov ecx, dword [eax]
sub dword [esp + 0x3c], ecx
jns 0x404b4b
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
add ecx, dword [esp + 0x3c]
lea ebx, [esp + 0x90]
mov dword [eax], ecx
xor eax, eax
lea ecx, [esp + 0xd0]
dec edi
mov dword [esp + 0x8c], eax
je 0x404b78
add eax, dword [ecx]
add ecx, 4
mov dword [ebx], eax
add ebx, 4
dec edi
jne 0x404b6b
xor edi, edi
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x404b96
lea ecx, [esp + eax*4 + 0x88]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [esp + eax*4 + 0x10c], edi
inc edi
cmp dword [esp + 0x598], edi
ja 0x404b7a
xor edi, edi
lea eax, [esp + 0x110]
mov dword [esp + 0x18], edi
mov dword [esp + 0x88], edi
xor edx, edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x48], edi
neg eax
mov dword [esp + 0x10], eax
cmp esi, dword [esp + 0x30]
mov dword [esp + 0x20], 0xffffffff
jg 0x404e5b
mov eax, dword [esp + 0x1c]
lea ecx, [esp + eax*4 + 0xcc]
mov dword [esp + 0x2c], ecx
mov eax, dword [ecx]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
dec dword [esp + 0x24]
test eax, eax
je 0x404e49
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x1c]
jge 0x404d16
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
shl esi, 2
inc eax
mov dword [esp + 0x38], eax
add esi, 4
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x30]
inc dword [esp + 0x20]
add dword [esp + 0x10], eax
sub edi, dword [esp + 0x10]
cmp edi, eax
jbe 0x404c3e
mov edi, eax
mov ebx, dword [esp + 0x1c]
mov edx, 1
sub ebx, dword [esp + 0x10]
mov cl, bl
shl edx, cl
cmp edx, dword [esp + 0x38]
jbe 0x404c78
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
inc eax
inc ebx
sub edx, eax
cmp ebx, edi
jae 0x404c78
mov eax, dword [ecx + 4]
add edx, edx
add ecx, 4
cmp edx, eax
jbe 0x404c78
sub edx, eax
inc ebx
cmp ebx, edi
jb 0x404c65
mov edi, 1
mov cl, bl
shl edi, cl
lea eax, [edi*8 + 8]
push eax
call fcn.0040623a
add esp, 4
test eax, eax
je 0x404e79
lea edx, [eax + 8]
lea ecx, [edi + 1]
mov ebp, dword [esp + 0x5a8]
add eax, 4
add dword [0x40a324], ecx
mov dword [esp + 0x5a8], eax
mov dword [ebp], edx
mov dword [esp + esi + 0x48], edx
mov dword [eax], 0
test esi, esi
je 0x404d04
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x14]
add bl, 0x10
mov ebp, dword [esp + 0x18]
mov dword [esp + esi + 0x88], eax
mov byte [esp + 0x41], cl
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x40], bl
sub cl, byte [esp + 0x14]
mov dword [esp + 0x44], edx
shr ebp, cl
shl ebp, 3
mov ebx, dword [esp + 0x40]
add ebp, dword [esp + esi + 0x44]
mov dword [ebp], ebx
mov dword [ebp + 4], edx
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jl 0x404c21
mov bl, byte [esp + 0x10]
mov cl, byte [esp + 0x1c]
sub cl, bl
mov eax, dword [esp + 0x598]
mov byte [esp + 0x41], cl
lea ebp, [esp + eax*4 + 0x110]
cmp ebp, dword [esp + 0x34]
ja 0x404d3f
mov byte [esp + 0x40], 0x63
jmp 0x404da2
mov eax, dword [esp + 0x34]
mov esi, dword [eax]
cmp dword [esp + 0x59c], esi
jbe 0x404d68
mov byte [esp + 0x38], 0x10
cmp esi, 0x100
adc byte [esp + 0x38], 0xff
mov al, byte [esp + 0x38]
mov byte [esp + 0x40], al
jmp 0x404d98
cmp dword [esp + 0x5a4], 0
je 0x404e9d
sub esi, dword [esp + 0x59c]
mov eax, dword [esp + 0x5a4]
add esi, esi
mov ebp, dword [esp + 0x5a0]
mov al, byte [eax + esi]
mov si, word [esi + ebp]
mov byte [esp + 0x40], al
add dword [esp + 0x34], 4
mov word [esp + 0x44], si
mov eax, 1
mov esi, dword [esp + 0x18]
shl eax, cl
mov cl, bl
mov dword [esp + 0x28], eax
shr esi, cl
cmp esi, edi
jae 0x404ddc
shl eax, 3
lea ecx, [edx + esi*8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
add esi, dword [esp + 0x28]
mov dword [ecx], eax
mov dword [ecx + 4], ebp
add ecx, dword [esp + 0x38]
cmp esi, edi
jb 0x404dc3
mov eax, 1
mov cl, byte [esp + 0x1c]
dec cl
shl eax, cl
test dword [esp + 0x18], eax
je 0x404dfc
xor dword [esp + 0x18], eax
shr eax, 1
test dword [esp + 0x18], eax
jne 0x404def
mov cl, bl
xor dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
lea esi, [esp + eax*4 + 0x88]
mov eax, 1
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [esi]
je 0x404bef
sub esi, 4
mov eax, dword [esp + 0x14]
dec dword [esp + 0x20]
sub dword [esp + 0x10], eax
mov eax, 1
mov cl, byte [esp + 0x10]
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [esi]
jne 0x404e21
jmp 0x404bef
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x30]
jle 0x404bda
cmp dword [esp + 0x3c], 0
je 0x404ead
cmp dword [esp + 0x30], 1
je 0x404ead
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
cmp dword [esp + 0x20], 0
je 0x404e8d
mov eax, dword [esp + 0x48]
push eax
call fcn.00404ec0
add esp, 4
mov eax, 3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret