Function at 0x4075f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x580
xor eax, eax
mov ecx, 0x11
push ebx
push esi
push edi
lea edi, [esp + 0x44]
push ebp
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x598]
mov eax, dword [esp + 0x59c]
mov ecx, edx
mov esi, dword [ecx]
add ecx, 4
inc dword [esp + esi*4 + 0x48]
dec eax
jne 0x407617
mov eax, dword [esp + 0x59c]
cmp dword [esp + 0x48], eax
jne 0x407657
mov ecx, dword [esp + 0x5ac]
mov ebx, dword [esp + 0x5b0]
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 + 0x5b0]
mov ecx, 1
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x4c]
cmp dword [eax], 0
jne 0x407681
add eax, 4
inc ecx
lea esi, [esp + 0x88]
cmp eax, esi
jbe 0x40766d
mov dword [esp + 0x20], ecx
mov edi, ecx
cmp dword [esp + 0x10], ecx
jae 0x407691
mov dword [esp + 0x10], edi
mov esi, 0x10
lea eax, [esp + 0x88]
cmp dword [eax], 0
jne 0x4076ae
sub eax, 4
dec esi
lea ebp, [esp + 0x48]
cmp eax, ebp
jne 0x40769d
mov dword [esp + 0x34], esi
cmp dword [esp + 0x10], esi
jbe 0x4076bc
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x10]
mov dword [ebx], eax
mov eax, 1
shl eax, cl
mov dword [esp + 0x24], eax
cmp ecx, esi
jae 0x4076ef
lea ebx, [esp + ecx*4 + 0x48]
mov eax, dword [ebx]
sub dword [esp + 0x24], eax
js 0x40770b
add ebx, 4
inc ecx
mov eax, dword [esp + 0x24]
add eax, eax
cmp ecx, esi
mov dword [esp + 0x24], eax
jb 0x4076d5
lea eax, [esp + esi*4 + 0x48]
mov ecx, dword [eax]
sub dword [esp + 0x24], ecx
jns 0x40771b
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 + 0x24]
lea ebx, [esp + 0x4c]
mov dword [eax], ecx
xor ecx, ecx
lea eax, [esp + 0x94]
dec esi
mov dword [esp + 0x90], ecx
je 0x407745
add ecx, dword [ebx]
add ebx, 4
mov dword [eax], ecx
add eax, 4
dec esi
jne 0x407738
xor esi, esi
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x407763
lea ecx, [esp + eax*4 + 0x8c]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [esp + eax*4 + 0x10c], esi
inc esi
cmp dword [esp + 0x59c], esi
ja 0x407747
xor esi, esi
lea eax, [esp + 0x110]
mov dword [esp + 0x18], esi
mov dword [esp + 0x8c], esi
xor edx, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xd0], esi
neg eax
mov dword [esp + 0x14], eax
cmp edi, dword [esp + 0x34]
mov dword [esp + 0x30], 0xffffffff
jg 0x407a4c
mov eax, dword [esp + 0x20]
lea ecx, [esp + eax*4 + 0x48]
mov dword [esp + 0x44], ecx
mov eax, dword [ecx]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
dec dword [esp + 0x3c]
test eax, eax
je 0x407a3a
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x20]
jge 0x4078ed
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
shl edi, 2
inc eax
mov dword [esp + 0x1c], eax
add edi, 4
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x34]
inc dword [esp + 0x30]
add dword [esp + 0x14], eax
sub esi, dword [esp + 0x14]
cmp esi, eax
jbe 0x40780b
mov esi, eax
mov ebx, dword [esp + 0x20]
mov edx, 1
sub ebx, dword [esp + 0x14]
mov cl, bl
shl edx, cl
cmp dword [esp + 0x1c], edx
jae 0x407845
mov eax, dword [esp + 0x3c]
inc ebx
inc eax
sub edx, eax
mov eax, dword [esp + 0x44]
cmp esi, ebx
jbe 0x407845
mov ecx, dword [eax + 4]
add edx, edx
add eax, 4
cmp ecx, edx
jae 0x407845
sub edx, ecx
inc ebx
cmp esi, ebx
ja 0x407832
mov esi, 1
mov cl, bl
shl esi, cl
lea eax, [esi*8 + 8]
push eax
call fcn.00409870
add esp, 4
test eax, eax
je 0x407a6a
lea edx, [esi + 1]
mov ecx, dword [esp + 0x594]
mov ebp, dword [esp + 0x5ac]
add eax, 4
add dword [ecx + 0x14], edx
mov dword [esp + 0x5ac], eax
lea edx, [eax + 4]
test edi, edi
mov dword [ebp], edx
mov dword [esp + edi + 0xd0], edx
mov dword [eax], 0
je 0x4078db
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x10]
add bl, 0x10
mov ebp, dword [esp + 0x18]
mov dword [esp + edi + 0x8c], eax
mov byte [esp + 0x29], cl
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x28], bl
sub cl, byte [esp + 0x10]
mov dword [esp + 0x2c], edx
shr ebp, cl
shl ebp, 3
mov ebx, dword [esp + 0x28]
add ebp, dword [esp + edi + 0xcc]
mov dword [ebp], ebx
mov dword [ebp + 4], edx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x4077ee
mov bl, byte [esp + 0x14]
mov cl, byte [esp + 0x20]
sub cl, bl
mov eax, dword [esp + 0x59c]
mov byte [esp + 0x29], cl
lea ebp, [esp + eax*4 + 0x110]
cmp ebp, dword [esp + 0x40]
ja 0x407916
mov byte [esp + 0x28], 0x63
jmp 0x407993
mov eax, dword [esp + 0x40]
mov edi, dword [eax]
cmp dword [esp + 0x5a0], edi
jbe 0x40793f
mov byte [esp + 0x1c], 0x10
cmp edi, 0x100
adc byte [esp + 0x1c], 0xff
mov al, byte [esp + 0x1c]
mov byte [esp + 0x28], al
jmp 0x407989
cmp dword [esp + 0x5a4], 0
je 0x407a99
cmp dword [esp + 0x5a8], 0
je 0x407a99
sub edi, dword [esp + 0x5a0]
cmp dword [esp + 0x5b4], edi
jb 0x407a99
mov eax, dword [esp + 0x5a8]
mov ebp, dword [esp + 0x5a4]
mov al, byte [eax + edi*2]
mov di, word [ebp + edi*2]
mov byte [esp + 0x28], al
add dword [esp + 0x40], 4
mov word [esp + 0x2c], di
mov eax, 1
mov edi, dword [esp + 0x18]
shl eax, cl
mov cl, bl
mov dword [esp + 0x38], eax
shr edi, cl
cmp esi, edi
jbe 0x4079cd
shl eax, 3
lea ecx, [edx + edi*8]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add edi, dword [esp + 0x38]
mov dword [ecx], eax
mov dword [ecx + 4], ebp
add ecx, dword [esp + 0x1c]
cmp esi, edi
ja 0x4079b4
mov eax, 1
mov cl, byte [esp + 0x20]
dec cl
shl eax, cl
test dword [esp + 0x18], eax
je 0x4079ed
xor dword [esp + 0x18], eax
shr eax, 1
test dword [esp + 0x18], eax
jne 0x4079e0
mov cl, bl
xor dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
lea edi, [esp + eax*4 + 0x8c]
mov eax, 1
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [edi]
je 0x4077bc
sub edi, 4
mov eax, dword [esp + 0x10]
dec dword [esp + 0x30]
sub dword [esp + 0x14], eax
mov eax, 1
mov cl, byte [esp + 0x14]
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [edi]
jne 0x407a12
jmp 0x4077bc
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x34]
jle 0x4077aa
cmp dword [esp + 0x24], 0
je 0x407aa9
cmp dword [esp + 0x34], 1
je 0x407aa9
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
cmp dword [esp + 0x30], 0
je 0x407a89
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0x594]
push eax
push ecx
call fcn.00407ac0
add esp, 8
mov eax, 3
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
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret