Function at 0x401860
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x684
push ebx
mov ebx, dword [esp + 0x690]
mov edx, dword [esp + 0x68c]
push ebp
push esi
mov esi, dword [esp + 0x6b0]
push edi
mov ecx, 0x11
mov ebp, dword [esi]
xor eax, eax
lea edi, [esp + 0x68]
mov dword [esp + 0x18], ebp
rep stosd dword es:[edi], eax
mov dword [esp + 0x50], eax
mov eax, dword [edx]
add edx, 4
mov edi, dword [esp + eax*4 + 0x68]
lea eax, [esp + eax*4 + 0x68]
inc edi
dec ebx
mov dword [eax], edi
jne 0x401896
mov eax, dword [esp + 0x69c]
mov ecx, dword [esp + 0x68]
cmp ecx, eax
jne 0x4018cb
mov dword [esi], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x684
ret
mov eax, dword [esp + 0x6c]
mov edx, 1
test eax, eax
mov dword [esp + 0x20], edx
jne 0x4018f2
lea eax, [esp + 0x6c]
inc edx
add eax, 4
cmp edx, 0x10
jg 0x4018ee
cmp dword [eax], 0
je 0x4018e0
mov dword [esp + 0x20], edx
cmp edx, ebp
jle 0x4018fc
mov dword [esp + 0x18], edx
mov ebp, edx
mov eax, dword [esp + 0xa8]
mov esi, 0x10
test eax, eax
mov dword [esp + 0x30], esi
jne 0x401928
lea eax, [esp + 0xa8]
dec esi
sub eax, 4
test esi, esi
je 0x401924
cmp dword [eax], 0
je 0x401917
mov dword [esp + 0x30], esi
cmp esi, ebp
jge 0x401932
mov dword [esp + 0x18], esi
mov ebp, esi
mov ecx, dword [esp + 0x6b4]
mov edi, 1
mov dword [ecx], ebp
mov ecx, edx
shl edi, cl
cmp edx, esi
jge 0x40198c
mov ebx, dword [esp + edx*4 + 0x68]
lea ecx, [esp + edx*4 + 0x68]
sub edi, ebx
mov eax, edx
js 0x401978
jmp 0x40195c
mov edi, dword [esp + 0x24]
inc eax
add ecx, 4
add edi, edi
cmp eax, esi
mov dword [esp + 0x24], edi
jge 0x401988
mov edi, dword [ecx]
mov ebx, dword [esp + 0x24]
sub ebx, edi
mov dword [esp + 0x24], ebx
jns 0x401958
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x684
ret
mov edi, dword [esp + 0x24]
mov eax, dword [esp + esi*4 + 0x68]
sub edi, eax
mov dword [esp + 0x24], edi
jns 0x4019a8
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x684
ret
add eax, edi
lea edi, [esi - 1]
mov dword [esp + esi*4 + 0x68], eax
xor eax, eax
cmp edi, eax
mov dword [esp + 0xb0], eax
je 0x4019df
mov ecx, dword [esp + 0x6c]
dec edi
mov dword [esp + 0xb4], ecx
je 0x4019df
mov ebx, dword [esp + eax + 0x70]
add eax, 4
add ecx, ebx
dec edi
mov dword [esp + eax + 0xb4], ecx
jne 0x4019cc
mov ebx, dword [esp + 0x698]
xor ecx, ecx
mov eax, dword [ebx]
test eax, eax
je 0x401a06
lea edi, [esp + eax*4 + 0xac]
mov eax, dword [esp + eax*4 + 0xac]
inc eax
mov dword [edi], eax
mov dword [esp + eax*4 + 0x130], ecx
mov eax, dword [esp + 0x69c]
inc ecx
add ebx, 4
cmp ecx, eax
jl 0x4019e8
mov ebx, ebp
xor edi, edi
lea eax, [esp + 0x134]
mov dword [esp + 0xac], edi
neg ebx
cmp edx, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x54], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0xf0], edi
mov dword [esp + 0x14], 0xffffffff
jg 0x401dac
lea ecx, [edx - 1]
lea eax, [esp + edx*4 + 0x68]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx]
mov eax, ecx
dec ecx
test eax, eax
mov dword [esp + 0x48], ecx
je 0x401d89
lea eax, [ecx + 1]
mov ecx, eax
neg ecx
shl ecx, 0x1f
sub ecx, eax
mov dword [esp + 0x40], ecx
lea eax, [ebx + ebp]
cmp eax, edx
jge 0x401be6
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
mov eax, ebp
and esi, 0xfffff
shl ecx, 2
neg eax
mov edi, edx
mov dword [esp + 0x60], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x58], eax
sub edi, ebx
jmp 0x401abe
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
add edi, eax
mov eax, dword [esp + 0x4c]
add ebx, ebp
add ecx, 4
add eax, ebp
sub esi, ebx
inc edx
cmp esi, ebp
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], edx
jle 0x401aec
mov esi, ebp
mov edx, 1
mov ecx, edi
shl edx, cl
mov ecx, dword [esp + 0x48]
mov eax, edi
inc ecx
cmp edx, ecx
jbe 0x401b43
lea eax, [edi + 1]
cmp eax, esi
jae 0x401b43
mov ecx, dword [esp + 0x40]
add ecx, edx
mov edx, dword [esp + 0x38]
shl ecx, 1
lea ebp, [edx + 4]
mov edx, dword [edx + 4]
cmp ecx, edx
jbe 0x401b3f
inc eax
cmp eax, esi
jae 0x401b3f
mov edi, edx
add ebp, 4
neg edi
shl edi, 0x1f
sub edi, edx
mov edx, dword [ebp]
add edi, ecx
shl edi, 1
mov ecx, edi
mov edi, dword [esp + 0x1c]
cmp ecx, edx
ja 0x401b1d
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x6ac]
mov edx, 1
mov ecx, eax
shl edx, cl
mov ecx, dword [esp + 0x50]
lea esi, [esi + ecx*8]
mov dword [esp + 0x1c], edx
add ecx, edx
mov edx, dword [esp + 0x6b0]
mov dword [esp + 0x54], esi
cmp ecx, edx
mov dword [esp + 0x50], ecx
ja 0x401dd2
mov ecx, dword [esp + 0x34]
shr ecx, 2
shl ecx, 2
lea edx, [esp + ecx + 0xf0]
mov dword [esp + 0x5c], edx
mov dword [edx], esi
mov edx, dword [esp + 0x34]
test edx, edx
je 0x401bd0
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x3c], esi
mov dword [esp + ecx + 0xac], edx
mov ecx, ebx
sub ecx, ebp
mov ebp, dword [esp + 0x18]
shr edx, cl
mov ecx, dword [esp + 0x5c]
add al, 0x10
mov byte [esp + 0x10], al
mov ecx, dword [ecx - 4]
lea ecx, [ecx + edx*8]
mov dl, byte [esp + 0x18]
mov byte [esp + 0x11], dl
mov eax, dword [esp + 0x10]
mov dword [ecx], eax
mov dword [ecx + 4], esi
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
cmp ecx, eax
jl 0x401ab6
mov edi, dword [esp + 0x2c]
mov edx, eax
mov al, dl
mov esi, dword [esp + 0x28]
sub al, bl
mov byte [esp + 0x64], al
mov ecx, dword [esp + 0x64]
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x69c]
and ecx, 0xff
lea eax, [esp + eax*4 + 0x134]
cmp eax, esi
jbe 0x401c80
mov edx, esi
mov esi, dword [edx]
mov edx, dword [esp + 0x6a0]
cmp esi, edx
jae 0x401c40
cmp esi, 0x100
mov eax, 0x10
jb 0x401c33
mov eax, 0xf
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x28]
mov ax, word [eax]
jmp 0x401c66
mov eax, edx
neg eax
shl eax, 0x1f
sub eax, edx
mov edx, dword [esp + 0x6a8]
add eax, esi
shl eax, 1
mov dl, byte [eax + edx]
mov byte [esp + 0x10], dl
mov edx, dword [esp + 0x6a4]
mov ax, word [eax + edx]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
add esi, 4
and eax, 0xffff
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], eax
jmp 0x401c85
mov byte [esp + 0x10], 0x63
mov esi, 1
mov eax, edi
shl esi, cl
mov ecx, ebx
shr eax, cl
cmp eax, dword [esp + 0x1c]
jae 0x401cdd
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x10]
lea ecx, [ecx + eax*8]
add eax, esi
mov dword [ecx], edx
mov edx, dword [esp + 0x3c]
add ecx, 4
mov dword [ecx], edx
mov edx, dword [esp + 0x1c]
cmp eax, edx
lea ecx, [ecx + esi*8 - 4]
jae 0x401cd9
mov edx, dword [esp + 0x10]
add eax, esi
mov dword [ecx], edx
mov edx, dword [esp + 0x3c]
add ecx, 4
mov dword [ecx], edx
mov edx, dword [esp + 0x1c]
cmp eax, edx
lea ecx, [ecx + esi*8 - 4]
jb 0x401cbc
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
mov eax, 1
shl eax, cl
test edi, eax
je 0x401cfc
xor edi, eax
shr eax, 1
test edi, eax
je 0x401cfc
xor edi, eax
shr eax, 1
test edi, eax
jne 0x401cf4
mov esi, 1
mov ecx, ebx
xor edi, eax
mov eax, dword [esp + 0x14]
shl esi, cl
mov ecx, dword [esp + eax*4 + 0xac]
lea eax, [esp + eax*4 + 0xac]
mov dword [esp + 0x2c], edi
dec esi
and esi, edi
cmp esi, ecx
je 0x401d64
mov esi, dword [esp + 0x14]
sub eax, 4
sub ebx, ebp
dec esi
mov dword [esp + 0x14], esi
mov esi, 1
mov ecx, ebx
shl esi, cl
mov ecx, dword [eax]
dec esi
and esi, edi
cmp esi, ecx
je 0x401d64
mov esi, dword [esp + 0x14]
sub eax, 4
sub ebx, ebp
dec esi
mov dword [esp + 0x14], esi
mov esi, 1
mov ecx, ebx
shl esi, cl
mov ecx, dword [eax]
dec esi
and esi, edi
cmp esi, ecx
jne 0x401d44
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x40]
mov eax, ecx
sub esi, 0x7fffffff
dec ecx
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x48], ecx
test eax, eax
jne 0x401a84
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
inc edx
add eax, 4
inc ecx
cmp edx, esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], ecx
jle 0x401a5f
xor edi, edi
cmp dword [esp + 0x24], edi
jne 0x401dbf
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x684
ret
xor eax, eax
cmp esi, 1
pop edi
pop esi
pop ebp
pop ebx
setne al
add esp, 0x684
ret
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x684
ret